CN106997443A - Magnetic stripe card coding/decoding method and device - Google Patents

Magnetic stripe card coding/decoding method and device Download PDF

Info

Publication number
CN106997443A
CN106997443A CN201710012550.9A CN201710012550A CN106997443A CN 106997443 A CN106997443 A CN 106997443A CN 201710012550 A CN201710012550 A CN 201710012550A CN 106997443 A CN106997443 A CN 106997443A
Authority
CN
China
Prior art keywords
point
peak
positive
negative
interval
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.)
Granted
Application number
CN201710012550.9A
Other languages
Chinese (zh)
Other versions
CN106997443B (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 CN201710012550.9A priority Critical patent/CN106997443B/en
Publication of CN106997443A publication Critical patent/CN106997443A/en
Application granted granted Critical
Publication of CN106997443B publication Critical patent/CN106997443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06K7/083Methods 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 inductive
    • G06K7/084Methods 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 inductive sensing magnetic material by relative movement detecting flux changes without altering its magnetised state

Landscapes

  • Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses a kind of magnetic stripe card coding/decoding method and device.Method includes:Step S1, the signal for obtaining the magnetic stripe card that magnetic head is read;Step S2, the signal waveform to the signal are analyzed, and obtain the amplitude and WFS of two neighboring zero extreme point;Step S3, according to two neighboring zero extreme point amplitude and WFS obtain position window;Step S4, according to the position window of acquisition the signal is decoded.The embodiment of the present invention is by analyzing signal waveform, adaptively to estimate a window, and the position window based on estimation is decoded, compared with using the scheme of identical bits window in the prior art, can effectively put forward the estimated accuracy of high-window, and then raising is decoded into power.

Description

Magnetic stripe card coding/decoding method and device
Technical field
The present embodiments relate to signal processing technology field, and in particular to a kind of magnetic stripe card coding/decoding method and device.
Background technology
The application field of magnetic stripe card is quite varied, can make as bank card, member card, highway paying card etc..It A kind of tag card being actually made using magnetic material.So-called tag card is exactly that marked holder and publisher's letter The card of breath.The front of magnetic stripe card is made up of polyvinyl chloride, poly- cruel film or extrusion coating paper, and its reverse side is then one with magnetic stripe Face, it is indicative that the front that magnetic card is made by magnetic material is typically printed on issuing bank's title, holder name, period of validity etc. Information, reverse side be typically printed with issuing bank's Service Phone, cardholder signature bar, ard issuers statement etc. information.
In general, the magnetic card used in banking system, the magnetic stripe of its reverse side has 3 independent magnetic tracks, is respectively Magnetic track 1 (Track1), magnetic track 2 (Track2) and magnetic track 3 (Track3), the distribution of 3 magnetic tracks are as shown in Figure 1.According to different Application demand, some magnetic cards have only used two of which magnetic track, and current most of magnetic stripe cards have all only used 2,3 magnetic tracks.
Wherein, the width of three magnetic tracks is identical, is 2.80 millimeters, the various data messages for recording user, About 0.05 millimeter of gap between two adjacent magnetic tracks, for distinguishing two adjacent magnetic tracks, therefore, magnetic stripe it is total Width is 10.29 millimeters (on condition that magnetic card that 3 magnetic tracks are all used) or is 6.35 millimeters (on condition that using 2 The magnetic card of individual magnetic track).In real life, the width of magnetic stripe can all increase by 1~2 millimeter on bank magnetic stripe card used in us Left and right, the overall width of magnetic stripe is at 12~13 millimeters.
In general, in the beginning and end of magnetic stripe card it is made up of several bits " 0 ", the number of bit " 0 " is big More at more than ten or tens, these bits " 0 " are the decodings for being designed specifically to aid in magnetic stripe card, and we play these Bit " 0 " amplification of beginning, such as Fig. 2 illustrates 8 bits " 0 " most started, and (person of swiping the card is at the uniform velocity preferably swiping the card under state Swipe the card, this is impossible in practice), each bit " 0 " duration of beginning and end is identical, The duration that namely Fig. 2 is represented be T, also referred to as position window T, due to sample rate be it is fixed, therefore, each bit " 0 " The points that waveform is sampled are consistent, and generally we are sampled points come table in decoding algorithm with each bit pattern Show the duration T of each bit.In magnetic stripe card decoding algorithm, typically carried out using these bits " 0 " for starting of swiping the card Position window T (being sampled points of the duration of a bit, i.e. each bit pattern) estimation, we are this process It is referred to as synchronous, only after synchronization, the position window T of estimation is obtained, the search that peak point is searched in decoding process is just can determine that Window (search halt), also only accurately determines a window T, can accurately decode, therefore the synchronous solution for magnetic stripe card It is most important for code.
During the embodiment of the present invention is realized, inventor find due to being swiped the card in magnetic stripe card at the beginning of, speed compared with Low, amplitude is smaller, and is easily interfered, therefore signal to noise ratio is relatively low, in addition, speed of swiping the card can change with gesture, leads The position window T of these bits " 0 " of the initial segment is caused constantly to change, these factor collective effects together, may result in and estimate When counting position window T, the degree of accuracy is affected, and directly influences the success rate of decoding.
The content of the invention
One purpose of the embodiment of the present invention is to solve the side that prior art carries out magnetic stripe card decoding using identical bits window Case, causes a window estimated accuracy low, and then causes and be decoded into the problem of power is low.
The embodiment of the present invention proposes a kind of magnetic stripe card coding/decoding method, including:
Step S1, the signal for obtaining the magnetic stripe card that magnetic head is read;
Step S2, the signal waveform to the signal are analyzed, and obtain the amplitude and ripple of two neighboring zero extreme point Shape interval;
Step S3, according to two neighboring zero extreme point amplitude and WFS obtain position window;
Step S4, decoded according to the position window correspondence signal of acquisition.
Optionally, the step S2 is specifically included:
Signal waveform to the signal carries out the data origination that analysis obtains the signal;
First positive peak point, the first negative peak point, the second positive peak point, the are obtained according to the data origination of the signal 2 negative peak points, the 3rd positive peak point ..., N positive peaks point, the range value of N negative peaks point;
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd posivtive spike Value point ..., N positive peaks point, the range value of N negative peaks point, obtain the absolute value of each range value.
Optionally, the step S2 is specifically included:
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd posivtive spike Value point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak intervals;
The first positive peak mesial point corresponding with the first positive peak point is obtained according to the amplitude of the first positive peak point Position and the first negative peak mesial point position;
According to the first positive peak point amplitude and the amplitude of the first negative peak point obtain the second negative peak mesial point position and Second positive peak mesial point position;
The is obtained according to the first positive peak point amplitude, the amplitude of the first negative peak point and the second positive peak point amplitude Three positive peak mesial point positions and the 3rd negative peak mesial point position;By that analogy, each positive peak mesial point position and minus half peak value are obtained The position of point;
Positive half value point interval is obtained according to the positive peak mesial point position;Born according to the negative peak mesial point position Half value point interval.
Optionally, the step S2 is specifically included:
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd posivtive spike Value point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak intervals;
The first negative peak mesial point corresponding with the first negative peak point is obtained according to the amplitude of the first negative peak point Position and the first positive peak mesial point position;
According to the first negative peak point amplitude and the amplitude of the first positive peak point obtain the second negative peak mesial point position and Second positive peak mesial point position;According to the first negative peak point amplitude, the amplitude of the first positive peak point and the second negative peak point Amplitude obtain the 3rd positive peak mesial point position and the 3rd negative peak mesial point position ..., obtain the positive peak mesial point positions of N and N bears peak mesial point position;
Positive half value point interval is obtained according to each positive peak mesial point position;Negative half value is obtained according to each negative peak mesial point position Point interval.
Optionally, before step S3, methods described also includes:
The first preset requirement criterion whether is met between the absolute value for judging the positive and negative peak point amplitude obtained;
If so, then judging the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and described negative half Whether value point interval meets the second preset requirement criterion;
If so, then performing the step S3.
Optionally, the step S3 is specifically included:
The positive half value point interval and described negative half according to the positive half value point interval and the negative half value point interval acquiring The average at value point interval;
Obtain between the peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point Every mean of mean;
The peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and described negative half are obtained by described Value point interval mean of mean round after as position window.
The embodiment of the present invention provides a kind of magnetic stripe card decoding apparatus, including:
Acquisition module, the signal of the magnetic stripe card for obtaining magnetic head reading;
Analysis module, is analyzed for the signal waveform to the signal, obtains the width of two neighboring zero extreme point Degree and WFS;
Processing module, amplitude and WFS for the extreme point according to two neighboring zero obtain position window;
Decoder module, is decoded for the position window correspondence signal according to acquisition.
Optionally, the analysis module, carries out analysis specifically for the signal waveform to the signal and obtains the signal Data origination;According to the data origination of the signal obtain the first positive peak point, the first negative peak point, the second positive peak point, Second negative peak point, the 3rd positive peak point ..., wait N positive peaks point, the range value of N negative peaks point;According to described first Positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak point ..., N positive peaks The range value of point, N negative peaks point, obtains the absolute value of each range value.
Optionally, described device also includes:Judge module;
Whether first is met between the judge module, the absolute value for the positive and negative peak point amplitude for judging to be obtained Preset requirement criterion;If so, then judging the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and described Whether negative half value point interval meets the second preset requirement criterion;If so, then allowing the processing module to bring into operation.
Optionally, the processing module, specifically for being obtained according to the positive half value point interval and the negative half value point interval Take the average at the positive half value point interval and the negative half value point interval;Obtain the peak-to-valley value interval, the paddy peak intervals With the mean of mean at the positive half value point interval and the negative half value point interval;By it is described obtain the peak-to-valley value interval, Conduct after the paddy peak intervals and the mean of mean at the positive half value point interval and the negative half value point interval are rounded Position window.
As shown from the above technical solution, it is right that a kind of magnetic stripe card coding/decoding method and device that the embodiment of the present invention is proposed pass through Signal waveform is analyzed, adaptively to estimate a window, and the position window based on estimation is decoded, with adopting in the prior art Compared with the scheme of identical bits window, can effectively put forward the estimated accuracy of high-window, and then raising is decoded into power.
Brief description of the drawings
The features and advantages of the present invention can be more clearly understood from by reference to accompanying drawing, accompanying drawing is schematical without answering It is interpreted as carrying out any limitation to the present invention, in the accompanying drawings:
Fig. 1 shows the track profile figure of magnetic stripe card in the prior art;
Fig. 2 shows the position window T that prior art is used when being decoded;
Fig. 3 shows a kind of schematic flow sheet for magnetic stripe card coding/decoding method that one embodiment of the invention is provided;
Fig. 4 is shown in a kind of magnetic stripe card coding/decoding method that one embodiment of the invention is provided with the occasion of for the same of starting point Walk schematic diagram;
Fig. 5 shows a kind of structural representation for magnetic stripe card decoding apparatus that one embodiment of the invention is provided;
Fig. 6 shows a kind of structural representation for magnetic stripe card decoding apparatus that another embodiment of the present invention is provided.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill The every other embodiment that personnel are obtained on the premise of creative work is not made, belongs to the model that the present invention is protected Enclose.
Fig. 3 shows a kind of schematic flow sheet for magnetic stripe card coding/decoding method that one embodiment of the invention is provided, referring to Fig. 3, This method can be completed by the processor in decoder, specifically include following steps:
Step S1, the signal for obtaining the magnetic stripe card that magnetic head is read;
Step S2, the signal waveform to the signal are analyzed, and obtain the amplitude and ripple of two neighboring zero extreme point Shape interval;
It is understandable to be, positive peak point or negative peak point in signal waveform can as zero extreme point, wherein, The amplitude of extreme point can be regarded as the peak value of peak point;
Step S3, according to two neighboring zero extreme point amplitude and WFS obtain position window;
Step S4, decoded according to the position window correspondence signal of acquisition.
It can be seen that, the present embodiment is by analyzing signal waveform, adaptively to estimate a window, and based on estimation Position window is decoded, and compared with using the scheme of identical bits window in the prior art, can effectively put forward the estimated accuracy of high-window, And then raising is decoded into power.
Referring to Fig. 3, the step S2 in the present embodiment is described in detail:
Signal waveform to the signal carries out the data origination that analysis obtains the signal;
First positive peak point, the first negative peak point, the second positive peak point, the are obtained according to the data origination of the signal 2 negative peak points, the 3rd positive peak point ..., N positive peaks point, the range value of N negative peaks point;
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd posivtive spike Value point ..., N positive peaks point, the range value of N negative peaks point, obtain the absolute value of each range value.
Subsequently there are two kinds of processing methods, two kinds of processing methods are illustrated respectively below:
First method includes:According to the first positive peak point, the first negative peak point, the second positive peak point, second negative Peak point, the 3rd positive peak point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak value Interval;
The first positive peak mesial point corresponding with the first positive peak point is obtained according to the amplitude of the first positive peak point Position and the first negative peak mesial point position;
According to the first positive peak point amplitude and the amplitude of the first negative peak point obtain the second negative peak mesial point position and Second positive peak mesial point position;
The is obtained according to the first positive peak point amplitude, the amplitude of the first negative peak point and the second positive peak point amplitude Three positive peak mesial point positions and the 3rd negative peak mesial point position;By that analogy, each positive peak mesial point position and minus half peak value are obtained The position of point;
Positive half value point interval is obtained according to the positive peak mesial point position;Born according to the negative peak mesial point position Half value point interval.
Second method includes:According to the first positive peak point, the first negative peak point, the second positive peak point, second negative Peak point, the 3rd positive peak point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak value Interval;
The first negative peak mesial point corresponding with the first negative peak point is obtained according to the amplitude of the first negative peak point Position and the first positive peak mesial point position;
According to the first negative peak point amplitude and the amplitude of the first positive peak point obtain the second negative peak mesial point position and Second positive peak mesial point position;According to the first negative peak point amplitude, the amplitude of the first positive peak point and the second negative peak point Amplitude obtain the 3rd positive peak mesial point position and the 3rd negative peak mesial point position ..., obtain the positive peak mesial point positions of N and N bears peak mesial point position;
Positive half value point interval is obtained according to each positive peak mesial point position;Negative half value is obtained according to each negative peak mesial point position Point interval.
In the present embodiment, before step S3, methods described also includes:
The first preset requirement criterion whether is met between the absolute value for judging the positive and negative peak point amplitude obtained;
If so, then judging the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and described negative half Whether value point interval meets the second preset requirement criterion;
If so, then performing the step S3, specific execution is as follows:
The positive half value point interval and described negative half according to the positive half value point interval and the negative half value point interval acquiring The average at value point interval;
Obtain between the peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point Every mean of mean;
The peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and described negative half are obtained by described Value point interval mean of mean round after as position window.
Fig. 4 is shown in a kind of magnetic stripe card coding/decoding method that one embodiment of the invention is provided with the occasion of for the same of starting point Schematic diagram is walked, the principle of the above method is described in detail referring to Fig. 4:
Mentality of designing includes:By signal Analysis, peak valley point and half-peak valley point position are found out, and using between peak valley point Every with the data such as half-peak valley point interval, multiple bits " 0 " signal of initiating terminal is differentiated according to multiple constraint condition, Remove waveform means of chaotic signals and interference signal, find out effectively continuous bit " 0 " waveform, and calculate a window T (bit0's Sampling number), obtained position window T accuracys are high so that synchronous success rate is substantially improved.
It should be noted that it is following assume the signal that detects be on the occasion of, if negative value, then signal waveform and Fig. 4 institutes It is anti-phase above and below the signal waveform shown, it is exemplified by, to see the signal waveform drawn in Fig. 4 by the signal detected, to illustrate This synchronous method.In synchronizing process, half peak value is defined as the half of peak value.
The estimation of position window is completed by following steps:
(1) from the signal location point being detected, (the S point position)s in Fig. 4 start to search for the 1st posivtive spike first Value point (records the maximum searched and maximum value position using variable, recorded if the current amplitude value of search drops to Maximum half when, that is, the B1 points in Fig. 4, confirm that recorded maximum is exactly positive peak point, this maximum Position is exactly first positive peak point position), while recording peak mesial point position, i.e. B1 points position, continuation is searched for forward, when When reaching first negative peak mesial point (B1 point range values are taken into negative value, judged using the value, to search C1 points position), The position is recorded, continuation is searched for forward, find the 1st negative peak point position D1 (can be carried out by the method for similar search maximum Search), and the peak value and position are recorded, continuation is searched for forward, finds the 2nd negative peak mesial point (range value and C1 amplitudes Value is identical) the positive peak mesial points of position E1 and the 2nd (range value is identical with B1 range values) position F1, continues to search for the 2nd forward Positive peak point (determine the position during by judging that signal amplitude drops to current maximum half, current maximum mean by Negative value is changed into the maximum of the sampled point arrived after between current search point) position A2, and record the position and amplitude Value.
Search here, it may be determined that whether signal waveform disclosure satisfy that it needs to be determined that position window T requirement, this is by checking The symmetry of waveform is realized.It is specific as follows:
These bits " 0 " for the initial segment of swiping the card further are made a distinction, are F2F through B1, C1 to D1 by A1 points One positive zero of waveform;By D1 points, through one anti-zero that E1, F1 to A2 are F2F waveforms.This algorithm is adjacent to the two The symmetry of positive zero-sum anti-zero checked, if the two is satisfied by certain condition, then it is assumed that synchronous to pass through, and calculate Go out a window T.
In order to confirm this two neighboring opposite polarity zero symmetry, algorithm is carried out using following condition 1 and condition 2 Check:
Whether condition 1, the amplitude of two neighboring zero extreme point, which meet to specify, requires (the width of two neighboring zero extreme point The absolute value of the difference of degree is less than 0.4 times of amplitude the greater in both);
Whether condition 2, two neighboring zero WFS, which meet to specify, requires (the peak-to-valley value interval calculatedPaddy peak intervals Positive half value point intervalWith negative half value point intervalAverage, San Zhezhong The difference of maxima and minima be less than 0.15 times of whole average values).
If meeting conditions above, signal waveform disclosure satisfy that true location window T requirement, by peak-to-valley value intervalPaddy peak intervals Positive half value point intervalWith negative half value point intervalAverage, three makes even Average and round numbers must window T in place, this value is actually sampling number, jumps to (4) step.1) and 2) if be unsatisfactory for Condition, carry out (2) step.
(2) proceed search, search for the length of bit " 0 " waveform, obtain positive peak mesial point, negative peak mesial point (positive peak mesial point B2, negative peak mesial point C2 and the 2nd negative peak point D2 in such as Fig. 4, negative peak point can lead to negative peak point Cross and the position determined when judgement signal amplitude rises to current minimum value half, current minimum value be from the occasion of be changed into negative value it The minimum value of the sampling point value arrived afterwards between current search point), then using following condition 3) and condition 4) come to adjacent two Individual opposite polarity zero symmetry is checked:
Whether the amplitude of two neighboring zero extreme point, which meets to specify, requires (the difference of the amplitude of two neighboring zero extreme point Absolute value be less than 0.4 times of amplitude the greater in both);
Whether two neighboring zero WFS, which meets to specify, requires (the paddy peak intervals calculatedPeak-to-valley value intervalPositive half value point intervalWith negative half value point interval Average, positive half value point intervalWith positive half value point intervalBetween average, negative half value point Every With negative half value point intervalAverage, in five most The difference of big value and minimum value is less than 0.15 times of whole average values).
If meeting conditions above, signal waveform disclosure satisfy that we determined that position window T requirement, by paddy peak intervalsPeak-to-valley value interval Positive half value point intervalWith negative half value point intervalBetween average, positive half value point Every (With positive half value point intervalBetween average, negative half value point EveryWith negative half value point intervalAverage, five make even Average and round numbers must window T in place, jump to (4) step.3) and 4) if being unsatisfactory for condition, (3) step is carried out.
(3) proceed search, search for the length of bit " 0 " waveform, obtain negative peak mesial point, positive peak mesial point With the 3rd positive peak point (as shown in the negative peak mesial point E2 in Fig. 4, positive peak mesial point F2 and the 3rd positive peak point A3), it is searched for 3) and 4) carry out condition judgment again afterwards, if passed through, calculate window T in place, jump to (4) step, if do not passed through, repeat Step (2).
(4) synchronized algorithm terminates, carry-out bit window T, i.e., the sampling number of one bit " 0 " waveform.
The synchronized algorithm that four steps are realized more than, realizes position window T estimation, and by result and current sampling point position Confidence breath output is to next functional module.Timing mechanism is additionally added in certain synchronization module, is exited if time-out The corresponding synchronization module of method, and reporting system synchronization failure are stated, in order to avoid condition 3) and 4) be unsatisfactory for causing to crash always.
In synchronizing process, half peak value can with previous peaks or valley be changed, can also be always maintained at solid Which kind of scheme is definite value, take actually, can carry out compromise consideration according to performance and complexity, and respective algorithms are adjusted.
Fig. 5 shows a kind of structural representation for magnetic stripe card decoding apparatus that one embodiment of the invention is provided, referring to Fig. 5, The device includes:Acquisition module 510, analysis module 520, processing module 530 and decoder module 540, wherein;
Acquisition module 510, the signal of the magnetic stripe card for obtaining magnetic head reading;
Analysis module 520, is analyzed for the signal waveform to the signal, obtains two neighboring zero extreme point Amplitude and WFS;
Processing module 530, amplitude and WFS for the extreme point according to two neighboring zero obtain position window;
Decoder module 540, is decoded for the position window correspondence signal according to acquisition.
It should be noted that when user applies magnetic stripe card, acquisition module 510 passes through the letter on head read magnetic stripe card Number, and analysis module 520 is transmitted the signal to, analyzed, obtained by the signal waveform of 520 pairs of signals of analysis module The amplitude and WFS of two neighboring zero extreme point, and the amplitude got and WFS are sent to processing module 530, position window, processing module 530 are obtained according to the amplitude and WFS of two neighboring zero extreme point by processing module 530 The position window for calculating acquisition is sent to decoder module 540, and then entered by decoder module according to the position window correspondence signal of acquisition Row decoding.
It can be seen that, the present embodiment is by analyzing signal waveform, adaptively to estimate a window, and based on estimation Position window is decoded, and compared with using the scheme of identical bits window in the prior art, can effectively put forward the estimated accuracy of high-window, And then raising is decoded into power.
The corresponding module in the present embodiment is described in detail below:
Analysis module 520, the data that analysis obtains the signal are carried out specifically for the signal waveform to the signal Point;First positive peak point, the first negative peak point, the second positive peak point, the second negative peak are obtained according to the data origination of the signal It is worth point, the 3rd positive peak point ..., N positive peaks point, the range value of N negative peaks point;According to the first positive peak point, First negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak point ..., N positive peaks point, N negative peaks It is worth the range value of point, obtains the absolute value of each range value.
The processing module 530, specifically for being taken absolute value according to the range value of the positive peak point and negative peak point; The positive half value point interval and the negative half value point interval are obtained according to the positive half value point interval and the negative half value point interval Average;Obtain the peak-to-valley value point interval, the paddy peak point interval and the positive half value point interval and the negative half value point The average value at interval;The peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and institute are obtained by described State negative half value point interval mean of mean round after as position window.
Fig. 6 shows a kind of structural representation for magnetic stripe card decoding apparatus that another embodiment of the present invention is provided, referring to figure 6, on the basis of Fig. 5 correspondence embodiments include feature, the present embodiment also includes:Judge module 640;
The judge module 640, for judging it is pre- whether the absolute value of amplitude of the positive and negative peak point meets first If it is required that criterion;If so, then judging the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and described negative Whether half value point interval meets the second preset requirement criterion;If so, then allowing the processing module 650 to bring into operation;If it is not, Processing module 650 is not allowed then to carry out relevant treatment.
For above-described embodiment, for method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, embodiment of the present invention is not limited by described sequence of movement System, because according to embodiment of the present invention, some steps can be carried out sequentially or simultaneously using other.Secondly, this area skill Art personnel should also know that embodiment described in this description belongs to preferred embodiment, and involved action is simultaneously It is not necessarily necessary to embodiment of the present invention.
For device embodiments, because it is substantially similar to method embodiment, so the comparison of description is simple Single, related part illustrates referring to the part of method embodiment.
It should be noted that in all parts of the device of the present invention, according to the function that it to be realized to therein Part has carried out logical partitioning, still, and the present invention is not only restricted to this, and all parts can be repartitioned as needed Or combination.
The all parts embodiment of the present invention can be realized with hardware, or with one or more processor The software module of operation is realized, or is realized with combinations thereof.In the present apparatus, PC by realize internet to equipment or Device remote control, the step of accurately control device or device are each operated.The present invention is also implemented as being used to perform The some or all equipment or program of device of method as described herein are (for example, computer program and computer Program product).Being achieved in that the program of the present invention can store on a computer-readable medium, and the file that program is produced Or document produces data report and cpk reports etc. with can be statistical, batch testing can be carried out to function and be counted.It should note Meaning is that the present invention will be described rather than limits the invention for above-mentioned embodiment, and those skilled in the art Replacement embodiment can be being designed without departing from the scope of the appended claims.In the claims, should not be by Any reference symbol between bracket is configured to limitations on claims.Word "comprising", which is not excluded the presence of, not to be listed in Element or step in claim.Word "a" or "an" before element does not exclude the presence of multiple such members Part.The present invention can be by means of including the hardware of some different elements and coming real by means of properly programmed computer It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
Although being described in conjunction with the accompanying embodiments of the present invention, those skilled in the art can not depart from this Various modifications and variations are made in the case of the spirit and scope of invention, such modifications and variations are each fallen within by appended right It is required that within limited range.

