CN111031066B - Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system - Google Patents

Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system Download PDF

Info

Publication number
CN111031066B
CN111031066B CN201911360792.2A CN201911360792A CN111031066B CN 111031066 B CN111031066 B CN 111031066B CN 201911360792 A CN201911360792 A CN 201911360792A CN 111031066 B CN111031066 B CN 111031066B
Authority
CN
China
Prior art keywords
pos machine
gateway
serial number
pos
data
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
Application number
CN201911360792.2A
Other languages
Chinese (zh)
Other versions
CN111031066A (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.)
Harbin Synjones Electronic Co ltd
Original Assignee
Harbin Synjones Electronic 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 Harbin Synjones Electronic Co ltd filed Critical Harbin Synjones Electronic Co ltd
Priority to CN201911360792.2A priority Critical patent/CN111031066B/en
Publication of CN111031066A publication Critical patent/CN111031066A/en
Application granted granted Critical
Publication of CN111031066B publication Critical patent/CN111031066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

A data transmission method among a PC, a gateway and a POS machine 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 PC machine through the gateway, the gateway passively receives the running data, and the data are easily lost. The invention comprises the following steps: a data transmission method among a PC, a gateway and a POS machine in an all-purpose card system is characterized in that: the method 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 and judges whether the POS machine signs in; the POS machine and the gateway negotiate a serial number; the third step: the POS machine calls account data from the PC; simultaneously returning the running data packets; the invention ensures the accuracy of data transmission among the PC, the gateway and the POS machine. The invention is used for data transmission among the PC, the gateway and the POS machine in the one-card system.

Description

Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system
Technical Field
The invention relates to a data transmission method, in particular to a data transmission method among a PC (personal computer), a gateway and a POS (point-of-sale) machine 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 gateway and a PC machine. In the prior art, the general technology adopted is that a POS actively transmits running data (running data, that is, customer consumption data stored in independent pieces) to a gateway or a PC through the gateway, and the gateway passively accepts the running data. By using the method, the gateway cannot judge whether the transmitted pipeline data is completely received, the pipeline data is easy to lose, 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 among PC, gateway and POS machine in one-card system is disclosed, the gateway in the invention refers to a gateway with storage and analysis functions.
The method 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 card, uses the card number to request the account information from the PC machine through the gateway on line, displays the account information on the display screen, inputs the consumption amount, and uploads the consumption running water to the PC machine for entering account through the gateway after forming the consumption running water.
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, is downwards connected with the POS machine through a 485 protocol, is upwards connected with the PC through a TCP/IP, the working modes of the gateway and the POS machine are 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 refers to the fact that the POS machine reports the online state to the gateway and the PC, and the check-in refers to the fact that the POS machine achieves state conversion through a mode of online negotiation serial numbers for the first time.
Thirdly, judging whether the POS machine is inserted with a card or not; if not, waiting for card insertion; if so, carrying out the next step;
whether the POS machine is inserted into the card or not is judged, namely whether the customer consumes or not is judged.
The fourth step: the POS machine calls account data from the PC; 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.
Preferably, the method for negotiating the serial number in step 2 includes 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 PC, and the PC gives a response to the POS machine through the gateway.
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 among the PC, 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 among a PC, a gateway and a POS machine 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 PC; 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 among a PC, a gateway and a POS machine in an all-purpose card system is characterized in that: the method comprises the following steps:
step 1: accessing a POS machine to a network; the method for accessing the network comprises the following steps: the physical point of sale (POS) machine is accessed to the 485 bus through a 485 communication line, the logical point of sale (POS) machine is in a passive mode through a self-defined 485 communication protocol, and the POS machine 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 PC; 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 limit the second embodiment or the first embodiment: a data transmission method among a PC, a gateway and a POS machine in an all-purpose card system is characterized in that: the method comprises the following steps:
step 1: accessing a POS machine to a network; the method for accessing the network comprises the following steps: the physical point of sale (POS) machine is accessed to the 485 bus through a 485 communication line, the logical point of sale (POS) machine is in a passive mode through a self-defined 485 communication protocol, and the POS machine 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 PC, and the PC gives a response to the POS machine through the gateway.
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 PC; 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 among a PC, a gateway and a POS machine in an all-purpose card system is characterized in that: the method 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 PC; the method for calling account data comprises the following steps: the POS machine sends an account adjustment request, namely an account adjustment 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 query error information to the POS machine; 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; 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.
2. The one-card system of claim 1, wherein the data transmission method among the PC, the gateway and the POS machine comprises: the method for accessing the POS machine to the network in the step 1 comprises the following steps: the physical point of sale (POS) machine is accessed to the 485 bus through a 485 communication line, the logical point of sale (POS) machine is in a passive mode through a self-defined 485 communication protocol, and the POS machine waits for the 485 protocol gateway to call.
3. The method for data transmission among the PC, the gateway and the POS machine in the one-card system according to claim 1 or 2, wherein: the method for negotiating serial numbers in step 2 comprises the following steps: the POS actively reports the initial serial number of the POS machine to the gateway and the PC, and the PC gives a response to the POS machine through the gateway.
CN201911360792.2A 2019-12-25 2019-12-25 Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system Active CN111031066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911360792.2A CN111031066B (en) 2019-12-25 2019-12-25 Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911360792.2A CN111031066B (en) 2019-12-25 2019-12-25 Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system

Publications (2)

Publication Number Publication Date
CN111031066A CN111031066A (en) 2020-04-17
CN111031066B true CN111031066B (en) 2022-02-01

Family

ID=70213437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911360792.2A Active CN111031066B (en) 2019-12-25 2019-12-25 Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system

Country Status (1)

Country Link
CN (1) CN111031066B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046870A (en) * 2006-04-27 2007-10-03 陈龙军 Method for raising safety of transaction process using two-dimensional code for identifying local cipher
CN101404077A (en) * 2008-11-04 2009-04-08 侯万春 Remote payment system and method for associated affirmation of goods inspection and payment
WO2009065417A1 (en) * 2007-11-19 2009-05-28 Net Signature For Advanced Solutions (I.N.K.) M. currency- net sense
CN101464981A (en) * 2007-12-18 2009-06-24 黄金富 Bank card account security system and method through mobile phone orientation authentication card owner identification
CN105493112A (en) * 2013-08-20 2016-04-13 慧与发展有限责任合伙企业 Point of sale device leveraging a payment unification service
CN105678535A (en) * 2016-01-29 2016-06-15 北京智能果技术有限公司 Payment method and device
CN106875173A (en) * 2010-12-14 2017-06-20 极限移动有限公司 A kind of method of authenticating transactions
CN111028448A (en) * 2019-12-25 2020-04-17 哈尔滨新中新电子股份有限公司 Data transmission method between POS machine and gateway in all-purpose card system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8712856B2 (en) * 2010-04-12 2014-04-29 Nintendo Of America Inc. Systems and/or methods for determining item serial number structure and intelligence

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046870A (en) * 2006-04-27 2007-10-03 陈龙军 Method for raising safety of transaction process using two-dimensional code for identifying local cipher
WO2009065417A1 (en) * 2007-11-19 2009-05-28 Net Signature For Advanced Solutions (I.N.K.) M. currency- net sense
CN101464981A (en) * 2007-12-18 2009-06-24 黄金富 Bank card account security system and method through mobile phone orientation authentication card owner identification
CN101404077A (en) * 2008-11-04 2009-04-08 侯万春 Remote payment system and method for associated affirmation of goods inspection and payment
CN106875173A (en) * 2010-12-14 2017-06-20 极限移动有限公司 A kind of method of authenticating transactions
CN105493112A (en) * 2013-08-20 2016-04-13 慧与发展有限责任合伙企业 Point of sale device leveraging a payment unification service
CN105678535A (en) * 2016-01-29 2016-06-15 北京智能果技术有限公司 Payment method and device
CN111028448A (en) * 2019-12-25 2020-04-17 哈尔滨新中新电子股份有限公司 Data transmission method between POS machine and gateway in all-purpose card system

Also Published As

Publication number Publication date
CN111031066A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
BRPI0924555B1 (en) method of implementing call service and call center system
CN106330683A (en) Multimedia seating system
CN111028448B (en) Data transmission method between POS machine and gateway in all-purpose card system
CN102035658A (en) High-speed 1553B fiber bus IP core
CN111031066B (en) Data transmission method among PC (personal computer), gateway and POS (point-of-sale) machine in all-purpose card system
CN103297462A (en) Verification method and device of service object
CN101739295A (en) Method and device for calling extension program based on process
CN104424558A (en) Broadband wireless network paying and advertising method
JP4516594B2 (en) Message transmission control method, message transmission control device, and message transmission control program
CN105761069A (en) POS terminal communication method and system thereof
CN107046679A (en) A kind of system and method for the real time service calling based on mobile phone
CN109787783A (en) Billing implementation system and method under a kind of publicly-owned cloud environment
CN110445700A (en) Slave communication system, method and terminal device
CN109194513A (en) A kind of method of API gateway Intellisense cluster
US20080320020A1 (en) Method and system for optimizing xa open and xa close operations in a distributed database system
CN104317971A (en) Real-time system parameter data non-blocking updating and access method
JPH0778775B2 (en) Information exchange system and method between application programs
CN112035274A (en) Service processing method, device and system
CN117439838B (en) Edge computing gateway master-slave machine-oriented self-adaptive rapid networking method
CN114741349B (en) Multi-platform data transparent transmission 485 bus interaction method, medium, equipment and system
CN115037795B (en) Multi-machine communication method for embedded equipment
CN201111275Y (en) Retail information terminal
CN114326526B (en) Vending machine, instruction parsing method, storage medium, and slave device thereof
CN208905230U (en) It is a kind of to extend nobody and peddle the intelligent express delivery cabinet of equipment
CN201947441U (en) Intelligent public transportation query device

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