CN107066906B - Magnetic stripe card decoding method and device - Google Patents

Magnetic stripe card decoding method and device Download PDF

Info

Publication number
CN107066906B
CN107066906B CN201710012751.9A CN201710012751A CN107066906B CN 107066906 B CN107066906 B CN 107066906B CN 201710012751 A CN201710012751 A CN 201710012751A CN 107066906 B CN107066906 B CN 107066906B
Authority
CN
China
Prior art keywords
sampling
point
peak point
value
current
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
CN201710012751.9A
Other languages
Chinese (zh)
Other versions
CN107066906A (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.)
BEIJING INFORMATION TECHNOLOGY COLLEGE
Original Assignee
BEIJING INFORMATION TECHNOLOGY COLLEGE
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 BEIJING INFORMATION TECHNOLOGY COLLEGE filed Critical BEIJING INFORMATION TECHNOLOGY COLLEGE
Priority to CN201710012751.9A priority Critical patent/CN107066906B/en
Publication of CN107066906A publication Critical patent/CN107066906A/en
Application granted granted Critical
Publication of CN107066906B publication Critical patent/CN107066906B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/08Methods or arrangements for sensing record carriers, e.g. for reading patterns by means detecting the change of an electrostatic or magnetic field, e.g. by detecting change of capacitance between electrodes
    • G06K7/082Methods or arrangements for sensing record carriers, e.g. for reading patterns by means detecting the change of an electrostatic or magnetic field, e.g. by detecting change of capacitance between electrodes using inductive or magnetic sensors

Abstract

The embodiment of the invention discloses a magnetic stripe card decoding method and device. The method comprises the following steps: step S1, in the decoding process, obtaining the duration of N decoded bits; step S2, obtaining the estimated value of the duration T of the bit corresponding to the current peak point according to the duration of the N decoded bits; step S3, acquiring the sampling starting point of the current peak point evaluation process according to the estimation value; step S5, obtaining the position of the current peak point according to the estimated value and the starting point; and step S6, decoding the magnetic stripe card signal according to the position of the current peak point. The embodiment of the invention estimates the duration time T of the bit corresponding to the current peak point based on the duration time T of the historical bit in the decoding process, determines the position of the current peak point based on the estimated duration time of the bit and a first preset rule, and performs decoding operation based on the determined position of the peak point.

Description