Claims (10)

1. a kind of magnetic stripe card coding/decoding method, it is characterised in that including:
Step S1, the signal for obtaining the magnetic stripe card that magnetic head is read;
Step S2, the signal waveform to the signal are analyzed, between the amplitude and waveform that obtain two neighboring zero extreme point Every;
Step S3, according to two neighboring zero extreme point amplitude and WFS obtain position window;
Step S4, according to the position window of acquisition the signal is decoded.
2. according to the method described in claim 1, it is characterised in that the step S2 is specifically included:
Signal waveform to the signal carries out the data origination that analysis obtains the signal;
First positive peak point, the first negative peak point, the second positive peak point, the second negative peak are obtained according to the data origination of the signal It is worth point, the 3rd positive peak point ..., N positive peaks point, the range value of N negative peaks point;
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak Point ..., N positive peaks point, the range value of N negative peaks point, obtain the absolute value of each range value.
3. method according to claim 2, it is characterised in that the step S2 is specifically included:
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak Point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak intervals;
The first positive peak mesial point position corresponding with the first positive peak point is obtained according to the amplitude of the first positive peak point With the first negative peak mesial point position;
Second negative peak mesial point position and second is obtained according to the first positive peak point amplitude and the amplitude of the first negative peak point Positive peak mesial point position;
The the 3rd just half is obtained according to the first positive peak point amplitude, the amplitude of the first negative peak point and the second positive peak point amplitude Peak point position and the 3rd negative peak mesial point position;By that analogy, each positive peak mesial point position and negative peak mesial point position are obtained;
Positive half value point interval is obtained according to the positive peak mesial point position;Negative half value point is obtained according to the negative peak mesial point position Interval.
4. method according to claim 2, it is characterised in that the step S2 is specifically included:
According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak Point ..., N positive peaks point, the position of N negative peaks point obtain peak-to-valley value interval and paddy peak intervals;
The first negative peak mesial point position corresponding with the first negative peak point is obtained according to the amplitude of the first negative peak point With the first positive peak mesial point position;
Second negative peak mesial point position and second is obtained according to the first negative peak point amplitude and the amplitude of the first positive peak point Positive peak mesial point position;According to the width of the first negative peak point amplitude, the amplitude of the first positive peak point and the second negative peak point Degree obtains the 3rd positive peak mesial point position and the 3rd negative peak mesial point position ..., the acquisition positive peak mesial point positions of N and N is negative Peak mesial point position;
Positive half value point interval is obtained according to each positive peak mesial point position;According between each negative negative half value point of peak mesial point position acquisition Every.
5. the method according to claim 3 or 4, it is characterised in that before step S3, methods described also includes:
The first preset requirement criterion whether is met between the absolute value for judging the positive and negative peak point amplitude obtained;
If so, then judging between the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and the negative half value point Every whether meeting the second preset requirement criterion;
If so, then performing the step S3.
6. method according to claim 5, it is characterised in that the step S3 is specifically included:
Positive half value point interval and the negative half value point according to the positive half value point interval and the negative half value point interval acquiring The average at interval;
Obtain the equal of the peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point interval The average value of value;
By between the acquisition peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point Every mean of mean round after as position window.
7. a kind of magnetic stripe card decoding apparatus, it is characterised in that including:
Acquisition module, the signal of the magnetic stripe card for obtaining magnetic head reading;
Analysis module, is analyzed for the signal waveform to the signal, obtain two neighboring zero extreme point amplitude and WFS;
Processing module, amplitude and WFS for the extreme point according to two neighboring zero obtain position window;
Decoder module, is decoded for the position window correspondence signal according to acquisition.
8. device according to claim 7, it is characterised in that the analysis module, specifically for the letter to the signal Number waveform carries out the data origination that analysis obtains the signal;According to the data origination of the signal obtain the first positive peak point, First negative peak point, the second positive peak point, the second negative peak point, the 3rd positive peak point ..., N positive peaks point, N negative peaks The range value of point;According to the first positive peak point, the first negative peak point, the second positive peak point, the second negative peak point, the 3rd just Peak point ..., N positive peaks point, the range value of N negative peaks point, obtain the absolute value of each range value.
9. device according to claim 8, it is characterised in that described device also includes:Judge module;
First whether is met between the judge module, the absolute value for the positive and negative peak point amplitude for judging to be obtained to preset It is required that criterion;If so, then judging the peak-to-valley value interval, the paddy peak intervals, the positive half value point interval and described negative half Whether value point interval meets the second preset requirement criterion;If so, then allowing the processing module to bring into operation.
10. device according to claim 8 or claim 9, it is characterised in that the processing module, specifically for according to it is described just The average at positive half value point interval and the negative half value point interval described in half value point interval and the negative half value point interval acquiring;Obtain The average at the peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point interval is averaged Value;By between the acquisition peak-to-valley value interval, the paddy peak intervals and the positive half value point interval and the negative half value point Every mean of mean round after as position window.
CN201710012550.9A 2017-01-09 2017-01-09 Magnetic stripe card coding/decoding method and device Active CN106997443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710012550.9A CN106997443B (en) 2017-01-09 2017-01-09 Magnetic stripe card coding/decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710012550.9A CN106997443B (en) 2017-01-09 2017-01-09 Magnetic stripe card coding/decoding method and device

Publications (2)

Publication Number Publication Date
CN106997443A true CN106997443A (en) 2017-08-01
CN106997443B CN106997443B (en) 2019-08-23

Family

ID=59431257

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN106997443B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734036A (en) * 2018-05-18 2018-11-02 深圳市中科汉天下电子有限公司 A kind of coding/decoding method and device of magnetic stripe card
CN110688867A (en) * 2019-09-12 2020-01-14 兆讯恒达微电子技术(北京)有限公司 Method for improving information synchronization of magnetic stripe card reader
CN117214675A (en) * 2023-11-08 2023-12-12 无锡力芯微电子股份有限公司 Test method and test circuit for magnetic stripe card information reading integrated circuit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757342B1 (en) * 1999-03-30 2004-06-29 Sankyo Seiki Mfg. Co., Ltd. Data demodulation
CN102324012A (en) * 2011-08-26 2012-01-18 深圳盒子支付信息技术有限公司 Magnetic card data reading method, apparatus thereof and mobile POS machine
CN102722686A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magnetic card decoding method
CN103679104A (en) * 2012-09-11 2014-03-26 马克西姆综合产品公司 Magnetic stripe reader

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757342B1 (en) * 1999-03-30 2004-06-29 Sankyo Seiki Mfg. Co., Ltd. Data demodulation
CN102324012A (en) * 2011-08-26 2012-01-18 深圳盒子支付信息技术有限公司 Magnetic card data reading method, apparatus thereof and mobile POS machine
CN102722686A (en) * 2012-05-25 2012-10-10 福建联迪商用设备有限公司 Magnetic card decoding method
CN103679104A (en) * 2012-09-11 2014-03-26 马克西姆综合产品公司 Magnetic stripe reader

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734036A (en) * 2018-05-18 2018-11-02 深圳市中科汉天下电子有限公司 A kind of coding/decoding method and device of magnetic stripe card
CN108734036B (en) * 2018-05-18 2021-05-11 深圳昂瑞微电子技术有限公司 Decoding method and device for magnetic stripe card
CN110688867A (en) * 2019-09-12 2020-01-14 兆讯恒达微电子技术(北京)有限公司 Method for improving information synchronization of magnetic stripe card reader
CN110688867B (en) * 2019-09-12 2022-11-22 兆讯恒达科技股份有限公司 Method for synchronizing information of magnetic stripe card reader
CN117214675A (en) * 2023-11-08 2023-12-12 无锡力芯微电子股份有限公司 Test method and test circuit for magnetic stripe card information reading integrated circuit
CN117214675B (en) * 2023-11-08 2024-01-30 无锡力芯微电子股份有限公司 Test method and test circuit for magnetic stripe card information reading integrated circuit

