CN105447954B - A kind of magnetic data method of reseptance and device - Google Patents

A kind of magnetic data method of reseptance and device Download PDF

Info

Publication number
CN105447954B
CN105447954B CN201510925299.6A CN201510925299A CN105447954B CN 105447954 B CN105447954 B CN 105447954B CN 201510925299 A CN201510925299 A CN 201510925299A CN 105447954 B CN105447954 B CN 105447954B
Authority
CN
China
Prior art keywords
data
line number
number amount
line
row
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.)
Expired - Fee Related
Application number
CN201510925299.6A
Other languages
Chinese (zh)
Other versions
CN105447954A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201510925299.6A priority Critical patent/CN105447954B/en
Publication of CN105447954A publication Critical patent/CN105447954A/en
Application granted granted Critical
Publication of CN105447954B publication Critical patent/CN105447954B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/04Testing magnetic properties of the materials thereof, e.g. by detection of magnetic imprint

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Circuits Of Receivers In General (AREA)

Abstract

The present invention relates to financial technology field, a kind of magnetic data method of reseptance and device are provided, it is intended to solve in the prior art that magnetic data loses the caused data processing mistake of row during receiving magnetic data.The described method includes: the previous frame data of working as to reading carry out losing capable detection, line number amount is lost in acquisition;Data Position is redefined according to the line number amount of losing;Next frame data are read according to the Data Position.For technical solution of the present invention by carrying out losing capable detection to the previous frame data of working as of reading, line number amount is lost in acquisition, and redefines Data Position according to line number amount is lost, to effectively improve the accuracy for the data being read into memory, avoids data processing mistake.

Description

A kind of magnetic data method of reseptance and device
Technical field
The present invention relates to financial technology field more particularly to a kind of magnetic data method of reseptances and device.
Background technique
During financial counting or money-checking, the DSP of counting or money-checking equipment (Digital Signal Processing, Dsp chip is also referred to as digital signal processor, is a kind of microprocessor particularly suitable for carrying out Digital Signal Processing operation, master Will be using being to realize various digital signal processing algorithms real-time, quickly) end needs to receive magnetic data, and magnetic data is by magnetism Sensor obtains, and provides according to standard agreement, and each received magnetic data has identical size and fixed format, each The size of frame data is 1386 rows 48 column, and data format adds magnetic data to form by line number.
During receiving magnetic data, it usually will appear magnetic data and lose capable phenomenon, i.e., a currently received frame A line or a few rows in data are lost, and lead to the dislocation of next frame Data Position, so that the data being read into memory be made to exist Error when being handled.
Summary of the invention
The purpose of the present invention is to provide a kind of magnetic data method of reseptance and devices, it is intended to which solution is connecing in the prior art Magnetic data loses data processing mistake caused by row during receiving magnetic data.
First aspect present invention provides a kind of magnetic data method of reseptance, comprising:
The previous frame data of working as of reading are carried out losing capable detection, line number amount is lost in acquisition;
Data Position is redefined according to the line number amount of losing;
Next frame data are read according to the Data Position.
Second aspect of the present invention provides a kind of magnetic data reception device, comprising:
Detection module, for carrying out losing capable detection to the previous frame data of working as of reading, line number amount is lost in acquisition;
Distribution module redefines Data Position for losing line number amount according to;
Read module, for reading next frame data according to the Data Position.
Existing beneficial effect is the present invention compared with prior art: technical solution provided by the invention passes through to reading When previous frame data carry out losing capable detection, line number amount is lost in acquisition, and redefines Data Position according to line number amount is lost, thus effectively The accuracy of data that is read into memory of raising, avoid data processing mistake.
Detailed description of the invention
Fig. 1 is the flow chart for the magnetic data method of reseptance that the embodiment of the present invention one provides;
Fig. 2 is to lose the schematic diagram of row phenomenon in magnetic data method of reseptance that the embodiment of the present invention one provides;
Fig. 3 is the flow chart of magnetic data method of reseptance provided by Embodiment 2 of the present invention;
Fig. 4 is that real data data after row phenomenon are lost in magnetic data method of reseptance provided by Embodiment 2 of the present invention Receive schematic diagram;
Fig. 5 is the composition schematic diagram for the magnetic data reception device that the embodiment of the present invention three provides;
Fig. 6 is the composition schematic diagram for the magnetic data reception device that the embodiment of the present invention four provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Realization of the invention is described in detail below in conjunction with specific attached drawing.
Fig. 1 is the flow chart for the magnetic data method of reseptance that the embodiment of the present invention one provides, and specifically includes step S101 extremely S103, details are as follows:
S101, the previous frame data of working as of reading are carried out losing capable detection, line number amount is lost in acquisition.
Magnetic data is obtained by magnetic sensor, and according to the regulation of standard agreement, each received magnetic data has phase Same size and fixed format, the size of each frame data are 1386 rows 48 column, and data format adds magnetic data group by line number At the numerical value of the first row of every a line is the line number of the row, the line number of each frame data serial number since 1.
Magnetic data will appear once in a while during received loses capable phenomenon, as shown in Figure 2.Due in the first frame data Certain a line lose, cause the first row of the second frame data to be received as the last line of the first frame data, and received the Two frame data are actually since the second row of the second frame data, it is assumed that the second frame data are not lost in receive process Row, then what the last line of the second frame data actually received is the first row of third frame data.
The memory block that same size can all be distributed in memory to received each frame data is stored, when occurring losing row When phenomenon, data are caused to misplace due to losing row, and then leading to be stored in each frame data in memory block is also dislocation, therefore It carries out losing capable detection, redefines each frame data position in memory and size.
Specifically, the former frame magnetic data of working as of reading is carried out losing capable detection, judges whether the frame data have and lose row, such as Fruit, which has to lose row and then obtain, works as the line number that previous frame data are specifically lost, that is, loses line number amount.
S102, basis lose line number amount and redefine Data Position.
Specifically, line number amount is lost according to what step S101 was obtained, determines the received data volume of reality for working as former frame, simultaneously According to lose line number amount determine next frame data to be read memory block first address and data volume to be read.
S103, next frame data are read according to Data Position.
Specifically, according to the memory block first address and number to be read of the step S102 next frame data to be read determined According to amount, next frame data are read.
In the present embodiment, by the way that reading, when previous frame data lose capable detection, line number amount is lost in acquisition, and according to losing Line number amount redefines Data Position, to effectively improve the accuracy for the data being read into memory, avoids data processing Mistake.
Embodiment two:
Fig. 3 is the flow chart of magnetic data method of reseptance provided by Embodiment 2 of the present invention, specifically includes step S201 extremely S205, details are as follows:
S201, to reading when the value of first row of the previous frame data in preset line number threshold range is read line by line It takes.
In embodiments of the present invention, line number threshold value is an empirical value, and empirical value acquirement is excessive and too small all improper, This is because if line number threshold value obtain it is excessive, when losing line number amount and being not above line number threshold value, on a large scale to losing capable progress Detection will increase the calculation amount of system;If line number threshold value obtain it is too small, lose line number amount it is many when, such as lose line number amount and be more than Line number threshold value cannot detect actual to lose line number amount due to can only detecting to losing row to small range.
As an embodiment of the present invention, line number threshold value can take 20, correspondingly, exist to the previous frame data of working as of reading The value of first row in preset line number threshold range is read line by line, can be in reading when previous frame data inverse 20 In line range, the value of first row is read line by line.
S202, when read first row value be 1 when, according to the value of first row be 1 where row obtain loses line number amount.
As previously described, because the line number of each frame magnetic data is numbered from 1, therefore, to step S201 line by line When the value of the first row of reading is judged, if the value of the first row is 1, then it represents that opened from this line that the first train value is 1 Begin, until the last line of this current frame data, this partial data belongs to the data of next frame, is due to working as The losing row of previous frame data and cause to be read in advance.
Specifically, it is 1 position of the row according to the value of first row, counts from the row up to this current frame data Total line number of last line, as when previous frame data specifically lose line number amount.
S203, basis lose line number amount and calculate the data volume for working as former frame.
Specifically, it can subtract that lose line number that line number measures be to work as former frame reality with total line number of each frame data Data volume.
For example, it is assumed that losing line number amount when former frame is 6 rows, since total line number of each frame data is 1386 as defined in agreement Row, then when the actual data volume line number of former frame is 1380 rows.
S204, algorithm process is carried out to the data when former frame.
Specifically, algorithm process is carried out to when the actual data volume of former frame, including to read when former frame is magnetic The accuracy of the content of data does further judgment and detection.
S205, according to lose line number amount calculate next frame data memory block first address and data volume to be read.
Specifically, line number amount is lost according to when former frame, calculates the memory block first address of next frame data, i.e., to original The memory block first address of next frame data carries out biased forwards, and offset is to lose line number amount, while counting again according to line number amount is lost The data volume of next frame data to be read, total line number of each frame data subtract that lose line number that line number measures be to continue The data volume of the next frame data taken.
For example, it is assumed that when the memory block first address of former frame is 0x10000000, the memory address where every data line It is assumed to be line by line plus 1, since total line number of each frame data is 1386 rows as defined in agreement, then original next frame data is interior Counterfoil first address is 0x1000056A, it is assumed that losing line number amount when former frame is 6 rows, then the first ground of the memory block of practical next frame data Location needs 6 row of biased forwards, i.e. 0x10000564, and the data volume that the next frame data read are actually needed is 1380 rows.
For the present embodiment that gets across, now it is illustrated below.
As shown in figure 4, addr1 is the memory block first address of the first frame data, addr2 is the memory block of former second frame data First address.91 rows of the first frame data occur losing row phenomenon, and the first row of the second frame is caused to advance to the last line of first frame It is received.
It is read line by line by the value of the first row of last 20 row to the first frame data, it is found that last line first The value of column is 1, therefore judge first frame loses line number amount for 1 row, is according to the line number meter calculating actual quantity of first frame is lost 1385 rows, the i.e. part that A is indicated in Fig. 4.
Biased forwards a line, i.e. Fig. 4 are needed according to losing line number amount and further calculate out the memory block first address of the second frame simultaneously The data volume of position represented by middle addr2 ' and the second frame data to be read is 1385 rows, the i.e. portion that B is indicated in Fig. 4 Point.
In the present embodiment, by reading when first row of the previous frame data in preset line number threshold range value It is detected line by line, when the value for detecting first row is 1, the row where being 1 according to the value of first row, which obtains, loses line number amount, and Work as the data volume of former frame and memory block first address and the data volume to be read of next frame data, weight according to losing line number amount and determining It is new to determine that Data Position avoids data processing mistake to effectively improve the accuracy for the data being read into memory.
Embodiment three:
Fig. 5 is the composition schematic diagram for the magnetic data reception device that the embodiment of the present invention three provides, for ease of description, only Show part related to the embodiment of the present invention.Fig. 5 is exemplary to can be aforementioned implementation for the received device of magnetic data The executing subject for the received method of magnetic data that example one provides can be one in application apparatus or application apparatus A functional module.Fig. 5 is exemplary to be specifically included that detection module 51, distribution module 52 for the received device of magnetic data and reads Modulus block 53.Detailed description are as follows for each functional module:
Detection module 51, for carrying out losing capable detection to the previous frame data of working as of reading, line number amount is lost in acquisition;
Distribution module 52 redefines Data Position for losing line number amount according to;
Receiving module 53, for reading next frame data according to the Data Position.
In magnetic data reception device in the present embodiment, each module realizes the process of respective function, referring to 1 institute of earlier figures Show the description of embodiment, details are not described herein again.
From the exemplary received device of magnetic data that is used for of above-mentioned Fig. 5 it is found that in the present embodiment, by the current of reading One frame data carry out losing capable detection, and line number amount is lost in acquisition, and redefines Data Position according to line number amount is lost, to effectively mention The accuracy for the data that height is read into memory avoids data processing mistake.
Example IV:
Fig. 6 is the composition schematic diagram for the magnetic data reception device that the embodiment of the present invention four provides, for ease of description, only Show part related to the embodiment of the present invention.Fig. 6 is exemplary to can be aforementioned implementation for the received device of magnetic data The executing subject for the received method of magnetic data that example two provides can be one in application apparatus or application apparatus A functional module.Fig. 6 is exemplary to be specifically included that detection module 61, distribution module 62 for the received device of magnetic data and reads Modulus block 63.Detailed description are as follows for each functional module:
Detection module 61, for carrying out losing capable detection to the previous frame data of working as of reading, line number amount is lost in acquisition;
Distribution module 62 redefines Data Position for losing line number amount according to;
Receiving module 63, for reading next frame data according to the Data Position.
Specifically, detection module 61 includes:
Detection sub-module 611 line by line, for reading when previous frame data in the preset line number threshold range the The value of one column is read line by line;
Confirmation lose line number quantum module 612, for when read the first row value be 1 when, according to the first row Value be 1 where row obtain lose line number amount.
Further, Data Position includes memory block first address and data volume.
Specifically, distribution module 62 includes:
When former frame distribution sub module 621, the data volume for working as former frame is calculated for losing line number amount according to;
Next frame distribution sub module 622 calculates the memory block first address of next frame data for losing line number amount according to With data volume to be read.
Further, distribution module 62 further include:
Algorithm process submodule 623, for the data progress algorithm process when former frame.
In magnetic data reception device in the present embodiment, each module realizes the process of respective function, referring to 3 institute of earlier figures Show the description of embodiment, details are not described herein again.
From the exemplary received device of magnetic data that is used for of above-mentioned Fig. 6 it is found that in the present embodiment, by the current of reading The value of first row of one frame data in preset line number threshold range is detected line by line, when the value for detecting first row is 1 When, the row where being 1 according to the value of first row, which obtains, loses line number amount, and according to lose line number amount determine when former frame data volume and The memory block first address of next frame data and data volume to be read, redefine Data Position, read to effectively improve The accuracy of data into memory avoids data processing mistake.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment What is stressed is the difference from other embodiments, and same or similar part refers to each other between each embodiment ?.For device class embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
It is worth noting that, included modules are only drawn according to function logic in above-mentioned apparatus embodiment Point, but be not limited to the above division, as long as corresponding functions can be realized;In addition, each functional module is specific Title is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
It will appreciated by the skilled person that all or part of the steps in realization the various embodiments described above method is can It is completed with instructing relevant hardware by program, corresponding program can store in a computer-readable storage medium In, the storage medium, such as ROM/RAM, disk or CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (8)

1. a kind of magnetic data method of reseptance characterized by comprising
The previous frame data of working as of reading are carried out losing capable detection, line number amount is lost in acquisition;
Data Position is redefined according to the line number amount of losing;
Next frame data are read according to the Data Position;
The previous frame data of working as of described pair of reading carry out losing capable detection, and acquisition loses line number amount and includes:
The value of the first row when previous frame data in preset line number threshold range reciprocal of reading is read line by line;
When the value for reading the first row is 1, it is 1 position of the row according to the value of the first row, counts from the row Until total line number of the last line when previous frame data, obtains and loses line number amount when previous frame data.
2. magnetic data method of reseptance according to claim 1, which is characterized in that the Data Position includes memory block head Address and data volume.
3. magnetic data method of reseptance according to claim 2, which is characterized in that described to lose line number amount according to again Determine that Data Position includes:
The data volume for working as former frame is calculated according to the line number amount of losing;
According to it is described lose line number amount calculate next frame data memory block first address and data volume to be read.
4. magnetic data method of reseptance according to claim 3, which is characterized in that described to lose the calculating of line number amount according to It is described after the step of data volume of former frame, further includes:
To described when the data of former frame carry out algorithm process.
5. a kind of magnetic data reception device characterized by comprising
Detection module, for carrying out losing capable detection to the previous frame data of working as of reading, line number amount is lost in acquisition;
Distribution module redefines Data Position for losing line number amount according to;
Read module, for reading next frame data according to the Data Position;
The detection module includes:
Detection sub-module line by line, for working as first of previous frame data in preset line number threshold range reciprocal to reading The value of column is read line by line;
Line number quantum module is lost in confirmation, for being 1 according to the value of the first row when the value for reading the first row is 1 Position of the row is counted from the row until total line number of the last line when previous frame data, obtains and work as previous frame data Lose line number amount.
6. magnetic data reception device according to claim 5, which is characterized in that the Data Position includes memory block head Address and data volume.
7. magnetic data reception device according to claim 6, which is characterized in that the distribution module includes:
When former frame distribution sub module, the data volume for working as former frame is calculated for losing line number amount according to;
Next frame distribution sub module calculates the memory block first address of next frame data and to be read for losing line number amount according to Data volume.
8. magnetic data reception device according to claim 7, which is characterized in that the distribution module further include:
Algorithm process submodule, for the data progress algorithm process when former frame.
CN201510925299.6A 2015-12-14 2015-12-14 A kind of magnetic data method of reseptance and device Expired - Fee Related CN105447954B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510925299.6A CN105447954B (en) 2015-12-14 2015-12-14 A kind of magnetic data method of reseptance and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510925299.6A CN105447954B (en) 2015-12-14 2015-12-14 A kind of magnetic data method of reseptance and device

Publications (2)

Publication Number Publication Date
CN105447954A CN105447954A (en) 2016-03-30
CN105447954B true CN105447954B (en) 2019-02-01

Family

ID=55558084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510925299.6A Expired - Fee Related CN105447954B (en) 2015-12-14 2015-12-14 A kind of magnetic data method of reseptance and device

Country Status (1)

Country Link
CN (1) CN105447954B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4979059A (en) * 1987-05-13 1990-12-18 Misubishi Denki Kabushiki Kaisha System for storing data in a separate memory when the number of positioning errors of a magnetic disc exceeds a threshold
CN101833513A (en) * 2010-04-22 2010-09-15 瑞斯康达科技发展股份有限公司 Storage method and device and reading method and device for data frame

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3119151B2 (en) * 1996-02-17 2000-12-18 日本ビクター株式会社 Digital data recording / reproducing device
JP2014021993A (en) * 2012-07-12 2014-02-03 Toshiba Corp Magnetic disk device, magnetic disk control device, and head position determination method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4979059A (en) * 1987-05-13 1990-12-18 Misubishi Denki Kabushiki Kaisha System for storing data in a separate memory when the number of positioning errors of a magnetic disc exceeds a threshold
CN101833513A (en) * 2010-04-22 2010-09-15 瑞斯康达科技发展股份有限公司 Storage method and device and reading method and device for data frame

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《基于FPGA的实时图像数据采集模块设计》;伍乾永、陈彬;《微电子学》;20080630;第453-456页
《纸币图像分析理解技术及其应用》;金野;《中国博士学位论文全文数据库(电子期刊)信息科技辑》;20100228;第1138-36页

Also Published As

Publication number Publication date
CN105447954A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN101908231B (en) Reconstruction method and system for processing three-dimensional point cloud containing main plane scene
US9891040B2 (en) Method and electronic device for measuring a distance
US20160091359A1 (en) System and method for measuring segment parameters of a human body for recording a body mass index
GB2586403A (en) Method, system, and apparatus for correcting translucency artifacts in data representing a support structure
CN104422406A (en) Planeness measurement system and method
CN104330038A (en) Size measurement method
CN111998918B (en) Error correction method, error correction device and flow sensing system
CN109509166A (en) Printed circuit board image detection method and device
CN104394026B (en) The measurement method and device of web page loading time
CN107481283A (en) A kind of robot localization method, apparatus and robot based on CCTV camera
CN105911563A (en) Method for detecting static GPS observation data mass in real time
CN110827245A (en) Method and equipment for detecting screen display disconnection
CN109101929A (en) A kind of pedestrian counting method and device
CN107833051A (en) A kind of data statistical approach and system
CN104572076B (en) The soft filtering algorithm and filtering system of a kind of analog acquisition
CN108981570B (en) Portable logistics parcel volume measuring device
CN105447954B (en) A kind of magnetic data method of reseptance and device
CN102610002A (en) Machine station state detection system and method
CN104457911A (en) Liquid level detecting system and method
CN105744184B (en) Bad pixel correction method and the device for using this method
CN109870172A (en) Step counting detection method, device, equipment and storage medium
CN105427282A (en) Method and device for testing 3D positioning accuracy
CN103617332B (en) A kind of emulation platform measuring satellite navigation algorithm performance and method
CN105187451B (en) Website traffic method for detecting abnormality and system
CN204594468U (en) Aircraft flight error correction device and unmanned vehicle

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190201

Termination date: 20211214