Magnetic stripe card decoding method and device
Technical Field
The embodiment of the invention relates to the technical field of signal processing, in particular to a magnetic stripe card decoding method and device.
Background
The magnetic stripe card has wide application field and can be made into bank cards, membership cards, road payment cards and the like. It is actually an identification card made using magnetic material. An identification card is a card that is tagged with cardholder and issuer information. The magnetic stripe card has front side made of PVC, poly-cool film or composite paper and back side with magnetic stripe, and has front side printed with prompter information of card issuing bank name, card holder name, effective period, etc. and back side printed with information of card issuing bank service telephone, card holder signature strip, card holder statement, etc.
Generally, a magnetic card used in a banking system has 3 independent tracks on the magnetic stripe on the back surface, that is, a Track 1(Track1), a Track 2(Track2), and a Track 3(Track3), and the distribution of the 3 tracks is as shown in fig. 1. According to different application requirements, some magnetic cards only use two magnetic tracks, and most of the magnetic stripe cards only use 2 and 3 magnetic tracks at present.
The widths of the three magnetic tracks are about 2.80 mm, and are used for recording various data information of a user, and a gap of about 0.05 mm is reserved between two adjacent magnetic tracks to distinguish the two adjacent magnetic tracks, so that the total width of the magnetic strip is about 10.29 mm (assuming that a magnetic card with 3 magnetic tracks is used) or about 6.35 mm (assuming that a magnetic card with 2 magnetic tracks is used). In actual life, the width of the magnetic strips on the bank magnetic card used by people is increased by about 1-2 mm, and the total width of the magnetic strips is 12-13 mm.
Generally, two adjacent periods T of the F2F signal will dynamically change with the card speed. In a bit window T, no electrode jump is 0, and electrode jump is 1, and the start edge and the end edge of each bit window have jumps. Each bit window T of the analog signal will vary dynamically with the speed of the card swipe. However, the dynamic range is within a certain threshold, and exceeding this threshold indicates significant jitter or retention in the swiping process.
Accurate conversion of the analog signal read by the head into the F2F signal is one of the keys to enabling accurate reading of the magnetic stripe card information. The decoding of the F2F signal is more accurate if the position of the peak point can be accurately determined in the analog signal.
In the process of implementing the embodiment of the invention, the inventor finds that the existing peak point position judgment method has poor accuracy, and further influences the decoding accuracy of the magnetic stripe card.
Disclosure of Invention
One purpose of the embodiments of the present invention is to solve the problem that the accuracy of the peak point position determination method in the prior art is poor, which affects the decoding accuracy of the magnetic stripe card.
The embodiment of the invention provides a magnetic stripe card decoding method, which comprises the following steps:
step S1, in the decoding process, obtaining the duration of N decoded bits;
step S2, obtaining the estimated value of the duration T of the bit corresponding to the current peak point according to the duration of the N decoded bits;
step S3, acquiring the sampling starting point of the current peak point evaluation process according to the estimation value;
step S5, obtaining the position of the current peak point according to the estimated value and the starting point;
and step S6, decoding the magnetic stripe card signal according to the position of the current peak point.
Optionally, the step S3 specifically includes:
acquiring a sampling value of the starting point according to the estimated value and a first preset rule;
acquiring the position of the starting point according to the sampling value of the starting point;
the starting point is the position where a first section line parallel to the axis and corresponding to the sampling value of the starting point intersect with the waveform of the magnetic stripe card signal.
Optionally, before step S5, the method includes:
step S4, obtaining the sampling value of the sampling point corresponding to the next section line according to the sampling value of the sampling point corresponding to the previous section line and by combining the preset interval value.
Optionally, the step S5 specifically includes:
in the sampling process, monitoring the number of sampling section lines which are finished and correspond to the current sampling points in real time;
if the number of the sampling section lines which are obtained after the sampling is judged to be less than the preset threshold value and 5/4T is reached between the current sampling point and the previous peak point, returning to execute the step S4;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
Optionally, if it is determined that 3/8T is reached between the current sampling point and the current peak point, the current sampling point is used as a starting point of sampling in a process of evaluating a next peak point.
The embodiment of the invention provides a magnetic stripe card decoding device, which comprises:
an obtaining module, configured to obtain, during a decoding process, a duration of N decoded bits;
the first processing module is used for obtaining an estimated value of the duration time T of the bit corresponding to the current peak point according to the duration time of the N decoded bits;
the second processing module is used for acquiring a sampling starting point of the current peak point evaluation process according to the estimation value;
the third processing module is used for acquiring the position of the current peak point according to the estimated value and the starting point;
and the decoding module is used for decoding the magnetic stripe card signal according to the position of the current peak point.
Optionally, the second processing module is configured to obtain a sampling value of the starting point according to the estimated value and a first preset rule; acquiring the position of the starting point according to the sampling value of the starting point;
the starting point is the position where a first section line parallel to the axis and corresponding to the sampling value of the starting point intersect with the waveform of the magnetic stripe card signal.
Optionally, the apparatus further comprises: a section line setting module;
and the transversal setting module is used for acquiring the sampling value of the sampling point corresponding to the next transversal by combining a preset interval value according to the sampling value of the sampling point corresponding to the previous transversal.
Optionally, the third processing module is configured to monitor, in real time, the number of sampling stubs corresponding to a current sampling point in a sampling process;
if the number of the sampling section lines which are obtained after the sampling is judged to be less than the preset threshold value and 5/4T is reached between the current sampling point and the previous peak point, returning to execute the step S4;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
Optionally, the third processing module is further configured to, if it is determined that 3/8T is reached between the current sampling point and the current peak point, use the current sampling point as a starting point of sampling in a process of evaluating a next peak point.
As can be seen from the foregoing technical solutions, in the magnetic stripe card decoding method and apparatus provided in the embodiments of the present invention, the duration T of a bit corresponding to a current peak point is estimated based on the duration T of a historical bit in a decoding process, the position of the current peak point is determined based on the estimated duration of the bit and a first preset rule, and a decoding operation is performed based on the determined position of the peak point.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:
FIG. 1 illustrates a track profile of a prior art magnetic stripe card;
FIG. 2 is a flow chart illustrating a method for decoding a magnetic stripe card according to an embodiment of the present invention;
3 a-3 f are schematic flow diagrams illustrating a magnetic stripe card decoding method according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a magnetic stripe card decoding device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a magnetic stripe card decoding device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Fig. 2 is a schematic flow chart illustrating a magnetic stripe card decoding method according to an embodiment of the present invention, and referring to fig. 2, the method may be performed by a processor in a decoder, and specifically includes the following steps:
step S1, in the decoding process, obtaining the duration of N decoded bits;
step S2, obtaining the estimated value of the duration T of the bit corresponding to the current peak point according to the duration of the N decoded bits;
it is understood that the current peak point may be a positive peak point in the waveform of the magnetic stripe card signal, wherein the duration T of the bit corresponding to the current peak point is a bit window T.
In addition, according to the duration of the N decoded bits in the historical decoding data, a bit window T corresponding to the current peak point is calculated and obtained by means of averaging and the like.
Step S3, acquiring the sampling starting point of the current peak point evaluation process according to the estimation value;
step S5, obtaining the position of the current peak point according to the estimated value and the starting point;
and step S6, decoding the magnetic stripe card signal according to the position of the current peak point.
As can be seen, in the present embodiment, the duration T of the bit corresponding to the current peak point is estimated based on the duration T of the historical bit in the decoding process, the position of the current peak point is determined based on the estimated duration of the bit and the first preset rule, and the decoding operation is performed based on the determined position of the peak point.
The following describes the steps in this example in detail:
step S3 specifically includes: acquiring a sampling value of the starting point according to the estimated value and a first preset rule; acquiring the position of the starting point according to the sampling value of the starting point;
the starting point is the position where a first section line parallel to the axis and corresponding to the sampling value of the starting point intersect with the waveform of the magnetic stripe card signal.
Then, in step S4, the sampling value of the sampling point corresponding to the next transversal is obtained by combining the preset interval value with the sampling value of the sampling point corresponding to the previous transversal.
Correspondingly, step S5 specifically includes:
in the sampling process, monitoring the number of sampling section lines which are finished and correspond to the current sampling points in real time;
if the number of the sampling section lines which are obtained after the sampling is judged to be less than the preset threshold value and 5/4T is reached between the current sampling point and the previous peak point, returning to execute the step S4;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
Further, if it is judged and known that the distance between the current sampling point and the current peak point reaches 3/8T, the current sampling point is used as the starting point of sampling in the process of evaluating the next peak point.
Fig. 3a to 3f are schematic flow charts illustrating a magnetic stripe card decoding method according to another embodiment of the present invention, and referring to fig. 3a to 3f, the method includes:
if the determination of the position of the current peak point (the new peak point to be evaluated in fig. 3 a) is implemented, the duration of the bit corresponding to the current peak point (the position indicated by "the new peak point to be evaluated" in fig. 3 a) (i.e. T1 and T2 in fig. 3 a) needs to be estimated first, assuming that the estimated value is T, the estimated value is generally predicted by the duration of several decoded bits before the new peak point and the decoding result (for example, the average of the previous four bit durations is taken as the estimated value, and other prediction models can be used for estimation). In fact the number of sample points, from the data shown in fig. 3a, the estimated values of T1 and T2 for the new peak point are 99, meaning that the duration of one bit is the time that 99 sample points last), which is not accurate and from which the exact position of the peak point cannot be derived, whereas the previous peak point, which has been obtained by the decision method described herein, is known and accurate, and the resulting duration of the bit and the decoding result are also accurate. Although the estimated bit duration is not used to directly estimate the peak point, it is necessary to use it to complete the peak point estimation process, in which the estimated value of the bit duration is used to determine the start and end points of the estimation process, which is critical to correctly estimate the peak point, and is also a critical parameter for decoding. T in the "Peak Point evaluation procedure" below is the bit duration estimate T described herein.
The determination of the peak point position needs to be implemented by the following "peak point evaluation process", which specifically includes the following operations:
referring to fig. 3b, the end point of the peak point evaluation process is used as the starting point of the next peak point evaluation process, it is first determined whether the transversal completion counter value reaches the number m, if so, the search process stops, otherwise, it is determined whether 5/4T sample points have been reached between the previous peak point and the currently read sample point, if 5/4T sample points have been reached, the search process stops, new peak points are evaluated, if the current sample point has exceeded the new peak point 3/8T, then the current sample point is taken as the starting point of the next peak point estimation process, otherwise, the current sample point is advanced to a position 3/8T away from the new peak point as the starting point of the next peak point estimation process, from which point the next peak point estimation process is performed, which is also the ending point of the current peak point estimation process. As shown in fig. 3b, 5/4T sample points are located between points a and E, 3/8T sample points are located between points C and F, if m is set to be 4, the search process ends at point D, if m is 5 or m is greater than 5, the search process ends at point E, and after the search process ends, if point F is located on the right side of D and E (as shown in fig. 3 b), point F is the starting point of the next peak point evaluation process.
(1) The sampling value at the starting point is set as a threshold value a (1), the intersection value a (1) with the vertical axis is taken as a section line 1 parallel to the horizontal axis, that is, y is equal to a (1), the section line intersects with the waveform at a point M (1) and a point N (1), the point M (1) is also the starting point, and the position is recorded as ps (1). The counter c (1) corresponds to the line 1, the value of c (1) is 1, and the threshold a (2) corresponding to the next line 2 is set, where a (2) is a (1) + Δ (1). As shown in fig. 3 c.
(2) And (4) if the transversal completion counter value does not reach the number m and 5/4T sampling points are not reached between the previous peak point and the current sampling point, performing the step (3), otherwise, stopping the searching process and jumping to the step (5).
(3) Assuming that the nth stub has already been made, the threshold corresponding to the next stub, i.e., the N +1 th stub, is a (N +1), where a (N +1) ═ a (N) + Δ (N). Reading the current sampling point value, if the sampling point value is > ═ a (N +1), intersecting point value a (N +1) with the vertical axis, making a transversal line N +1 parallel to the horizontal axis, intersecting the waveform at point M (N +1) and point N (N +1), recording the position as ps (N +1), and setting the transversal line N +1 to be corresponding to counter c (N +1), setting the value of c (N +1) to be 0, updating threshold value a (N +2) corresponding to next transversal line N +2, and setting a (N +2) ═ a (N +1) + Δ (N +1), as shown in fig. 3 d. The sampling point value is compared with all the existing transversal lines, if the sampling point is above the transversal line, the corresponding transversal counter value is added with 1, namely c (1), c (2),.. once, c (N +1), if the sampling point is above the transversal line, 1 is added as long as the sampling point is above the corresponding transversal line, as shown in fig. 3d, if the sampling point is below the transversal line and the corresponding transversal counter value is greater than 0, the position is recorded as the end point of the transversal line, pe (N +1) is recorded, the transversal completion counter value is added with 1, and the updating is carried out, as shown in fig. 3 e.
(4) And (4) repeating the step (2) and the step (3).
(5) And evaluating a new peak point, if the current sampling point exceeds the new peak point 3/8T, taking the current sampling point as the starting point of the next peak point evaluation process, and if not, advancing to a position 3/8T away from the new peak point as the starting point of the next peak point evaluation process, which is also the ending point of the peak point evaluation process. As shown in fig. 3 b.
(5) The new peak point is obtained by summing and averaging all the start point positions and the end point positions of the finished transversal, such as ps (4), ps (5), ps (6), ps (7), pe (4), pe (5), pe (6), and pe (7) in fig. 3f, and the new peak point position can be obtained by summing and averaging the 8 values and then taking an integer, or by adopting other weighting methods.
In the specific implementation process, the maximum number of the stubs can be limited, and the stubs can be recycled, so as to save memory resources, but the algorithm complexity is increased.
Fig. 4 is a schematic structural diagram of a magnetic stripe card decoding apparatus according to an embodiment of the present invention, and referring to fig. 4, the apparatus includes: an obtaining module 410, a first processing module 420, a second processing module 430, a third processing module 440, and a decoding module 450;
an obtaining module 410, configured to obtain, during a decoding process, a duration of N decoded bits;
a first processing module 420, configured to obtain an estimated value of a duration T of a bit corresponding to a current peak point according to the durations of the N decoded bits;
a second processing module 430, configured to obtain a starting point of sampling in a process of evaluating a current peak point according to the estimation value;
a third processing module 440, configured to obtain a position of a current peak point according to the estimated value and the starting point;
and the decoding module 450 is configured to decode the magnetic stripe card signal according to the position of the current peak point.
It should be noted that, during the decoding process, the obtaining module 410 obtains the duration of N decoded bits, and sends the obtained data to the first processing module 420, the first processing module 420 estimates the duration T of the bit corresponding to the current peak point according to the received data, and transmits the estimated T to the second processing module 430 and the third processing module 440, the second processing module 430 evaluates the start point of the current peak point based on the acquired duration T, and transmits the estimated start point to the third processing module 440, determines the position of the current peak point by the third processing module 440 based on the estimated value of T and the estimated position of the start point and a preset rule, and sends the determined position of the current peak point to the decoding module 450, and the decoding module 450 performs the current decoding operation based on the determined position of the current peak point.
As can be seen, in the present embodiment, the duration T of the bit corresponding to the current peak point is estimated based on the duration T of the historical bit in the decoding process, the position of the current peak point is determined based on the estimated duration of the bit and the first preset rule, and the decoding operation is performed based on the determined position of the peak point.
Fig. 5 is a schematic structural diagram of a magnetic stripe card decoding device according to another embodiment of the present invention, and referring to fig. 5, the device includes: an obtaining module 510, a first processing module 520, a second processing module 530, a stub setting module 540, a third processing module 550, and a decoding module 560, wherein;
the obtaining module 510, the first processing module 520, the second processing module 530, the third processing module 550, and the decoding module 560 are the same as the obtaining module 410, the first processing module 420, the second processing module 430, the third processing module 440, and the decoding module 450 in the corresponding embodiment of fig. 4, and the working principles thereof are the same, so that the description thereof is omitted here.
In this embodiment, the second processing module 430 obtains the sampling value of the starting point according to the estimated value and a first preset rule; acquiring the position of the starting point according to the sampling value of the starting point;
the starting point is the position where a first section line parallel to the axis and corresponding to the sampling value of the starting point intersect with the waveform of the magnetic stripe card signal.
The transversal setting module 540 is configured to obtain a sampling value of a sampling point corresponding to a next transversal by combining a preset interval value according to the sampling value of the sampling point corresponding to the previous transversal.
Correspondingly, the third processing module 550 is specifically configured to monitor, in real time, the number of sampling stubs that have been completed and correspond to the current sampling point in the sampling process;
if the number of the sampling section lines which are obtained after the sampling is judged to be less than the preset threshold value and 5/4T is reached between the current sampling point and the previous peak point, returning to execute the step S4;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
And if judging and knowing that the distance between the current sampling point and the current peak point reaches 3/8T, taking the current sampling point as the starting point of sampling in the process of evaluating the next peak point.
For the above-mentioned embodiments, the method embodiments are described as a series of acts for simplicity, but those skilled in the art should understand that the embodiments are not limited by the described order of acts, because some steps may be performed in other orders or simultaneously according to the embodiments. Furthermore, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
As for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should be noted that, in the respective components of the apparatus of the present invention, the components therein are logically divided according to the functions to be implemented thereof, but the present invention is not limited thereto, and the respective components may be newly divided or combined as necessary.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. In the device, the PC remotely controls the equipment or the device through the Internet, and accurately controls each operation step of the equipment or the device. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. The program for implementing the present invention can be stored on a computer-readable medium, and the file or document generated by the program has statistics, data report and cpk report are generated, and the program can be tested and counted in batch. It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (2)

1. A magnetic stripe card decoding method, comprising:
step S1, in the decoding process, obtaining the duration of N decoded bits;
step S2, obtaining the estimated value of the duration T of the bit corresponding to the current peak point according to the duration of the N decoded bits;
step S3, acquiring the sampling starting point of the current peak point evaluation process according to the estimation value;
step S4, obtaining the sampling value of the sampling point corresponding to the next section line according to the sampling value of the sampling point corresponding to the previous section line by combining a preset interval value;
step S5, obtaining the position of the current peak point according to the estimated value and the starting point;
s6, decoding the magnetic stripe card signal according to the position of the current peak point;
the step S3 specifically includes:
acquiring the position of the starting point according to the estimated value and a first preset rule;
the position of the starting point is the intersection position of a first section line parallel to the axis and corresponding to the sampling value of the starting point and the waveform of the magnetic stripe card signal;
wherein, the first preset rule is as follows: judging whether 5/4T sampling points are reached between the previous peak point and the currently read sampling point, if 5/4T sampling points are reached, stopping the searching process, and estimating a new peak point, if the current sampling point exceeds 3/8T, taking the current sampling point as the starting point of the next peak point estimating process, otherwise, advancing to the position 3/8T away from the new peak point as the starting point of the next peak point estimating process, and performing the next peak point estimating process from the point, wherein the point is also the ending point of the current peak point estimating process;
the step S5 specifically includes:
in the sampling process, monitoring the number of sampling section lines which are finished and correspond to the current sampling points in real time;
if the number of the sampling section lines which are obtained after the sampling is judged to be smaller than the preset threshold value and the number of the sampling points between the current sampling point and the previous peak point does not reach 5/4T, returning to execute the step S4;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
2. A magnetic stripe card decoding apparatus, comprising:
an obtaining module, configured to obtain, during a decoding process, a duration of N decoded bits;
the first processing module is used for obtaining an estimated value of the duration time T of the bit corresponding to the current peak point according to the duration time of the N decoded bits;
the second processing module is used for acquiring a sampling starting point of the current peak point evaluation process according to the estimation value;
the transversal setting module is used for acquiring the sampling value of the sampling point corresponding to the next transversal by combining a preset interval value according to the sampling value of the sampling point corresponding to the previous transversal;
the third processing module is used for acquiring the position of the current peak point according to the estimated value and the starting point;
the decoding module is used for decoding the magnetic stripe card signal according to the position of the current peak point;
the second processing module is configured to obtain a sampling start point of a process of evaluating a current peak point according to the estimation value, and includes: acquiring the position of the starting point according to the estimated value and a first preset rule;
the position of the starting point is the intersection position of a first section line parallel to the axis and corresponding to the sampling value of the starting point and the waveform of the magnetic stripe card signal;
wherein, the first preset rule is as follows: judging whether 5/4T sampling points are reached between the previous peak point and the currently read sampling point, if 5/4T sampling points are reached, stopping the searching process, and estimating a new peak point, if the current sampling point exceeds 3/8T, taking the current sampling point as the starting point of the next peak point estimating process, otherwise, advancing to the position 3/8T away from the new peak point as the starting point of the next peak point estimating process, and performing the next peak point estimating process from the point, wherein the point is also the ending point of the current peak point estimating process;
the third processing module is configured to obtain a position of a current peak point according to the estimated value and the starting point, and includes: in the sampling process, monitoring the number of sampling section lines which are finished and correspond to the current sampling points in real time;
if the number of the sampling section lines which are obtained after the sampling is judged and known to be smaller than the preset threshold value and the number of the sampling points between the current sampling point and the previous peak point does not reach 5/4T, returning to the section line setting module to obtain the sampling values;
if not, stopping sampling, and acquiring the position of the current peak point according to the sampling value of the sampling point corresponding to the intersection position of the sampling section line and the signal waveform.
CN201710012751.9A 2017-01-09 2017-01-09 Magnetic stripe card decoding method and device Active CN107066906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710012751.9A CN107066906B (en) 2017-01-09 2017-01-09 Magnetic stripe card decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710012751.9A CN107066906B (en) 2017-01-09 2017-01-09 Magnetic stripe card decoding method and device

Publications (2)

Publication Number Publication Date
CN107066906A CN107066906A (en) 2017-08-18
CN107066906B true CN107066906B (en) 2020-01-10

Family

ID=59623665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710012751.9A Active CN107066906B (en) 2017-01-09 2017-01-09 Magnetic stripe card decoding method and device

Country Status (1)

Country Link
CN (1) CN107066906B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734036B (en) * 2018-05-18 2021-05-11 深圳昂瑞微电子技术有限公司 Decoding method and device for magnetic stripe card
CN110647776B (en) * 2019-09-12 2023-03-14 兆讯恒达科技股份有限公司 Magnetic stripe card decoding method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7837110B1 (en) * 2005-05-28 2010-11-23 Maxim Integrated Products, Inc. Magnetic stripe reader having digital peak detector
CN102324012A (en) * 2011-08-26 2012-01-18 深圳盒子支付信息技术有限公司 Magnetic card data reading method, apparatus thereof and mobile POS machine
CN102722690A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magcard decoding method
CN102722686A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magnetic card decoding method
CN104205222A (en) * 2012-08-30 2014-12-10 日本电产三协株式会社 Data demodulation device, data demodulation method, reproduction device for magnetically recorded data, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7837110B1 (en) * 2005-05-28 2010-11-23 Maxim Integrated Products, Inc. Magnetic stripe reader having digital peak detector
CN102324012A (en) * 2011-08-26 2012-01-18 深圳盒子支付信息技术有限公司 Magnetic card data reading method, apparatus thereof and mobile POS machine
CN102722690A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magcard decoding method
CN102722686A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magnetic card decoding method
CN104205222A (en) * 2012-08-30 2014-12-10 日本电产三协株式会社 Data demodulation device, data demodulation method, reproduction device for magnetically recorded data, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于GMR传感器三磁道磁卡读卡器设计;刘雯;《传感器与微系统》;20150720;第34卷(第7期);第54-59页 *

Also Published As

Publication number Publication date
CN107066906A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
WO2021174811A1 (en) Prediction method and prediction apparatus for traffic flow time series
JP2015230727A5 (en)
JP4515332B2 (en) Image processing apparatus and target area tracking program
EP2899671A1 (en) Identification method and device for target object in image
US11132584B2 (en) Model reselection for accommodating unsatisfactory training data
US10255673B2 (en) Apparatus and method for detecting object in image, and apparatus and method for computer-aided diagnosis
CN109447025B (en) Fatigue detection method, device, system and computer readable storage medium
JP5072102B2 (en) Age estimation method and age estimation device
CN107066906B (en) Magnetic stripe card decoding method and device
US9684582B2 (en) Automatically analyzing operation sequences
CN104111073A (en) Method and device for identifying inaccurate paths in map data
US20220310051A1 (en) Rhythm Point Detection Method and Apparatus and Electronic Device
CN104049760A (en) Obtaining method and system of man-machine interaction instruction
CN113888446A (en) Intelligent detection method for bending line of sheet metal structural part
CN102368076B (en) Card feeding speed testing method and device
CN106997443A (en) Magnetic stripe card coding/decoding method and device
CN105718462B (en) Cheating detection method and device for application operation
CN116450881B (en) Method and device for recommending interest segment labels based on user preference and electronic equipment
CN108846339A (en) A kind of character recognition method, device, electronic equipment and storage medium
CN108133116A (en) CAD floor plan wall thickness automatic identifying methods and system
TWI694344B (en) Apparatus and method for detecting impact factor for an operating environment
CN105488061A (en) Method and device for verifying validity of data
US9779698B2 (en) Information processing method and electronic device
CN113051975B (en) People flow statistics method and related products
CN111737677A (en) Method and device for detecting user verification behavior

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