Also Published As

Publication number Publication date
CN106997443B (en) 2019-08-23

Similar Documents

Publication Publication Date Title
US6476743B1 (en) Magnetic stripe reader
CN106997443A (en) Magnetic stripe card coding/decoding method and device
CN103679104B (en) Magnetic strip reader
CN1033936C (en) Method and arrangement for decoding F2F signals read from a magnetic data carrier
EP3312765B1 (en) Anomaly detection by self-learning of sensor signals
EP1887520A1 (en) Image processing device and object region tracking program
CN108170806B (en) Sensitive word detection and filtering method and device and computer equipment
KR960002148B1 (en) Process for evaluating binary data of a magnetic storage card
CN110399400A (en) Detect method, apparatus, equipment and the medium of abnormal data
CN108734036A (en) A kind of coding/decoding method and device of magnetic stripe card
US9129166B2 (en) Magnetic stripe reader with card swipe information feedback
CN105046882A (en) Fall detection method and device
CN112989861A (en) Sample identification code reading method and device, electronic equipment and storage medium
CN108512552A (en) A kind of the decoding system and coding/decoding method of Manchester code
CN107066906B (en) Magnetic stripe card decoding method and device
CN103176651A (en) Rapid collecting method of handwriting information
CN104969294B (en) Magnetic strip reader with card using information feedback
CN109191619B (en) RFID-based construction site informatization access control system and setting and using method thereof
KR100954581B1 (en) Method and apparatus for filtering tag data in RFID system, and RFID system and recording medium using thereof
CN110633588B (en) Noise identification method for magnetic stripe card reader
TWI694344B (en) Apparatus and method for detecting impact factor for an operating environment
CN108965903A (en) A kind of method and device in the optional network specific digit region for identifying live video
EP1033670A2 (en) Digital magnetic read channel and method
CN108304739B (en) POS terminal mobile machine detection method and POS terminal mobile machine detection system
JP7360117B2 (en) Signature authentication device and conformity judgment device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant