CN111028448B - Data transmission method between POS machine and gateway in all-purpose card system - Google Patents
Data transmission method between POS machine and gateway in all-purpose card system Download PDFInfo
- Publication number
- CN111028448B CN111028448B CN201911358966.1A CN201911358966A CN111028448B CN 111028448 B CN111028448 B CN 111028448B CN 201911358966 A CN201911358966 A CN 201911358966A CN 111028448 B CN111028448 B CN 111028448B
- Authority
- CN
- China
- Prior art keywords
- pos machine
- gateway
- serial number
- data
- card
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000005540 biological transmission Effects 0.000 title claims abstract description 16
- 238000004891 communication Methods 0.000 claims description 12
- 238000003780 insertion Methods 0.000 claims description 5
- 230000037431 insertion Effects 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
- G07G1/14—Systems including one or more distant stations co-operating with a central processing unit
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A data transmission method between a POS machine and a gateway in a one-card system. It relates to a data transmission method. In the prior art, the adopted general technology is that the POS machine actively transmits the running data to the gateway, the gateway passively receives the running data, and the data is easily lost. The invention comprises the following steps: the first step is as follows: accessing a POS machine to a network; the second step is that: the gateway sends a polling instruction to the POS machine, judges whether the POS machine signs in or not, and negotiates a serial number between the POS machine and the gateway; thirdly, continuously judging whether the POS machine is inserted with the card or not; if yes, carrying out the next step; the fourth step: the POS machine calls account data from the gateway; while returning the pipelined data packets. The invention ensures the accuracy of data transmission between the gateway and the POS machine. The invention is used for data transmission between the POS machine and the gateway in the one-card system.
Description
Technical Field
The invention relates to a data transmission method, in particular to a data transmission method between a POS machine and a gateway in a one-card system.
Background
The all-purpose card system is an intelligent card system and comprises a city all-purpose card, a traffic all-purpose card, a campus all-purpose card and the like. The one-card system generally comprises a POS machine, a network manager and a PC machine. In the prior art, the general technology adopted is that a POS machine actively transmits running data (the running data is customer consumption data stored according to independent number) to a gateway, and the gateway passively receives the running data. By using the method, the gateway can not judge whether the transmitted pipeline data is completely received, the pipeline data is easy to lose, further the amount of the settled accounts is inconsistent with the actual consumption of the customer, and great troubles are brought to the accounting work.
In order to solve the problems, the invention adopts the following technical scheme: a data transmission method between POS machine and gateway in one-card system is disclosed, the gateway in the invention refers to commercial gateway with storage and analysis function. The POS machine can directly transmit, process and analyze data through the gateway. The commercial gateway is used as a commercial subsystem of the all-purpose card, is a special communication device with industrial design, and is a bridge and a relay station for data communication between a commercial sub-network and a central database. The business gateway is directly connected to the campus card network through TCP/IP communication protocol, and forms a business sub-network with the consumption POS machine through RS-485 communication mode, and simultaneously can perform business statistics analysis and parameter setting functions.
The invention comprises the following steps:
the first step is as follows: accessing a POS machine to a network; the working principle of the POS machine is as follows: the POS machine reads the account information of the intelligent card, requests the account information on line through the gateway by using the card number, displays the account information on a display screen, inputs the consumption amount to form consumption flow data, and then transmits the consumption flow data to the gateway for storage.
The technical implementation of accessing the POS machine into the network is preferably that the POS machine is physically accessed into a 485 bus through a 485 communication line, logically, the POS machine is in a passive mode through a self-defined 485 communication protocol, waits for a 485 protocol gateway call, and is also called a master-slave mode, wherein the gateway is a master, and the POS machine is a slave.
The second step is that: the gateway sends a polling instruction to the POS machine and judges whether the POS machine signs in; if not, the POS machine continues to sign in; if yes, the POS machine and the gateway negotiate a serial number;
the gateway is a 485 protocol conversion gateway and is connected with the POS machine downwards through a 485 protocol, the working modes of the gateway and the POS machine are a master-slave mode, and the gateway polls the POS machine in sequence in a time-sharing mode and interacts data with the POS machine.
The preferred scheme for negotiating the serial number is as follows: when the POS machine is on line for the first time, the initial serial number of the POS machine is actively reported to the gateway and the PC, the PC gives a response to the POS machine through the gateway, and the serial number negotiation is finished.
The polling is realized by the way that the gateway communicates with the POS machine owner and the POS machine slave, the gateway is the master, the POS machine is the slave, the gateway is connected with the POS machine through a 485 bus, the gateway calls the POS machines in sequence according to a certain rule, all the POS machines are monitored, and only the called POS machine can respond and exchange data with the gateway. )
The check-in means that the POS machine reports the state that I is online to the gateway and the PC, and the check-in means that the POS machine realizes the state conversion in a mode of online negotiation serial numbers for the first time.
Whether the POS machine is inserted into the card or not is judged, namely whether the customer consumes or not is judged.
Thirdly, judging whether the POS machine is inserted with a card or not; if not, waiting for card insertion; if the judgment is yes, the next step is carried out.
The fourth step: the POS machine calls account data from the gateway; simultaneously returning the running data packets; the step of returning the running data packet comprises:
4.1: the gateway requests the serial number set in the second step from the POS machine, and if the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway, the gateway receives the data; if the serial number of the data transmitted back from the POS machine is not consistent with the serial number requested by the gateway, carrying out the next step;
4.2: the gateway refuses to receive the serial number data packet; and continuing to request the data packet from the POS machine until the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway.
The account data is called as follows: the POS machine sends an account-adjusting request, namely an account-adjusting request packet with a card number is uploaded to the PC, and after receiving the request, the PC queries the database by using the card number and sends the searched account information or the query error information to the POS machine.
The invention has the technical effects that: by using the serial number determined by negotiation between the gateway and the POS machine, the accuracy of data transmission between the gateway and the POS machine in the one-card system is ensured on the premise of not increasing hardware, and further, accounting errors are avoided.
Drawings
Fig. 1 is a schematic structural diagram for implementing the present invention.
FIG. 2 is a logic flow diagram of the present invention.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
The first embodiment is as follows: a data transmission method between a POS machine and a gateway in an all-purpose card system comprises the following steps:
step 1: accessing a POS machine to a network;
step 2: the gateway sends a polling instruction to the POS machine and judges whether the POS machine signs in; if not, the POS machine continues to sign in; if yes, the POS machine and the gateway negotiate a serial number;
step 3, judging whether the POS machine is inserted in the card or not; if not, waiting for card insertion; if so, carrying out the next step;
and 4, step 4: the POS machine calls account data from the gateway; simultaneously returning the running data packets; the step of returning the running data packet comprises:
4.1: the gateway requests the serial number set in the second step from the POS machine, and if the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway, the gateway receives the data; if the serial number of the data transmitted back from the POS machine is not consistent with the serial number requested by the gateway, carrying out the next step;
4.2: the gateway refuses to receive the serial number data packet; and continuing to request the data packet from the POS machine until the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway.
The second embodiment is as follows: the second embodiment further defines the first embodiment: a data transmission method between a POS machine and a gateway in an all-purpose card system comprises the following steps:
step 1: accessing a POS machine to a network; the method for accessing POS machine to network includes: the 485 bus is accessed through a 485 communication line physically; logically, the POS machine is in a passive mode through a self-defined 485 communication protocol and waits for the 485 protocol gateway to call.
Step 2: the gateway sends a polling instruction to the POS machine and judges whether the POS machine signs in; if not, the POS machine continues to sign in; if yes, the POS machine and the gateway negotiate a serial number;
step 3, judging whether the POS machine is inserted in the card or not; if not, waiting for card insertion; if so, carrying out the next step;
and 4, step 4: the POS machine calls account data from the gateway; simultaneously returning the running data packets; the step of returning the running data packet comprises:
4.1: the gateway requests the serial number set in the second step from the POS machine, and if the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway, the gateway receives the data; if the serial number of the data transmitted back from the POS machine is not consistent with the serial number requested by the gateway, carrying out the next step;
4.2: the gateway refuses to receive the serial number data packet; and continuing to request the data packet from the POS machine until the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway.
The third concrete embodiment: the third embodiment is to further define the second embodiment or the first embodiment: a data transmission method between a POS machine and a gateway in an all-purpose card system comprises the following steps:
step 1: accessing a POS machine to a network; the method for accessing POS machine to network includes: the 485 bus is accessed through a 485 communication line physically; logically, the POS machine is in a passive mode through a self-defined 485 communication protocol and waits for the 485 protocol gateway to call.
Step 2: the gateway sends a polling instruction to the POS machine and judges whether the POS machine signs in; if not, the POS machine continues to sign in; if yes, the POS machine and the gateway negotiate a serial number; the method for negotiating the serial number comprises the following steps: when the POS machine is on line for the first time, the initial serial number of the POS machine is actively reported to the gateway, and the gateway gives a response to the POS machine.
Step 3, judging whether the POS machine is inserted in the card or not; if not, waiting for card insertion; if so, carrying out the next step;
and 4, step 4: the POS machine calls account data from the gateway; simultaneously returning the running data packets; the step of returning the running data packet comprises:
4.1: the gateway requests the serial number set in the second step from the POS machine, and if the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway, the gateway receives the data; if the serial number of the data transmitted back from the POS machine is not consistent with the serial number requested by the gateway, carrying out the next step;
4.2: the gateway refuses to receive the serial number data packet; and continuing to request the data packet from the POS machine until the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (3)
1. A data transmission method between a POS machine and a gateway in an all-purpose card system is characterized by comprising the following steps:
step 1: accessing a POS machine to a network;
step 2: the gateway sends a polling instruction to the POS machine and judges whether the POS machine signs in; if not, the POS machine continues to sign in; if yes, the POS machine and the gateway negotiate a serial number;
step 3, judging whether the POS machine is inserted in the card or not; if not, waiting for card insertion; if so, carrying out the next step;
and 4, step 4: the POS machine calls account data from the gateway; simultaneously returning the running data packets; the step of returning the running data packet comprises:
4.1: the gateway requests the serial number negotiated in the step 2 from the POS machine, and if the data serial number transmitted back from the POS machine is consistent with the serial number requested by the gateway, the gateway receives the data; if the serial number of the data transmitted back from the POS machine is not consistent with the serial number requested by the gateway, carrying out the next step;
4.2: the gateway refuses to receive the serial number data packet; continuously requesting the data packet to the POS machine until the serial number of the data transmitted back from the POS machine is consistent with the serial number requested by the gateway;
the account data is called as follows: the POS machine sends an account-adjusting request, namely an account-adjusting request packet with a card number is uploaded to the PC, and after receiving the request, the PC queries the database by using the card number and sends the searched account information or the query error information to the POS machine.
2. The method for data transmission between the POS machine and the gateway in the one-card system according to claim 1, wherein the method for the POS machine to access the network in the step 1 is as follows: the 485 bus is accessed through a 485 communication line physically; logically, the POS machine is in a passive mode through a self-defined 485 communication protocol and waits for the 485 protocol gateway to call.
3. The method for data transmission between the POS machine and the gateway in the one-card system according to claim 1 or claim 2, wherein the method for negotiating the serial number in step 2 comprises the following steps: the POS machine actively reports the initial serial number to the gateway, and the gateway gives a response to the POS machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911358966.1A CN111028448B (en) | 2019-12-25 | 2019-12-25 | Data transmission method between POS machine and gateway in all-purpose card system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911358966.1A CN111028448B (en) | 2019-12-25 | 2019-12-25 | Data transmission method between POS machine and gateway in all-purpose card system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111028448A CN111028448A (en) | 2020-04-17 |
CN111028448B true CN111028448B (en) | 2021-12-21 |
Family
ID=70214315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911358966.1A Active CN111028448B (en) | 2019-12-25 | 2019-12-25 | Data transmission method between POS machine and gateway in all-purpose card system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111028448B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111031066B (en) * | 2019-12-25 | 2022-02-01 | 哈尔滨新中新电子股份有限公司 | Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741993A (en) * | 2008-11-11 | 2010-06-16 | 华为终端有限公司 | Method, device and system for IP network carrying point-of-sale terminal data services |
CN102035867A (en) * | 2009-09-29 | 2011-04-27 | 重庆旭贤科技发展有限公司 | Multipath PPPoE (Point-to-Point Protocol over Ethernet) fusion gateway system |
CN102118284A (en) * | 2009-12-30 | 2011-07-06 | 徐勇 | Multimedia 3G (3rd-generation) digital home gateway with point-of-sale (POS) function and implementation method thereof |
CN103280038A (en) * | 2013-05-10 | 2013-09-04 | 江苏怡丰通信设备有限公司 | Financial payment system based on family gateway and payment method thereof |
CN103501192A (en) * | 2013-09-24 | 2014-01-08 | 深圳Tcl新技术有限公司 | Method and device for data transmission between terminals |
CN105279643A (en) * | 2014-12-26 | 2016-01-27 | 张志恒 | Remote payment method based on information discrete distribution technology |
CN105871666A (en) * | 2016-03-23 | 2016-08-17 | 浙江风向标科技有限公司 | Method and device for adding ZigBee device |
CN106254431A (en) * | 2016-07-26 | 2016-12-21 | 广东工业大学 | All-purpose card presence information management system |
CN106920348A (en) * | 2017-02-20 | 2017-07-04 | 金邦达有限公司 | POS, control method and control device, checkout terminal and its control method |
CN108600376A (en) * | 2018-04-27 | 2018-09-28 | 深圳市信锐网科技术有限公司 | Data transmission method, device, LoRa gateways, system based on LoRa and storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8112498B2 (en) * | 2001-11-19 | 2012-02-07 | Mitsubishi Denki Kabushiki Kaisha | Mapping between objects representing different network systems |
JP5222662B2 (en) * | 2008-08-22 | 2013-06-26 | 株式会社日立製作所 | Content control system |
CN101551894A (en) * | 2009-05-21 | 2009-10-07 | 候万春 | System and method of supervising credit card arbitrage |
US20120166270A1 (en) * | 2010-12-23 | 2012-06-28 | Apriva, Llc | System and device for facilitating mobile enrollment and participation in a loyalty campaign |
US9792593B2 (en) * | 2011-11-23 | 2017-10-17 | The Toronto-Dominion Bank | System and method for processing an online transaction request |
DE102012208290B4 (en) * | 2012-05-07 | 2014-02-20 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | NETWORKING COMPONENT WITH INQUIRY / RESPONSE ALLOCATION AND MONITORING |
SG10201600938YA (en) * | 2016-02-05 | 2017-09-28 | Mastercard International Inc | Method And System For Point Of Sale Payments |
CN209000108U (en) * | 2018-12-13 | 2019-06-18 | 哈尔滨新中新电子股份有限公司 | A kind of card reading integral machine |
-
2019
- 2019-12-25 CN CN201911358966.1A patent/CN111028448B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741993A (en) * | 2008-11-11 | 2010-06-16 | 华为终端有限公司 | Method, device and system for IP network carrying point-of-sale terminal data services |
CN102035867A (en) * | 2009-09-29 | 2011-04-27 | 重庆旭贤科技发展有限公司 | Multipath PPPoE (Point-to-Point Protocol over Ethernet) fusion gateway system |
CN102118284A (en) * | 2009-12-30 | 2011-07-06 | 徐勇 | Multimedia 3G (3rd-generation) digital home gateway with point-of-sale (POS) function and implementation method thereof |
CN103280038A (en) * | 2013-05-10 | 2013-09-04 | 江苏怡丰通信设备有限公司 | Financial payment system based on family gateway and payment method thereof |
CN103501192A (en) * | 2013-09-24 | 2014-01-08 | 深圳Tcl新技术有限公司 | Method and device for data transmission between terminals |
CN105279643A (en) * | 2014-12-26 | 2016-01-27 | 张志恒 | Remote payment method based on information discrete distribution technology |
CN105871666A (en) * | 2016-03-23 | 2016-08-17 | 浙江风向标科技有限公司 | Method and device for adding ZigBee device |
CN106254431A (en) * | 2016-07-26 | 2016-12-21 | 广东工业大学 | All-purpose card presence information management system |
CN106920348A (en) * | 2017-02-20 | 2017-07-04 | 金邦达有限公司 | POS, control method and control device, checkout terminal and its control method |
CN108600376A (en) * | 2018-04-27 | 2018-09-28 | 深圳市信锐网科技术有限公司 | Data transmission method, device, LoRa gateways, system based on LoRa and storage medium |
Non-Patent Citations (1)
Title |
---|
《基于第三方的客票支付体系研究》;李天翼,冀 平;《铁路计算机应用》;20140925;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111028448A (en) | 2020-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103795793B (en) | Road vehicle monitoring platform system based on double server clusters | |
CN114422288B (en) | Communication system based on Modbus protocol | |
CN110955626A (en) | Method and system for realizing Modbus communication on serial link | |
CN109936621A (en) | Multi-page information push method, device, equipment and the storage medium of information security | |
CN102567125A (en) | Method for realizing communication between browser pages | |
CN102170298A (en) | Power communication method and system based on MODBUS TCP/IP (Transmission Control Protocol/ Internet Protocol) | |
CN212367305U (en) | Power IoT management device for sensing equipment | |
CN111028448B (en) | Data transmission method between POS machine and gateway in all-purpose card system | |
CN103139157A (en) | Network communication method based on socket, device and system | |
CN109584390A (en) | A kind of highway charging system based on micro services | |
CN108510648A (en) | A kind of automatic vending machine remote control administrative system based on GPRS DTU | |
CN116506434B (en) | Multi-terminal offline-operation intelligent warehouse management method | |
CN105592164A (en) | Distributed system and method for data processing | |
CN110445700A (en) | Master-slave communication system and method and terminal equipment | |
CN102710622A (en) | Protocol conversion device based on DeviceNet-Modbus | |
CN107342789B (en) | Networking communication method of cable anti-theft monitoring system | |
CN111031066B (en) | Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system | |
CN109218142A (en) | One kind being based on OneM2M agreement platform of internet of things terminal access method and device | |
CN114978922A (en) | A dynamic topology data collection method | |
CN117439838B (en) | An adaptive fast networking method for edge computing gateway master-slave machines | |
CN113452732B (en) | Electric power internet of things network management system and method | |
CN109194513A (en) | A kind of method of API gateway Intellisense cluster | |
CN101014049B (en) | Method for managing timer of terminal wireless communication protocol stack software | |
CN1437810A (en) | information exchanger | |
CN105761069A (en) | POS terminal communication method and system thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |