CN105321269B - A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS - Google Patents

A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS Download PDF

Info

Publication number
CN105321269B
CN105321269B CN201410317148.8A CN201410317148A CN105321269B CN 105321269 B CN105321269 B CN 105321269B CN 201410317148 A CN201410317148 A CN 201410317148A CN 105321269 B CN105321269 B CN 105321269B
Authority
CN
China
Prior art keywords
decoding method
track
magnetic
data form
track 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
CN201410317148.8A
Other languages
Chinese (zh)
Other versions
CN105321269A (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.)
NEW POS TECHNOLOGY Ltd
Original Assignee
NEW POS TECHNOLOGY 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 NEW POS TECHNOLOGY Ltd filed Critical NEW POS TECHNOLOGY Ltd
Priority to CN201410317148.8A priority Critical patent/CN105321269B/en
Publication of CN105321269A publication Critical patent/CN105321269A/en
Application granted granted Critical
Publication of CN105321269B publication Critical patent/CN105321269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of method and apparatus for the head position for obtaining POS, and methods described is by determining whether to obtain the head position of the POS;In the case of it is determined that failing to obtain the head position of the POS, the data of the magnetic stripe card are obtained by self study coding/decoding method;If the data of the magnetic stripe card are obtained by the self study coding/decoding method, if 2 magnetic tracks (the first magnetic track and the second magnetic track or the second magnetic track and the 3rd magnetic track) have data, then obtain the result of swiping the card of the magnetic stripe card, and record the head position of the POS magnetic head, therefore, pass through 2 rail magnetic head adaptive approach, magnetic head installation site is automatically positioned according to result of swiping the card, solving the problems, such as that 2 rail magnetic head installation sites are different needs 2 kinds of distinct programs, production complexity is simplified, greatly improves production efficiency.

Description

A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS
Technical field
The present invention relates to POS field, more particularly to a kind of method of head position for obtaining point-of-sale terminal POS and Equipment.
Background technology
System financial sale terminal (point of sale, POS) card reader for magnetic strip cards uses 3 rail magnetic heads, can once read Take 3 magnetic track informations track1, track2, track3 of magnetic card.Track1 is generally present in credit card, and record is to hold The information such as the name of people;Track2 records are primary account numbers;Track3 belongs to card issuer's self defined area, can record transaction note Record or the amount of money.
But draw OK a karaoke club, Square for the simple POS of low cost, such as mobile phone card reader, use 2 rail magnetic heads, Can only selectivity reading track1, track2 or track2, track3.According to the difference of home and overseas financial environment, The installation site of magnetic head is different, and domestic general debit card is more, typically reads track2, track3 data, 2 rail magnetic head installation positions Figure is put as shown in figure 1, reading track2 and track3 data;External credit card is more, typically reads track1, track2 number According to 2 rail magnetic head installation site figures are as shown in Fig. 2 read track1 and track2 data.
According to the difference of home and overseas reading magnetic head data, it usually needs 2 sets of different programs, it is a set of for domestic production Product, read track2 and track3 data;It is a set of to be directed to overseas market, read track1 and track2 data.Merely because magnetic Head installation site is different and use 2 kinds of different programs, produce it is very inconvenient, usually can be because of magnetic head installation site Mismatched with the program of burning, lead to not swipe the card, caused product batch to do over again, greatly waste manpower and materials, reduce Production efficiency.
The content of the invention
The embodiments of the invention provide a kind of method for the head position for obtaining point-of-sale terminal POS, it is intended to which how is solution The program of the data of POS is read according to corresponding to the different uses of the magnetic head installation site of POS.
In a first aspect, a kind of method for the head position for obtaining point-of-sale terminal POS, the head position bag of the POS First position, the second place are included, the first position corresponds to the first magnetic track and the second magnetic track of magnetic stripe card, the second place pair The second magnetic track and the 3rd magnetic track, methods described for answering the magnetic stripe card include:
Determine whether to obtain the head position of the POS;
In the case of it is determined that failing to obtain the head position of the POS, obtained by the self study coding/decoding method The data of the magnetic stripe card;
If obtaining the data of the magnetic stripe card by the self study coding/decoding method, judge whether two magnetic tracks have number According to;
If described two magnetic tracks there are data, the result of swiping the card of the magnetic stripe card is obtained, and records the magnetic of the POS Head position;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained;
The data that the magnetic stripe card is obtained by the self study coding/decoding method, including:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data Form direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data Form inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data Form direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data Form inversely decoding method decodes to the 3rd magnetic track.
With reference in a first aspect, in the first possible implementation of first aspect, methods described also includes:
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method obtains the data of the magnetic stripe card, then return to execution and judge whether two magnetic tracks there are data;
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method does not obtain the data of the magnetic stripe card, by the first track data form inversely decoding method and described Second track data form inversely decoding method obtains the data of the magnetic stripe card;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
With reference to the first possible implementation of first aspect, in second of possible implementation of first aspect In, methods described also includes:
If pass through the first track data form inversely decoding method and the second track data form inversely decoding In the case that method does not obtain the data of the magnetic stripe card, by the second track data form direct decoding method and described 3rd track data form direct decoding method obtains the data of the magnetic stripe card;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
With reference to second of possible implementation of first aspect, in the third possible implementation of first aspect In, methods described also includes;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method does not obtain the data of the magnetic stripe card, then passes through the second track data form inversely decoding method and the 3rd magnetic Track data inversely decoding method obtains the data of the magnetic stripe card;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
Second with reference to first aspect either the first possible implementation or first aspect of first aspect can The implementation of energy or the third possible implementation of first aspect, in the 4th kind of possible realization side of first aspect In formula, methods described also includes:
In the case of it is determined that the head position of the POS can be obtained, the letter of the head position of the POS is obtained Breath, the information of the head position of the POS include the information of the first position or the information of the second place;
If the information of the head position of the POS is the information of first position, pass through the first track data lattice Formula coding/decoding method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;First track data Said shank method includes the first track data form direct decoding method and the first track data form inversely decoding side Method, the second track data form coding/decoding method include the second track data form direct decoding method and described second Track data form inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form solution Code method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data form Coding method includes the second track data form direct decoding method and the second track data form inversely decoding method, institute Stating the 3rd track data form coding/decoding method includes the 3rd track data form direct decoding method and the 3rd magnetic track Data format inversely decoding method.
Second aspect, a kind of equipment for the head position for obtaining POS, the head position of the POS include first Put, the second place, the first position corresponds to the first magnetic track and the second magnetic track of magnetic stripe card, and the second place corresponds to the magnetic The second magnetic track and the 3rd magnetic track of bar card, the equipment include:
First acquisition unit, it is used to determine whether that the head position of the POS can be obtained;
Second acquisition unit, in the case of it is determined that failing to obtain the head position of the POS, by it is described from Learn the data that coding/decoding method obtains magnetic stripe card;
Judging unit, if the data for obtaining the magnetic stripe card by the self study coding/decoding method, judge two Whether magnetic track has data;
3rd acquiring unit, if there are data for described two magnetic tracks, the result of swiping the card of the magnetic stripe card is obtained, and Record the head position of the POS;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained;
The data that the magnetic stripe card is obtained by the self study coding/decoding method are performed in the second acquisition unit, Including:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data Form direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data Form inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data Form direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data Form inversely decoding method decodes to the 3rd magnetic track.
With reference to second aspect, in the first possible implementation of second aspect, the equipment also includes:
First processing units, if for passing through the first track data form direct decoding method and second magnetic track In the case that data format direct decoding method obtains the data of the magnetic stripe card, then return to execution and judge whether two magnetic tracks are equal There are data;
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method does not obtain the data of the magnetic stripe card, by the first track data form inversely decoding method and described Second track data form inversely decoding method obtains the data of the magnetic stripe card;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
With reference to the first possible implementation of second aspect, in second of possible implementation of second aspect In, the equipment also includes:
Second processing unit, if for passing through the first track data form inversely decoding method and second magnetic track In the case that data format inversely decoding method does not obtain the data of the magnetic stripe card, by the second track data form just The data of the magnetic stripe card are obtained to coding/decoding method and the 3rd track data form direct decoding method;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
With reference to second of possible implementation of second aspect, in the third possible implementation of second aspect In, the equipment also includes:
3rd processing unit, if for passing through the second track data form direct decoding method and the 3rd magnetic track Data format direct decoding method does not obtain the data of the magnetic stripe card, then passes through the second track data form inversely decoding Method and the 3rd track data inversely decoding method obtain the data of the magnetic stripe card;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether second magnetic track and the 3rd magnetic track have number According to;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
Second with reference to second aspect either the first possible implementation or second aspect of second aspect can The implementation of energy or the third possible implementation of second aspect, in the 4th kind of possible realization side of second aspect In formula, the equipment also includes:
4th acquiring unit, in the case of it is determined that the head position of the POS can be obtained, obtaining the POS The information of the head position of machine, the information of the head position of the POS include the information or described second of the first position The information of position;
If the information of the head position of the POS is the information of first position, pass through the first track data lattice Formula coding/decoding method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;First track data Said shank method includes the first track data form direct decoding method and the first track data form inversely decoding side Method, the second track data form coding/decoding method include the second track data form direct decoding method and described second Track data form inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form solution Code method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data form Coding method includes the second track data form direct decoding method and the second track data form inversely decoding method, institute Stating the 3rd track data form coding/decoding method includes the 3rd track data form direct decoding method and the 3rd magnetic track Data format inversely decoding method.
The embodiment of the present invention provides a kind of method for the head position for obtaining point-of-sale terminal POS, and methods described passes through true The fixed head position that whether can obtain the POS;In the case of it is determined that failing to obtain the head position of the POS, lead to Cross the data that self study coding/decoding method obtains the magnetic stripe card;If the magnetic stripe card is obtained by the self study coding/decoding method Data, if 2 magnetic tracks (the first magnetic track and the second magnetic track or the second magnetic track and the 3rd magnetic track) there are data, obtain institute The result of swiping the card of magnetic stripe card is stated, and records the head position of the POS magnetic head, therefore, by 2 rail magnetic head adaptive approach, Magnetic head installation site is automatically positioned according to result of swiping the card, solves asking for the different 2 kinds of distinct programs of needs of 2 rail magnetic head installation sites Topic, simplifies production complexity, greatly improves production efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of position view for 2 rail magnetic head installation that prior art provides;
Fig. 2 is the position view for the rail magnetic head of another kind 2 installation that prior art provides;
Fig. 3 is a kind of method flow diagram of head position for obtaining point-of-sale terminal POS provided in an embodiment of the present invention;
Fig. 4 is a kind of method schematic diagram of head position for obtaining point-of-sale terminal POS provided in an embodiment of the present invention;
Fig. 5 is a kind of flow chart for self study coding/decoding method that the present invention implements offer;
Fig. 6 is a kind of flow chart of set form coding/decoding method provided in an embodiment of the present invention;
Fig. 7 is a kind of equipment structure chart of head position for obtaining POS provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
With reference to figure 3, Fig. 3 is a kind of method of head position for obtaining point-of-sale terminal POS provided in an embodiment of the present invention Flow chart.As shown in figure 3, the head position of the POS includes first position, the second place, the first position corresponds to magnetic The first magnetic track and the second magnetic track of bar card, the second place corresponds to the second magnetic track and the 3rd magnetic track of the magnetic stripe card, described Method comprises the following steps:
Step 301, it is determined whether the head position of the POS can be obtained;
Specifically, with reference to shown in figure 1, the first magnetic track is track1, the second magnetic track is track2, the 3rd magnetic track is Track3, in user's brush magnetic stripe card, judge head position from reading in record, and obtain the head position of the POS.
Step 302, in the case of it is determined that failing to obtain the head position of the POS, decoded by the self study Method obtains the data of the magnetic stripe card;
Specifically, the data that the magnetic stripe card is obtained by the self study coding/decoding method, including:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data Form direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data Form inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data Form direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data Form inversely decoding method decodes to the 3rd magnetic track.
Wherein, the self study coding/decoding method decodes by the trial that is decoded to first and second magnetic track and to second and third magnetic track Trial decode original brushing card data.
The forward direction is swiped the card and reversely swiped the card as relative direction of swiping the card, it is assumed that magnetic stripe card relative head is from left-hand when swiping the card The right side is swiped through to swipe the card for forward direction, then it is reversely to swipe the card that magnetic stripe card relative head is swiped through from right to left when swiping the card.The set form solution Code, according to the original track data for acquisition of swiping the card, decoded using corresponding track format, such as to the first magnetic track initial data, Decoded using the first track data form, to the second magnetic track initial data, decoded using the second track data form, to the 3rd magnetic Road initial data, decoded using the 3rd track data form.
Step 303, if obtaining the data of the magnetic stripe card by the self study coding/decoding method, judge that two magnetic tracks are It is no to have data;
Specifically, assume that track1 data format direct decoding methods and track2 data format direct decodings can be passed through Method obtains the data of the magnetic stripe card, then illustrates the first magnetic track corresponding to the head position of the POS and the second magnetic track, obtain Take the data of first magnetic track and second magnetic track.
Step 304, if described two magnetic tracks there are data, the result of swiping the card of the magnetic stripe card is obtained, and described in record The head position of POS;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained.
If, can be according to the data of 2 magnetic tracks specifically, first magnetic track and second magnetic track have data The position of magnetic head installation is identified, and the position that the magnetic head is installed is recorded in card reader, when subsequently swiping the card, according to having known Other head position, is decoded using set form.
For example, after self study mode successfully decoded, if brushing card data is track1, track2 data, illustrate that magnetic head is pacified Mounted in first position;If brushing card data is track2, track3 data, illustrate that magnetic head is arranged on the second place.Judge magnetic head After installation site, designated area inside POS is recorded in using magnetic head installation site as mark.Original state MAG_FLAG is 0, Expression does not determine head position;If it is determined that MAG_FLAG is then arranged to 1 by magnetic head installed in first position;If it is determined that magnetic head MAG_FLAG is then arranged to 2 installed in the second place.
Set form decodes:For in the case of it is determined that the head position of the POS can be obtained, obtaining the POS The information of the head position of machine, the information of the head position of the POS include the information or described second of the first position The information of position;
If the information of the head position of the POS is the information of first position, pass through the first track data lattice Formula coding/decoding method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;First track data Said shank method includes the first track data form direct decoding method and the first track data form inversely decoding side Method, the second track data form coding/decoding method include the second track data form direct decoding method and described second Track data form inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form solution Code method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data form Coding method includes the second track data form direct decoding method and the second track data form inversely decoding method, institute Stating the 3rd track data form coding/decoding method includes the 3rd track data form direct decoding method and the 3rd magnetic track Data format inversely decoding method.
If only having a magnetic track in first magnetic track and second magnetic track there are data, the magnetic stripe card is read Swipe the card result.
Specifically, with reference to figure 4, Fig. 4 is a kind of head position for obtaining point-of-sale terminal POS provided in an embodiment of the present invention Method schematic diagram.As shown in figure 4, it the described method comprises the following steps:
Step 401, user card punching;
Step 402, judge whether head position is identified
Step 403, if head position is identified, decoded according to recognition result using set form
Step 404, if head position is unidentified, self study decoding is carried out
Step 405, self study decoding failure, illustrates to swipe the card unsuccessfully
Step 406, self study successfully decoded, judges whether 2 magnetic tracks have data
If only 1 magnetic track there are data, result of swiping the card only is exported
If 2 magnetic tracks there are data, result of swiping the card is exported, while identify and write head installation site
Alternatively, methods described also includes:
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method obtains the data of the magnetic stripe card, then return to execution and judge whether two magnetic tracks there are data;
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method does not obtain the data of the POS, by the first track data form inversely decoding method and described Second track data form inversely decoding method obtains the data of the POS;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
Alternatively, methods described also includes:
If pass through the first track data form inversely decoding method and the second track data form inversely decoding In the case that method does not obtain the data of the magnetic stripe card, by the second track data form direct decoding method and described 3rd track data form direct decoding method obtains the data of the magnetic stripe card;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
Methods described also includes;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method does not obtain the data of the magnetic stripe card, then passes through the second track data form inversely decoding method and the 3rd magnetic Track data inversely decoding method obtains the data of the magnetic stripe card;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
Specifically, with reference to figure 5, Fig. 5 is a kind of flow chart for self study coding/decoding method that the present invention implements offer.Such as Fig. 5 It is shown, it the described method comprises the following steps:
Step 501, original brushing card data is read;
Step 502, to original brushing card data, using track1, track2 track data form direct decoding;
Step 503, if successfully decoded, result of swiping the card is returned;If decoding failure, to original brushing card data, application Track1, track2 track data form inversely decoding;
Step 504, if successfully decoded, result of swiping the card is returned;If decoding failure, to original brushing card data, application Track2, track3 track data form direct decoding;
Step 505, if successfully decoded, result of swiping the card is returned;If decoding failure, to original brushing card data, application Track2, track3 track data form inversely decoding;
Step 506, if successfully decoded, result of swiping the card is returned;If decoding failure, illustrates initial data mistake, swipes the card Failure;
Step 507, decoded by self study, and though magnetic head be arranged on track1, track2 track location or track2, Track3 track locations, as long as initial data of swiping the card is correct, it can decode brushing card data.
After self study successfully decoded, if 2 magnetic tracks there are data in decoded result, magnetic can determine that according to decoded result Head installation site.After self study mode successfully decoded, if brushing card data is track1, track2 data, illustrate that magnetic head is installed In 1,2 track locations;If brushing card data is track2, track3 data, illustrate that magnetic head is arranged on 2,3 track locations.If There was only a track data after decoding, there may be a head data unidentified or not paint, can not accurately judge that magnetic head is pacified Holding position, only export result of swiping the card.
Alternatively, methods described also includes:
In the case of it is determined that the head position of the POS can be obtained, the letter of the head position of the POS is obtained Breath, the information of the head position of the POS include the information of the first position or the information of the second place;
If the information of the head position of the POS is the information of first position, pass through the first track data lattice Formula coding/decoding method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;First track data Said shank method includes the first track data form direct decoding method and the first track data form inversely decoding side Method, the second track data form coding/decoding method include the second track data form direct decoding method and described second Track data form inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form solution Code method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data form Coding method includes the second track data form direct decoding method and the second track data form inversely decoding method, institute Stating the 3rd track data form coding/decoding method includes the 3rd track data form direct decoding method and the 3rd magnetic track Data format inversely decoding method.
For example, first from POS designated area reading magnetic head installation site mark MAG_FLAG, if MAG_FLAG is 0, table Show and do not judge head position, head position is unknown, it is necessary to which self study coding/decoding method obtains head position;If MAG_FLAG is 1, Show that magnetic head is arranged on first position;If MAG_FLAG is 2, represent that magnetic head is arranged on the second place.
Specifically, with reference to figure 6, Fig. 6 is a kind of flow chart of set form coding/decoding method provided in an embodiment of the present invention.Such as Shown in Fig. 6, it the described method comprises the following steps:
Step 601, the original brushing card data after swiping the card is read;
Step 602, from card reader reading and saving magnetic head installation site mark;
Step 603, if installation site mark is track1, track2 magnetic track, using track1, track2 track data Form decodes;
Step 604, if installation site mark is track2, track3 magnetic track, using track2, track3 track data Form decodes.
The embodiment of the present invention provides a kind of method for the head position for obtaining point-of-sale terminal POS, and methods described passes through true The fixed head position that whether can obtain the POS;In the case of it is determined that failing to obtain the head position of the POS, lead to Cross the data that self study coding/decoding method obtains the magnetic stripe card;If the magnetic stripe card is obtained by the self study coding/decoding method Data, if 2 magnetic tracks (the first magnetic track and the second magnetic track or the second magnetic track and the 3rd magnetic track) there are data, obtain institute The result of swiping the card of magnetic stripe card is stated, and records the head position of the POS magnetic head, therefore, by 2 rail magnetic head adaptive approach, Magnetic head installation site is automatically positioned according to result of swiping the card, solves asking for the different 2 kinds of distinct programs of needs of 2 rail magnetic head installation sites Topic, simplifies production complexity, greatly improves production efficiency.
With reference to figure 7, Fig. 7 is a kind of equipment structure chart of head position for obtaining POS provided in an embodiment of the present invention.Institute Stating the head position of POS includes first position, the second place, and the first position corresponds to the first magnetic track and second of magnetic stripe card Magnetic track, the second place correspond to the second magnetic track and the 3rd magnetic track of the magnetic stripe card.
As shown in fig. 7, the equipment is included with lower unit:
First acquisition unit 701, it is used to determine whether that the head position of the POS can be obtained;
Specifically, with reference to shown in figure 1, the first magnetic track is track1, the second magnetic track is track2, the 3rd magnetic track is Track3, in user's brush magnetic stripe card, judge head position from reading in record, and obtain the head position of the POS.
Second acquisition unit 702, in the case of it is determined that failing to obtain the head position of the POS, passing through institute State the data that self study coding/decoding method obtains magnetic stripe card;
Judging unit 703, if the data for obtaining the magnetic stripe card by the self study coding/decoding method, judge two Whether individual magnetic track has data;
3rd acquiring unit 704, if there are data for described two magnetic tracks, obtain the knot of swiping the card of the magnetic stripe card Fruit, and record the head position of the POS;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained;
The data that the magnetic stripe card is obtained by the self study coding/decoding method are performed in the second acquisition unit, Including:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data Form direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data Form inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data Form direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data Form inversely decoding method decodes to the 3rd magnetic track.
Specifically, with reference to the description of figure 4, will not be repeated here.
Alternatively, the equipment also includes:
First processing units, if for passing through the first track data form direct decoding method and second magnetic track In the case that data format direct decoding method obtains the data of the magnetic stripe card, then return to execution and judge whether two magnetic tracks are equal There are data;
If pass through the first track data form direct decoding method and the second track data form direct decoding In the case that method does not obtain the data of the magnetic stripe card, by the first track data form inversely decoding method and described Second track data form inversely decoding method obtains the data of the magnetic stripe card;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
Alternatively, the equipment also includes:
Second processing unit, if for passing through the first track data form inversely decoding method and second magnetic track In the case that data format inversely decoding method does not obtain the data of the magnetic stripe card, by the second track data form just The data of the magnetic stripe card are obtained to coding/decoding method and the 3rd track data form direct decoding method;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether two magnetic tracks have data.
The equipment also includes:
3rd processing unit, if for passing through the second track data form direct decoding method and the 3rd magnetic track Data format direct decoding method does not obtain the data of the magnetic stripe card, then passes through the second track data form inversely decoding Method and the 3rd track data inversely decoding method obtain the data of the magnetic stripe card;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding Method obtains the data of the magnetic stripe card, then returns to execution and judge whether second magnetic track and the 3rd magnetic track have number According to;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
Specifically, with reference to the description of figure 5, will not be repeated here.
Alternatively, the equipment also includes:
4th acquiring unit, in the case of it is determined that the head position of the POS can be obtained, obtaining the POS The information of the head position of machine, the information of the head position of the POS include the information or described second of the first position The information of position;
If the information of the head position of the POS is the information of first position, pass through the first track data lattice Formula coding/decoding method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;First track data Said shank method includes the first track data form direct decoding method and the first track data form inversely decoding side Method, the second track data form coding/decoding method include the second track data form direct decoding method and described second Track data form inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form solution Code method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data form Coding method includes the second track data form direct decoding method and the second track data form inversely decoding method, institute Stating the 3rd track data form coding/decoding method includes the 3rd track data form direct decoding method and the 3rd magnetic track Data format inversely decoding method.
For example, first from POS designated area reading magnetic head installation site mark MAG_FLAG, if MAG_FLAG is 0, table Show and do not judge head position, head position is unknown, it is necessary to which self study coding/decoding method obtains head position;If MAG_FLAG is 1, Show that magnetic head is arranged on first position;If MAG_FLAG is 2, represent that magnetic head is arranged on the second place.
Specifically, with reference to the description of figure 6, will not be repeated here.
The embodiment of the present invention provides a kind of equipment for the head position for obtaining point-of-sale terminal POS, and the equipment passes through true The fixed head position that whether can obtain the POS;In the case of it is determined that failing to obtain the head position of the POS, lead to Cross the data that self study coding/decoding method obtains the magnetic stripe card;If the magnetic stripe card is obtained by the self study coding/decoding method Data, if 2 magnetic tracks (the first magnetic track and the second magnetic track or the second magnetic track and the 3rd magnetic track) there are data, obtain institute The result of swiping the card of magnetic stripe card is stated, and records the head position of the POS magnetic head, therefore, by 2 rail magnetic head adaptive approach, Magnetic head installation site is automatically positioned according to result of swiping the card, solves asking for the different 2 kinds of distinct programs of needs of 2 rail magnetic head installation sites Topic, simplifies production complexity, greatly improves production efficiency.
The foregoing is only a preferred embodiment of the present invention, but protection scope of the present invention be not limited thereto, Any one skilled in the art the invention discloses technical scope in, the change or replacement that can readily occur in, It should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims It is defined.

Claims (10)

1. a kind of method for the head position for obtaining POS, the head position of the POS include first position, the second place, The first position corresponds to the first magnetic track and the second magnetic track of magnetic stripe card, and the second place corresponds to the second magnetic of the magnetic stripe card Road and the 3rd magnetic track, it is characterised in that methods described includes:
Determine whether to obtain the head position of the POS;
In the case of it is determined that failing to obtain the head position of the POS, the magnetic stripe is obtained by self study coding/decoding method The data of card;
If obtaining the data of the magnetic stripe card by the self study coding/decoding method, judge whether two magnetic tracks there are data;
If described two magnetic tracks there are data, the result of swiping the card of the magnetic stripe card is obtained, and records the magnetic head position of the POS Put;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained;
The data of the magnetic stripe card are obtained by the self study coding/decoding method, including:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data form Direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data form Inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data form Direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data form Inversely decoding method decodes to the 3rd magnetic track.
2. according to the method for claim 1, it is characterised in that methods described also includes:
If pass through the first track data form direct decoding method and the second track data form direct decoding method In the case of the data for obtaining the magnetic stripe card, then return to execution and judge whether two magnetic tracks there are data;
If pass through the first track data form direct decoding method and the second track data form direct decoding method In the case of the data for not obtaining the magnetic stripe card, pass through the first track data form inversely decoding method and described second Track data form inversely decoding method obtains the data of the magnetic stripe card;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether two magnetic tracks there are data.
3. according to the method for claim 2, it is characterised in that methods described also includes:
If pass through the first track data form inversely decoding method and the second track data form inversely decoding method In the case of the data for not obtaining the magnetic stripe card, pass through the second track data form direct decoding method and the described 3rd Track data form direct decoding method obtains the data of the magnetic stripe card;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether two magnetic tracks there are data.
4. according to the method for claim 3, it is characterised in that methods described also includes;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding method The data of the magnetic stripe card are not obtained, then pass through the second track data form inversely decoding method and the 3rd track number The data of the magnetic stripe card are obtained according to inversely decoding method;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether two magnetic tracks there are data;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
5. according to the method described in claim 1-4 any one, it is characterised in that methods described also includes:
In the case of it is determined that the head position of the POS can be obtained, the information of the head position of the POS, institute are obtained Stating the information of the head position of POS includes the information of the first position or the information of the second place;
If the information of the head position of the POS is the information of first position, pass through the first track data form solution Code method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;The first track data form Coding method includes the first track data form direct decoding method and the first track data form inversely decoding method, institute Stating the second track data form coding/decoding method includes the second track data form direct decoding method and second magnetic track Data format inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form decoding side Method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data said shank Method includes the second track data form direct decoding method and the second track data form inversely decoding method, and described Three track data form coding/decoding methods include the 3rd track data form direct decoding method and the 3rd track data Form inversely decoding method.
6. a kind of equipment for the head position for obtaining POS, the head position of the POS include first position, the second place, The first position corresponds to the first magnetic track and the second magnetic track of magnetic stripe card, and the second place corresponds to the second magnetic of the magnetic stripe card Road and the 3rd magnetic track, it is characterised in that the equipment includes:
First acquisition unit, it is used to determine whether that the head position of the POS can be obtained;
Second acquisition unit, in the case of it is determined that failing to obtain the head position of the POS, being decoded by self study Method obtains the data of magnetic stripe card;
Judging unit, if the data for obtaining the magnetic stripe card by the self study coding/decoding method, judge two magnetic tracks Whether data are had;
3rd acquiring unit, if there are data for described two magnetic tracks, the result of swiping the card of the magnetic stripe card is obtained, and recorded The head position of the POS;
If only a magnetic track there are data, the result of swiping the card of the magnetic stripe card is obtained;
The data that the magnetic stripe card is obtained by the self study coding/decoding method, bag are performed in the second acquisition unit Include:
First magnetic track is decoded by the first track data form direct decoding method, and passes through the second track data form Direct decoding method decodes to second magnetic track;Or
First magnetic track is decoded by the first track data form inversely decoding method, and passes through the second track data form Inversely decoding method decodes to second magnetic track;Or
Second magnetic track is decoded by the second track data form direct decoding method, and passes through the 3rd track data form Direct decoding method decodes to the 3rd magnetic track;Or
Second magnetic track is decoded by the second track data form inversely decoding method, and passes through the 3rd track data form Inversely decoding method decodes to the 3rd magnetic track.
7. equipment according to claim 6, it is characterised in that the equipment also includes:
First processing units, if for passing through the first track data form direct decoding method and second track data In the case that form direct decoding method obtains the data of the magnetic stripe card, then return to execution and judge whether two magnetic tracks have number According to;
If pass through the first track data form direct decoding method and the second track data form direct decoding method In the case of the data for not obtaining the magnetic stripe card, pass through the first track data form inversely decoding method and described second Track data form inversely decoding method obtains the data of the magnetic stripe card;
If pass through the first track data form inversely decoding method and the second track data form inversely decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether two magnetic tracks there are data.
8. equipment according to claim 7, it is characterised in that the equipment also includes:
Second processing unit, if for passing through the first track data form inversely decoding method and second track data In the case that form inversely decoding method does not obtain the data of the magnetic stripe card, pass through the second track data form forward solution Code method and the 3rd track data form direct decoding method obtain the data of the magnetic stripe card;
If pass through the second track data form direct decoding method and the 3rd track data form direct decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether two magnetic tracks there are data.
9. equipment according to claim 8, it is characterised in that the equipment also includes:
3rd processing unit, if for passing through the second track data form direct decoding method and the 3rd track data Form direct decoding method does not obtain the data of the magnetic stripe card, then passes through the second track data form inversely decoding method The data of the magnetic stripe card are obtained with the 3rd track data inversely decoding method;
If pass through the second track data form inversely decoding method and the 3rd track data form inversely decoding method The data of the magnetic stripe card are obtained, then returns to execution and judges whether second magnetic track and the 3rd magnetic track there are data;
If not obtaining the data of the magnetic stripe card by the self study coding/decoding method, decoding failure is returned.
10. according to the equipment described in claim 6-9 any one, it is characterised in that the equipment also includes:
4th acquiring unit, in the case of it is determined that the head position of the POS can be obtained, obtaining the POS The information of head position, the information of the head position of the POS include the information of the first position or the second place Information;
If the information of the head position of the POS is the information of first position, pass through the first track data form solution Code method and the second track data form coding/decoding method obtain the data of the magnetic stripe card;The first track data form Coding method includes the first track data form direct decoding method and the first track data form inversely decoding method, institute Stating the second track data form coding/decoding method includes the second track data form direct decoding method and second magnetic track Data format inversely decoding method;
If the information of the head position of the POS is the information of the second place, pass through the second track data form decoding side Method and the 3rd track data form coding/decoding method obtain the data of the magnetic stripe card;The second track data said shank Method includes the second track data form direct decoding method and the second track data form inversely decoding method, and described Three track data form coding/decoding methods include the 3rd track data form direct decoding method and the 3rd track data Form inversely decoding method.
CN201410317148.8A 2014-07-03 2014-07-03 A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS Active CN105321269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410317148.8A CN105321269B (en) 2014-07-03 2014-07-03 A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410317148.8A CN105321269B (en) 2014-07-03 2014-07-03 A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS

Publications (2)

Publication Number Publication Date
CN105321269A CN105321269A (en) 2016-02-10
CN105321269B true CN105321269B (en) 2017-12-01

Family

ID=55248572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410317148.8A Active CN105321269B (en) 2014-07-03 2014-07-03 A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS

Country Status (1)

Country Link
CN (1) CN105321269B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2578942A (en) 2016-12-23 2020-06-03 Walmart Apollo Llc Retail financial system testing system and methods
GB2582474B (en) 2017-11-22 2021-03-24 Walmart Apollo Llc Test card for automated retail financial transaction system
WO2019104023A1 (en) 2017-11-22 2019-05-31 Walmart Apollo, Llc Automated testing systems and methods for point-of-sale terminals

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4185067B2 (en) * 2005-03-30 2008-11-19 株式会社東芝 Head position calculation method in magnetic disk drive
CN201780639U (en) * 2010-07-06 2011-03-30 杭州华冲科技有限公司 Passive magnetic card reader
CN202013614U (en) * 2011-03-25 2011-10-19 公信电子股份有限公司 Improvement of POS terminal and expansion module connecting structure
JP5228079B2 (en) * 2011-04-27 2013-07-03 東芝テック株式会社 Magnetic card reader device
CN102568123B (en) * 2011-12-29 2015-05-13 福建联迪商用设备有限公司 Magnetic head card swiping mechanism and card swiping machine
CN103679970B (en) * 2013-12-19 2016-01-20 深圳市新国都技术股份有限公司 A kind of POS head test method and POS are swiped the card testing apparatus
CN203882391U (en) * 2014-06-16 2014-10-15 苏州柏奥通信科技有限公司 Multifunctional POS machine

Also Published As

Publication number Publication date
CN105321269A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
US7837125B2 (en) Methods and systems for encoding a magnetic stripe
US7938318B2 (en) System and method for controlling secured transaction using directionally coded account identifiers
CN105321269B (en) A kind of method and apparatus for the head position for obtaining point-of-sale terminal POS
JP2015507280A5 (en)
CN103177516B (en) A kind of POS terminal
WO2011047038A3 (en) Systems and methods for card present transaction without sharing card information
CN105205674A (en) Product anti-counterfeiting method based on two-dimensional code
CN104574074A (en) Method and system for real-time payment and collection of payer and beneficiary
CN104715372A (en) Card swiping transaction method
CN113240431A (en) Payment verification method and system based on three primary colors of picture pixels
CN105488925B (en) A kind of Multifunctional mobile pos machines and its application process
CN104969294B (en) Magnetic strip reader with card using information feedback
CN203084839U (en) Double-screen information interaction terminal platform
CN202110614U (en) Mobile paying device, mobile terminal POS (Point Of Sale) and mobile terminal
CN107563735A (en) Information processing method and electronic equipment
CN102930238A (en) Magnetic card decoding and error-correcting method
US20130295547A1 (en) Interactive Study Aids For Use In Association With Text Books
CN102999860A (en) Cellphone two-dimension code based offline consuming method
CN202584167U (en) Multifunctional card reader
CN202870847U (en) Iris IC card identifier
CN109902519A (en) A kind of magnetic stripe coding/decoding method, system and relevant apparatus
CN106157014A (en) A kind of novel auth method
CN110633588A (en) Noise identification method for magnetic stripe card reader
CN101477719A (en) Field management system and method thereof
CN205800573U (en) A kind of Anti-counterfeiting passbook

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Nanshan District Keyuan Road Shenzhen city Guangdong province 518000 No. 11 Financial Technology Building A block fourteen layer AB unit

Applicant after: New Pos Technology Limited

Address before: Nanshan District Keyuan Road Shenzhen city Guangdong province 518000 No. 11 Financial Technology Building A block fourteen layer AB unit

Applicant before: Shenzhen New Pos Technology Ltd.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant