CN102044115A - Tax disk - Google Patents

Tax disk Download PDF

Info

Publication number
CN102044115A
CN102044115A CN2009101724762A CN200910172476A CN102044115A CN 102044115 A CN102044115 A CN 102044115A CN 2009101724762 A CN2009101724762 A CN 2009101724762A CN 200910172476 A CN200910172476 A CN 200910172476A CN 102044115 A CN102044115 A CN 102044115A
Authority
CN
China
Prior art keywords
tax
invoice
control dish
tax control
file
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
CN2009101724762A
Other languages
Chinese (zh)
Other versions
CN102044115B (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.)
Henan Xuji Information Co., Ltd.
Original Assignee
HENAN XUJI INFORMATION CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HENAN XUJI INFORMATION CO Ltd filed Critical HENAN XUJI INFORMATION CO Ltd
Priority to CN2009101724762A priority Critical patent/CN102044115B/en
Publication of CN102044115A publication Critical patent/CN102044115A/en
Application granted granted Critical
Publication of CN102044115B publication Critical patent/CN102044115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a tax disk which comprises a tax disk hardware system and a tax disk software system, wherein the tax disk hardware system comprises a main control chip, a clock module, a power supply module, a storage, a register and a USB (Universal Serial Bus) interface protector which are connected with the main control chip, wherein the power supply module is also connected with the clock module; the tax disk software system comprises a hardware interface layer, a file system management layer, a safety management layer, a tax application layer and a communication interface layer which are connected with the tax disk hardware system; and a three-level index technology is adopted in the file system management system to index invoices. Compared with the traditional tax control device, one tax disk can complete the services of invoice purchasing, invoice making, invoice cancellation, tax copying and the like without other card readers or storage card devices, and can simultaneously support national tax and regional tax, wherein each tax application supports dozens of invoice types.

Description

The tax control dish
Technical field
The present invention relates to a kind of tax-controlling device.
Background technology
China's taxation reform has in recent years obtained very big success, and tax revenue continues to increase substantially, and has promoted lasting, quick, the sound development of national economy.But still be faced with problem demanding prompt solution in the tax work: phenomenons such as various forms of tax dodgings, the unauthorized tax reduction of defrauding the tax, evade taxation, owe taxes are also relatively more serious, there is leak in revenue department's inner management, promoting tax-controlling device is the inevitable requirement of carrying out tax administration law, also is to implement important means scientific, fine-grained management.The 23 of Law on the Administration of Tax Collection clearly stipulated, " country actively promotes the use of tax-controlling device according to the needs of tax collection and administration management ".Applying the basic goal of tax-controlling device, is exactly by with ticket control tax, strengthens managing bill and strengthens the tax source control, stops up the supervision leak.
Along with the development of tax informationization, various tax-controlling devices have appearred on the market.The domestic tax-controlling device great majority that use are tax-card, tax-control cash register etc., and they have all brought into play important effect in tax application and informationization.
Tax-card conduct tax-controlling device the earliest is made up of tax-card, card reader, storage SIM card.Tax-card is used for finishing invoice issuing, the generation of tax control sign indicating number etc., and the interface of itself and computing machine is comparatively complicated pci bus, need be inserted on the computer motherboard; The SIM storage card is used for storing invoice and buys information, sends a duplicate to the tax data; Card reader is the letter interface arrangement of tax-card and SIM storage card.
Tax-control cash register is collection input, printing and an one, does not need to be equipped with the tax-controlling device of computing machine and printer, has certain advantage on the cost price at that time.The keyboard of tax-control cash register, printing, demonstration all concentrate on the panel, use to some extent inconvenience, and tax-control cash register can only be used for opening invoice, and function is comparatively single, and versatility is relatively poor.
Above-mentioned tax-card and tax-control cash register all are to have adopted card reader arrangement and storage card, use loaded down with trivial details.
Hold strange, day analogy in addition on the market in addition, what revolve that utmost point company adopts is the twin-core sheet scheme that control chip and USB interface chip (ST72F651 is 8 machines) combine, and the twin-core sheet is too slow on communication time, speed, has also brought inconvenience to use.
Summary of the invention
The purpose of this invention is to provide a kind of single chip architecture, the fireballing tax control dish of retrieval invoice.
For achieving the above object, the present invention is by the following technical solutions:
The present invention is made up of tax control dish hardware system and tax control dish software systems, above-mentioned tax control dish hardware system comprises main control chip and the clock module that is connected with main control chip, power module, storer, buffer and USB interface protector, wherein, power module also is connected with clock module; Above-mentioned tax control dish software systems comprise hardware interface layer, file system management layer, safety management layer, tax application layer and the communication interface layer that is connected with tax control dish hardware system; In the file system management layer, take three grades of index technologies to carry out the invoice retrieval.
In tax control dish hardware system, buffer is a ferroelectric memory.
In tax control dish hardware system, power module is made of reserve battery and battery detecting module.
Above-mentioned power module is connected with the power protection module.
In three grades of index technologies, the one-level retrieval is arranged on the main control chip, 2-level search is arranged on the memory block, and three is arranged on the page of storer.
Above-mentioned clock module is for encrypting clock module.
Adopt the present invention of technique scheme, compare with tax-controlling device before this, the tax control dish is a kind of brand-new tax-controlling device, the tax control dish absorbed the tax information construction for many years successful experience and this year IT and the new results of information security technology, need not other card reader or memory card device, the one Individual Income Tax device of manipulating stock quotations just can be finished invoice purchase, invoice issuing, cancels and send a duplicate to business such as tax, can support national tax, land tax simultaneously, and each tax is used and supported nearly tens kinds of invoice type down.The architecture Design of tax control dish is succinct, uses general USB as communication interface, adopts and does not have the design of driving, and the user does not need to install extra driver.The tax control dish that uses the present invention to realize is with low cost, and use, easy to carry is a kind of tax-controlling device that very big popularizing application prospect is arranged.In addition, the present invention adopts single main control chip structure, and is more many soon at communication time and speed than dual master control chip; And, adopt three grades of index technologies, the one-level retrieval is put on the invoice section of main control chip, 2-level search is put on the memory block, and three is put on the page of storer, and recall precision is 0.3 second, and is more many soon than 1.3 seconds original retrieval times; At last, on hardware circuit, increase ferroelectric RAM, reduce read-write number of times, improve the life-span, make things convenient for the realization of Hamming error correction algorithm, strengthen data accuracy mass storage NANDFLASH.
Description of drawings
Fig. 1 is the one-piece construction block diagram of tax control dish hardware system of the present invention;
Fig. 2 is the circuit diagram of main control chip in the tax control dish hardware system of the present invention;
Fig. 3 is the circuit diagram of power module in the tax control dish hardware system of the present invention;
Fig. 4 is the circuit diagram of USB interface protector in the tax control dish hardware system of the present invention;
Fig. 5 is the circuit diagram of mass storage in the tax control dish hardware system of the present invention;
Fig. 6 is the circuit diagram of buffer in the tax control dish hardware system of the present invention;
Fig. 7 is the circuit diagram of clock module, reserve battery and battery detecting module in the tax control dish hardware system of the present invention;
Fig. 8 is the one-piece construction block diagram of tax control dish software systems of the present invention;
Fig. 9 is the structural drawing of file system management in the tax control dish software systems of the present invention;
Figure 10 is the process flow diagram of three grades of index technologies in the tax control dish software systems of the present invention;
Figure 11 is the application principle figure of the present invention in tax system.
Embodiment
Embodiment 1
The present invention is made up of tax control dish hardware system and tax control dish software systems.
As shown in Figure 1, tax control dish hardware system comprises main control chip U3 and the clock module that is connected with main control chip U3, power module, storer, buffer and USB interface protector, and wherein, power module also is connected with clock module.Hardware system is the various electronic devices and components that constitute the tax control dish, and components and parts form the integral body on the function by the connection of circuit under Digital Logic control.
As shown in Figure 2, the model of master controller U3 is SSX20, this chip in being emerging integrated circuit company limited adopt homemade 32 high safety kernel Arca2sc of custom-made, adopt 5 level production lines and risc architecture, inside has 128KB Flash to be used for stored programme, function library, and 32KB EEPROM is used to store data; Safety is set up and is comprised 1024 public key algorithm engine, DES/3DES algorithm engine and real random number generator; Inner integrated interface resource has USB controller, NANDFlash controller, SPI and UART serial ports.Main control chip U3 is mainly used to the collaborative work that moves tax control dish firmware program and coordinate each module.
As shown in Figure 3, the major function of power module is to stablize level and smooth power supply for total system provides.The model of chip U1 is AMS1117-3.3, it is a low-dropout regulator, it will be transformed to 3.3V and power to total system from the 5V of USB mouth, because this chip has low pressure reduction characteristic, can both export stable voltage when the voltage of USB at 5V AMS1117-3.3 when 4.5V changes, can not influence the work of tax control dish.
Under normal circumstances, the present invention adopts the USB interface power supply.But after the USB interface power down, the present invention can also set up reserve battery and battery detection module.As shown in Figure 7, the tax control dish after the USB interface power down, when reserve battery and battery detection circuit guarantee that the clock of clock module U4 is correctly walked and battery be lower than the detection of safety value.Reserve battery adopts disposable lithium cell CR2032, voltage 3V, capacity 210mAh.When the USB interface power down of outside, clock module U4 switch inside switches to reserve battery, when guaranteeing that clock continues accurately to walk.Battery voltage detection adopts LM393 comparer U5 to realize, the discharge thresholding of lithium battery CR2032 is 2.7V, 3.3V primary power through being connected to the in-phase end of comparer U5 after resistance R 7 and the R8 dividing potential drop, lithium battery CR2032 receives the end of oppisite phase of comparer U5 after resistance R 3 is isolated, capacitor C 5 plays the effect of low-pass filtering; When cell voltage was higher than 2.7V, 1 pin of comparer U5 was a low level, and 1 pin of comparer U5 becomes high level when being lower than 2.7V.The level signal that master controller SSX20 reads comparer 1 pin just can be judged the state of current cell voltage.
As shown in Figure 4, the function of USB interface protector is to realize the transmission of protection of abnormal conditions lower port and usb data.D+ among the socket J1 and D-are the USB differential signals, and SIH is the shielding earth signal.Since tax control dish USB interface with computing machine grafting process in can produce instantaneous high pressure, do not comprehend the USB mouth that damages computing machine or the USB mouth of master controller if do not add the safe place.At present increased port protection device U7 in the USB of tax control dish circuit, the model of port protection device U7 is NUF2042, and it is the interface chip of a ONNN, and portion is integrated within it transient suppressor TVS.When instantaneous high pressure occurring on the usb bus, TVS is the instantaneous energy ground circuit of releasing, and other equipment has been carried out effective protection.The D2i of its output and D1i signal are connected to USB differential signal USB_DM and the USB_DP pin of main control chip SSX20.The inner integrated controller of USB1.1 of main control chip SSX20, this interface has been realized data transmission between external usb host and the tax control dish.
As shown in Figure 5, the function of mass storage U6 is to realize the function of invoice detailed data storage in the tax control dish in the tax control dish hardware system of the present invention; It adopts the K9F1G08U0A chip of Samsung semiconductor company, is a kind of large-capacity storage media of NandFlash structure, and capacity is 128M.It has 8 data lines, 6 root signal wires, is connected the read-write operation of realizing internal storage unit with main control chip SSX20.The inner integrated Flash memory controller FCU of main control chip SSX20 produces sequential automatically when the outside Flash storage chip of read-write.IO0~IO7 is data and address multiplex line, is used for transmitting the address information that master controller is wanted addressed location, also is used for transmitting the data of read-write./ CE is the operation enable signal of chip, and storer just can receive outside interrogation signal when/CE pin was low level; The CLE signal is used for latching the order of bus transfer; Ale signal is used for latching the reference address of bus transfer; / RE signal is the enable signal of reading of master controller generation, and the data that storer will read are sent on the bus, realize read operation; / WE is the enable signal of writing of master controller generation, enables the sequential of writing of memory inside, finishes the storage of data; The R/B signal is a status signal of storer output, and whether master controller is finished by the read-write operation of the inside that the state that reads this signal is judged.These signals are finished the read-write operation of Large Volume Data jointly according to the sequential of appointment.
Caching function when as shown in Figure 6, Cache realization main control chip SSX20 writes data to mass storage.Because the erasable number of times of NandFlash is limited, in the frequent erasable life-span that can shorten its use,, increased the ferroelectric memory FM25CL64 of Ramtron semiconductor company in the circuit in order to reduce this frequent erasable operation.Ferroelectric memory U2 adopts special material and technology, makes this chip have the characteristic that read or write speed is fast and the data power down is not lost.Compare with the nonvolatile semiconductor memory member that EEPROM and Flash are same, ferroelectric memory has the advantages that to write fast with high-durability.The part of tax control dish may be stored among the ferroelectric memory U2 by frequently-modified data, increase the serviceable life of EEROM and NANDFlash, increase the stability of data storage.Operation-interface is the universal serial bus SPI of standard, has four signal wires and main control chip SSX20 to join, and/CS is a chip selection signal, ability receive clock and data-signal are finished the operation of appointment when for low level, SI is a serial input signals, and SO is the serial output signal, and SCLK is a serial clock signal.Because the inner integrated SPI controller of main control can easily be realized ferroelectric memory U2 is carried out read and write access.When data are less than a page or leaf in will writing the high capacity medium, temporary in ferroelectric, just write the high capacity medium when surpassing a page or leaf, reduced erasable number of times to the high capacity medium.Write fast and the high wear properties of ferroelectric memory have improved the serviceable life of whole tax control disc storaging system and the stability of work.
As shown in Figure 7, in the present invention, be to encrypt the embodiment that clock module is the best with the clock module, also can adopt common clock module in addition.In the present embodiment, clock module is mainly the tax control dish real-time clock accurately is provided, and finishes the generation of tax control sign indicating number when invoice issuing.It adopts the Asynchronous Serial Interface of full duplex, has two signal wires to link to each other with main control chip SSX20, is respectively serial data and sends TXD and serial data reception RXD, baud rate is 9600,10 a data layout, one of them start bit, 8 data bit, a position of rest.
As shown in Figure 8, tax control dish software systems comprise hardware interface layer, file system management layer, safety management layer, tax application layer and the communication interface layer that is connected with tax control dish hardware system.Wherein, hardware interface layer is the access hardware physical layer interface, as the read and write access software interface of K9F1G08U0A NANDFlash, FM25CL64 ferroelectric memory and clock module.The file system management layer defines and manages the professional relevant various file structures of the tax, and the read-write interface of file in EEPROM is provided.Safety management layer is implemented the set safety control strategy of tax control dish software systems.Tax application layer is according to the tax function of " invoice tax control dish and transmission plate technical manual (V2.0) " standard implementation.The communication interface layer is realized tax control dish and the computing machine of invoice enterprises end or the interface that tax office network end computing machine communicates by USB interface, and interface is followed the USB1.1 standard, and communication protocol is the BOT agreement of standard.Need to prove that above-mentioned hardware interface layer, safety management layer, tax application layer and communication interface layer are technology well known to those of ordinary skill in the art.
In the present invention, the file system management layer adopts tertiary structure, and as shown in Figure 9, wherein MF is a root directory; GS_APP is that national tax is used, and DS_APP is that land tax is used; Under the tax is used, comprise catalogue file, key file and use relevant TAG label file register information, monitoring management data, tax items tax category information etc. as the basic register information of user, user with the tax.
For the MF catalogue, wherein the definition of MF file header is as shown in table 1:
File header Byte (BYTES) Describe
File identifier 2 0x3f00
File name
6 TAXM01
File size 2 0x0100
The maximum application number 1 0x02
Built the application number 1 0x01
The gross space size 2 0x8000
Used the space 2 0x0100
Total length 16
Table 1
The definition of MF_DIR file is as shown in table 2:
File body Byte (BYTES) Describe
The DF identifier 1 The 0x01 national tax
Deleted marker 1 0x00 uses the 0xe5 deletion
The entry address 2 Set up when using and write
Termination address 2 Set up when using and write
Used the space 2 0x0100
The DF file name 6 GSDF01
Standby 2
Total length 16
The DF identifier 1 The 0x02 land tax
Deleted marker 1 0x00 uses the 0xe5 deletion
The entry address 2 Set up when using and write
Termination address 2 Set up when using and write
Used the space 2 0x0100
The DF file name 6 DSDF01
Standby 2
Total length 16
Table 2
The MF_KEY document definition is as shown in table 3:
Figure B2009101724762D0000061
Figure B2009101724762D0000071
Table 3
For the GS_APP file, it is used for national tax, and its details is as follows:
The definition of GS_APP file header is as shown in table 4:
File body Byte (BYTES) Describe
The DF identifier 1 The 0x01 national tax
Deleted marker 1 0x00 uses the 0xe5 deletion
The entry address 2 Set up when using and write
Termination address 2 Set up when using and write
Used the space 2 0x0100
Maximum invoice type number 1 0x09
Built the invoice type number 1 0x01
Filename length 1
The DF file name 20 GSDF01
The application table sign 1 0 expression does not have this this table of table 1 expression to exist
Total length 32
Table 4
The definition of GS_APP KEY file is as shown in table 5:
File header Byte (BYTES) Describe
File ID 2 The ID 0x5f02 of EF file
File name
6 DF_KEY
File size 2 0x0100
Authority 1 1 Keep
Authority 2 1 Write permission
LEN1
2 Key number 7
LEN2 2 Key length 18H
Table 5
The file body definition is as shown in table 6:
Table 6
The basic register information definition of user is as shown in table 7:
The field Chinese name Length (byte) Coded format Explanation
TAG
1 HEX Be fixed as: 02
LEN 2 HEX
Tax control dish numbering 6 BCD Coding rule is with reference to appendix 1
Taxpayer Identification Number 13 HEX Raw data is 20 byte ASC
Enabling time
7 BCD CCYYMMDDHHMMSS
Table 7
The user is general, and the register information definition is as shown in table 8:
The field Chinese name Length (byte) Coded format Explanation
TAG
1 HEX Be fixed as: 03
LEN 2 HEX
Competent tax authority's code 5 HEX Raw data is 6 byte BCD
Competent tax authority's title 80 ASC
Taxpayer's title 80 ASC
Taxpayer's coding 8 BCD
Other control information 80 ASC
Table 8
For the invoice type file, ADF1 is the invoice application directory under the national tax DDF1 catalogue, and the tax control dish is when using, and invoice type of every increase is used, and just sets up an ADF application directory under DDF1.
The definition of invoice file header is as shown in table 9:
File header Byte (BYTES) Describe
File ID 2 The ID 0x3f02 of EF file
File name
6 DF_FP
block
2 0x0000
Authority
1 1 Keep
Authority
2 1 Write permission
LEN1
1 Invoice hop count (maximum 10 sections)
LEN2 1 Present segment
page
1 Current page
segment
1 Current sector
Table 9
The definition of invoice segment information is as shown in table 10:
Figure B2009101724762D0000091
Figure B2009101724762D0000101
Table 10
The definition of monitoring management data is as shown in table 11:
Figure B2009101724762D0000102
Table 11
The definition of invoice template is as shown in table 12:
Figure B2009101724762D0000112
Figure B2009101724762D0000121
Table 12
The definition of the detailed variable data item of bill is as shown in table 13:
Figure B2009101724762D0000131
Table 13
The definition of tax category tax items data is as shown in table 14, and wherein the child user number of every kind of invoice type management must not be above 255:
The field Chinese name Length (byte) Coded format Explanation
TAG
1 HEX Be fixed as: 04
LEN 2 HEX
Tax category index 1 1 HEX Value 1~255
Tax category tax items code 1 3 BCD
The tax rate 1 3 HEX
The tax category 1 Chinese 40 HEX 20 Chinese characters
Tax items
1 Chinese 40 HEX 20 Chinese characters
Tax category index 2 1 HEX Value 1~255
Tax category tax items code 2 3 BCD
The tax rate 2 3 HEX
The tax category 2 Chineses 40 HEX 20 Chinese characters
Tax items
2 Chineses 40 HEX 20 Chinese characters
... ... ...
Table 14
For Dai Kai unit, the definition of Dai Kai unit's registration child user information is as shown in Table 15, and wherein the child user number of every kind of invoice type management mostly is 5000 most, and child user information is pressed Taxpayer Identification Number and arranged by ascending order:
The field Chinese name Length (byte) Coded format Explanation
TAG
1 HEX Be fixed as: 05
LEN 4 HEX
Logical address 2 HEX The NandFlash logical address
Assignment flag
1 0xaa distributes, and 0xff does not distribute
Table 15
Leave among the K9F1G08U0A NANDFlash for opening the unit record content, formal definition is shown in table 16:
The field Chinese name Length (byte) Coded format Explanation
TAG 1 HEX Be fixed as: 05
LEN 4 HEX
Taxpayer Identification Number 1 13 HEX Raw data is 20 byte ASC
Taxpayer's title 1 80 ASC
Deduction and exemption sign 1 1 ' 00 '-normal; ' 01 '--deduction and exemption.
... ... ...
Taxpayer Identification Number N 13 HEX Raw data is 20 byte ASC
Taxpayer's title N 80 ASC
Deduction and exemption sign N 1 ' 00 '-normal; ' 01 '--deduction and exemption.
Table 16
Use for the DS_APP land tax, wherein the definition of DS_APP file header is shown in table 17:
File body Byte (BYTES) Describe
The DF identifier 1 The 0x02 land tax
Deleted marker 1 0x00 uses the 0xe5 deletion
The entry address 2 Set up when using and write
Termination address 2 Set up when using and write
Used the space 2 Used space 0x0100
Maximum invoice type number 1 0x09
Built the invoice type number 1 0x01
Filename length
1
The DF file name 20 GSDF01、DSDF01
The application table sign 1 0 expression does not have this this table of table 1 expression to exist
Total length 32
Table 17
Other file content storage under the DDF2 land tax catalogue with its under ADF invoice application directory form and DDF1 national tax under identical.
Concerning with Flash invoice file storage design of the present invention, the invoice managing detailed catalogue in the tax control dish is stored among the mass storage K9F1G08U0A NANDFlash, and capacity is 128MB.Mass storage K9F1G08U0A structure is formed by 1024, every 128K byte; Every 64 pages, every page of 2k; Every page of 4 sectors, each sector 512 byte.Each sector comprises the spare space SpareData of one 16 byte, OOB.When design FLASH invoice file storage, need consider the rapidity of invoice stability of stored and invoice retrieval.And the NANDFlash storer is not a kind of very stable memory device, some out of use bad pieces before dispatching from the factory, NANDFlash are just arranged, along with the increase of NANDFlash erasing times, also have bad piece and produce, and the phenomenon of " position saltus step " can appear in some bank bits.For the detailed such significant data of storage invoice, must take corresponding techniques to come the certified invoice stability of stored.
The inquiry of tax control dish invoice, detailed data recover and the detailed read operation of invoice when declaring dutiable goods all relates to the invoice retrieval technique.When enterprise manipulated stock quotations in royalities, the invoice managing detailed catalogue constantly write in the tax control dish, if the detailed data of an invoice distributes by the 1K byte, can store more than 10 ten thousand invoices in the tax control dish at most.For this low speed embedded system that operates in 24MHz of tax control dish, design suitable FLASH invoice storage organization and seem very important to improve the invoice retrieval rate.
The present invention is for improving the invoice retrieval rate among the NANDFlash, the tax control dish adopts three grades of index technologies of independent research design: the one-level retrieval is put on the invoice segment file of master controller SSX20 chip, 2-level search is put in the piece of K9F1G08U0A NAND, three is put on the page of NANDFlash, and individual invoice retrieval time is 0.3 second.
Specifically, in the invoice segment information of one-level invoice retrieving information under the ADF invoice is used, comprised the invoice coordinate indexing information of this invoice section:
Open umber, from date, NANDFlash starting block, deletion invoice umber, date of expiry, NANDFlash termination piece, stop page or leaf, developed poll.The definition of invoice section is shown in table 18:
Figure B2009101724762D0000151
Figure B2009101724762D0000161
Table 18
The invoice secondary index is that NANDFlash piece invoice is summed up information, and totally 32 bytes are summed up the population characteristic valuve information of stored invoice file in this NANDFlash piece, and are shown in table 19:
Byte
The initial ID of invoice file 2 It is exactly the skew in the invoice section
Invoice file from date 4 Setting up the date of first invoice
The invoice end of file date 4 Setting up the date of last invoice of this part
The invoice sum of setting up 1
Keep 21
Table 19
Three grades of index of invoice are invoice file header information, and shared 16 bytes are described corresponding invoice detail, and are shown in table 20:
File header Byte (BYTES) Describe
The invoice file ID 2 Skew in the invoice section
Setting up the date of invoice 4
The invoice state 1 Several states of invoice
Invoice type 1 Also do not use
The invoice size 2 Represent by byte
The inlet of invoice file 1 Which little page or leaf (1k of unit) at piece
Keep
5
Table 20
The invoice state description:
0x00: the positive number invoice of having opened; 0x01: the negative invoice of having opened;
0x02: the voided check of not opening invoice; 0x03: the voided check of having opened the positive number invoice;
0x04: the voided check of having opened the negative invoice;
The preceding 2K byte of each piece of the NANDFlash that secondary invoice retrieving information and three information take in the invoice detail is made up of invoice file header and NANDFlash piece invoice summary information.The NANDFlash piece invoice of the preceding 2K byte of each NANDFlash piece invoice file header information that can to deposit 126 length be 16 bytes and one 32 byte is summed up information, the invoice detailed data that it is 1KB that 126 maximum lengths can be deposited just in the space of the remaining 126K byte of this NANDFlash piece like this.
The process of inquiring about the invoice detail by date is divided into three steps, as shown in figure 10:
1. read the invoice section number of invoice in the tax control dish, in each invoice section, read " from date " and " date of expiry " data item in the corresponding one-level index information, whether the date of invoice that judgement will be inquired about is in the middle of this two dates, if it is eligible, read " starting block " and " termination piece " information of this invoice section in the one-level index, otherwise inquire about next invoice section.
2. NANDFlash " starting block " and " termination piece " circulate, read " invoice file from date " and " invoice end of file date " in the secondary index among the NANDFlash, judge whether to meet querying condition, if it is eligible, carry out next step, otherwise inquire about next NANDFlash piece.
3. invoice file " from date " and " invoice end of file date ", judge whether to meet querying condition,, carry out next step, otherwise inquire about next NANDFlash piece if eligible.
Read " setting up the date of the invoice " data item in three grades of index invoice file headers successively, judge whether to meet the date querying condition,, read corresponding invoice managing detailed catalogue if meet.
Tax control dish invoice file system adopts aforesaid three grades of index technologies, can improve the utilization ratio and the invoice retrieval rate of NANDFlash storer to greatest extent.
At last, in the present invention, also adopted the ferroelectric memory cache technology,
Compare with the nonvolatile semiconductor memory member that EEPROM and Flash are same, ferroelectric memory FRAM has the advantages that to write fast with high-durability.
Specifically, the speed of the speed of ferroelectric memory F-RAM execution write operation and read operation is the same fast.With regard to write data under bus speed, F-RAM becomes Nonvolatile data to the data that write and does not have any delay.Compare with the reading and writing data time-delay based on 5 milliseconds of the nonvolatile memories of Floating-gate Technology, the writing speed of F-RAM was tens nanoseconds only, and is essential in security system application.
In addition, ferroelectric memory F-RAM provides the almost unlimited permanance that writes, and this just means that it does not exist as other nonvolatile semiconductor memory members.For the nonvolatile memory that adopts Floating-gate Technology, there is the hard fault of 1E5 clock period and can't writes, be not suitable for being applied to the application of high-durability.
EEPROM and mass storage K9F1G08U0A NANDFlash in two types the storage medium SSX20 primary controller are arranged in the tax control dish.
Ferroelectric memory FM25CL64 and the performance of the two are more shown in table 21:
Write time Erasing time Limit erasing times The data holding time
?NANDFlash 300μs 2ms 100K 10 years
?EEPROM 1.3ms 4ms 300K 100 years
?FRAM 0.3μs Need not to wipe Unlimited 45 years
Table 21
Mass storage K9F1G08U0A NANDFlash is after piece is wiped, and the data in one page scope are write indegree and required and can not surpass 4 times, otherwise can influence the serviceable life of this piece Flash.Can there be a bit bit flipping phenomenon in mass storage NANDFlash, and this problem is fatal when Flash storage critical file, need use checking algorithms such as EDC/ECC in order to solve the bit flipping problem.Above-mentioned EDC/ECC checking algorithm is a technology well known to those of ordinary skill in the art.
The NNADFlash controller of main control chip SSX20 produces the ECC sign indicating number when read-write NANDFlash 512 byte datas are provided.The invoice file of Jie Shaoing is in NANDFlah in the storage organization in front, if open an invoice, just the invoice file header with 16 bytes writes among the NANDFlash, can be written into 127 times in the scope of one page of 2k before the NANDFlash, much larger than the maximum principles that write for 4 times of one page, to influence the serviceable life of this piece Flash greatly like this, such mode of operation also can't use the NNADFlash controller to produce the function of ECC check code.
In the tax control dish, use ferroelectric memory FM25CL64, utilize that it is non-volatile, write and need not to wipe and high wear properties can effectively solve above-mentioned two problems.When opening invoice, earlier the invoice file header is write among the FM25CL64, wouldn't write among the NANDFlash; When the invoice number of opening reaches 32, the disposable NANDFlash that writes of the invoice file header information of this 512 byte in the position of preceding 2K space correspondence, and is written to the ECC check code that the NANDFlash controller produces among the OOB of this sector.Such method of operating makes the preceding 2K storer of NANDFlash only need write 4 times, can not influence original serviceable life of this piece Flash.When reading certain sector data of NANDFlash, the NANDFlash controller also can produce the ECC check code, if this ECC check code is different with the ECC check code that is stored in the OOB district, illustrate that the bit flipping phenomenon has taken place NANDFlash, use software ECC sign indicating number calibration algorithm can wherein 1 to 2 be calibrated, effectively the accuracy of certified invoice data.The invoice detailed data maximum length that is stored in back 126 bytes in the NANDFlash piece is the integral multiple of 512 bytes, does not have problems in the above-mentioned generation of writing indegree and ECC sign indicating number.
As mentioned above, the tax control dish adopts the design that is temporarily stored in the FM25CL64 ferroelectric memory to nearest 32 invoice file headers.The tax control dish can carry out comparatively frequent operation to the invoice of opening recently in operation flow, as reads the content of a nearest invoice, the invoice of opening is recently cancelled etc.The characteristic that writes fast and read of ferroelectric memory makes the speed of these operations obviously improve, can there be effect to reduce system's power down causes damage to data risk, relating to, also reduced the number of times that NANDFlash is wiped, writes to opening invoice file header when operation of invoice recently.
In sum, stability and the serviceable life that the technology of employing ferroelectric memory high-speed cache can effectively improve the tax control disc storaging system in the tax control dish.
Embodiment 2
Present embodiment as different from Example 1; in the present embodiment; for implementing the present invention better; can also set up the power protection module in addition is connected with power module; above-mentioned power protection module mainly is meant the inductance L 1 that suppresses rush of current; it can effectively reduce the influence of instantaneous large-current to tax control dish circuit, as shown in Figure 3.
The other technologies feature is identical with embodiment 1.
Embodiment 3
Present embodiment as different from Example 1, in the present embodiment, in tax control dish hardware system, buffer is double-ring coupled full optical buffer, above-mentioned double-ring coupled full optical buffer is a technology well known to those of ordinary skill in the art.
All optical network based on the light exchange is the inexorable trend of communication network, and the exchange of light digital packet is the final selection of all optical network.Full optical buffer is the critical component of the full light digital packet switching network in future, and it is the basis that scheduling of very high speediness rate communication network and controlling packet are transmitted.It can not only improve the handling capacity of optical switching network node effectively, reduces packet loss, slack time is provided handles so that node carries out packet header.When the different same passage of user's contention, buffer can provide the scheme that solves competition effectively; Perhaps when waiting for access network, a plurality of users need line up with it.Packet is accepted and preserved to optical buffer at full speed, and receiver can be read these packets with slow speed simultaneously, reaches the purpose that speed adjustment and Frame re-assembly.Therefore, full optical buffer just becomes the core component of full optical router.Therefore double-ring coupled full optical buffer being applied in the tax control dish has been the inexorable trend that develops in the future.
The other technologies feature is identical with embodiment 1.

Claims (6)

1. tax control dish, it is made up of tax control dish hardware system and tax control dish software systems, it is characterized in that: described tax control dish hardware system comprises main control chip and the clock module that is connected with main control chip, power module, storer, buffer and USB interface protector, wherein, power module also is connected with clock module; Described tax control dish software systems comprise hardware interface layer, file system management layer, safety management layer, tax application layer and the communication interface layer that is connected with tax control dish hardware system; In described file system management layer, take three grades of index technologies to carry out the invoice retrieval.
2. tax control dish according to claim 1 is characterized in that: in described tax control dish hardware system, buffer is a ferroelectric memory.
3. tax control dish according to claim 1 is characterized in that: in described tax control dish hardware system, power module is made of reserve battery and battery detecting module.
4. tax control dish according to claim 3 is characterized in that: described power module is connected with the power protection module.
5. tax control dish according to claim 1 is characterized in that: in three grades of index technologies, the one-level retrieval is arranged on the main control chip, 2-level search is arranged on the memory block, and three is arranged on the page of storer.
6. tax control dish according to claim 1 is characterized in that: described clock module is for encrypting clock module.
CN2009101724762A 2009-10-16 2009-10-16 Tax disk Active CN102044115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101724762A CN102044115B (en) 2009-10-16 2009-10-16 Tax disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101724762A CN102044115B (en) 2009-10-16 2009-10-16 Tax disk

Publications (2)

Publication Number Publication Date
CN102044115A true CN102044115A (en) 2011-05-04
CN102044115B CN102044115B (en) 2012-08-22

Family

ID=43910225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101724762A Active CN102044115B (en) 2009-10-16 2009-10-16 Tax disk

Country Status (1)

Country Link
CN (1) CN102044115B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544790A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Invoice tax control data processing method
CN103544787A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Tax disc
CN103544786A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Tax control disc
CN105809853A (en) * 2014-12-30 2016-07-27 航天信息股份有限公司 Billing system and method compatible with plurality of invoice types
CN106933879A (en) * 2015-12-30 2017-07-07 航天信息股份有限公司 Invoice data tracking and system
CN106934664A (en) * 2015-12-28 2017-07-07 航天信息股份有限公司 A kind of distributed tax control counting server and system
CN107340812A (en) * 2017-08-28 2017-11-10 浙江爱德电子有限公司 Graphic display device of fire control room

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2733475Y (en) * 2004-08-12 2005-10-12 四川中信昊园高科技(集团)有限公司 Tax controller
CN2751361Y (en) * 2004-08-12 2006-01-11 湖南威远信息技术有限公司 Tax controller
CN101344981A (en) * 2006-09-01 2009-01-14 陈国祥 Tax control module
CN201262763Y (en) * 2008-09-05 2009-06-24 国营红峰机械厂 Tax-controlled cashing machine

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544790A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Invoice tax control data processing method
CN103544787A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Tax disc
CN103544786A (en) * 2012-07-11 2014-01-29 北京旋极信息技术股份有限公司 Tax control disc
CN103544786B (en) * 2012-07-11 2016-01-20 北京旋极信息技术股份有限公司 Tax control tray
CN103544790B (en) * 2012-07-11 2016-06-01 北京旋极信息技术股份有限公司 The treatment process of a kind of invoice tax control data
CN105809853A (en) * 2014-12-30 2016-07-27 航天信息股份有限公司 Billing system and method compatible with plurality of invoice types
CN106934664A (en) * 2015-12-28 2017-07-07 航天信息股份有限公司 A kind of distributed tax control counting server and system
CN106934664B (en) * 2015-12-28 2020-09-25 航天信息股份有限公司 Distributed tax-control billing server and system
CN106933879A (en) * 2015-12-30 2017-07-07 航天信息股份有限公司 Invoice data tracking and system
CN107340812A (en) * 2017-08-28 2017-11-10 浙江爱德电子有限公司 Graphic display device of fire control room
CN107340812B (en) * 2017-08-28 2023-05-26 浙江爱德智能科技股份有限公司 Graphic display device of fire control room

Also Published As

Publication number Publication date
CN102044115B (en) 2012-08-22

Similar Documents

Publication Publication Date Title
CN102044115B (en) Tax disk
CN103679932B (en) A kind of computer system that can read and write bank card
CN105843558B (en) Handle the method and system of chronological file
CN101145264A (en) Business affairs bank card processing system and method
CN105205508A (en) Self-service card issuing machine for intelligent card
CN201607794U (en) Tax control tray
CN102135942A (en) Method for realizing wear-leveling in storage equipment as well as the storage equipment
CN101114359A (en) IC card electronic payment system with bidirectional data-transmission network
US9772937B2 (en) Data processing method, memory controller and memory storage apparatus
CN101510332B (en) Method and apparatus for managing memory space of smart card
CN100587740C (en) Tax-control data declaration, checking treatment method of network tax-control system
CN101256645A (en) Integration burgher card system and setting method
CN101807320A (en) Terminal aiming at non-contact intelligent card and method thereof for processing abnormality
CN107665464A (en) Generate method, apparatus, equipment and the computer-readable recording medium of reference message
CN105528676A (en) Book mutual borrowing system based on cloud computing technology
CN103218300B (en) Data processing method, Memory Controller and memorizer memory devices
CN201307311Y (en) IC card electronic payment system of dual-direction data transmitting network
CN102521146A (en) Data addressing storage method of flash memory block subdivision
CN103812902A (en) Mobile terminal and offline working method and system by using same
CN104992212B (en) Tourism smart card system
CN202453952U (en) Tax administration system based on mobile network
CN101470873A (en) Method for implementing interaction with intelligent memory card in multi-file read-write mode
CN201122314Y (en) Network tax controller device
CN201392550Y (en) Mechanical equipment leasing management system
CN102103774B (en) Composite application realization method and system, and smart card

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: HENAN SPACEFLIGHT ZHONGRUI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: HENAN XUJI INFORMATION CO., LTD.

Effective date: 20130531

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20130531

Address after: 450004 Henan city of Zhengzhou province is tube street intersection road center north 300 Mi Ludong road and Dai Dingcheng District Wenzhi Industrial Agglomeration

Patentee after: Henan Aerospace Zhongrui Technology Co., Ltd.

Address before: 450004 No. 41, South Road, Zhengzhou, Henan, Dongming

Patentee before: Henan Xuji Information Co., Ltd.

ASS Succession or assignment of patent right

Owner name: HENAN XUJI INFORMATION CO., LTD.

Free format text: FORMER OWNER: HENAN SPACEFLIGHT ZHONGRUI TECHNOLOGY CO., LTD.

Effective date: 20140422

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20140422

Address after: 450004 No. 41, South Road, Zhengzhou, Henan, Dongming

Patentee after: Henan Xuji Information Co., Ltd.

Address before: 450004 Henan city of Zhengzhou province is tube street intersection road center north 300 Mi Ludong road and Dai Dingcheng District Wenzhi Industrial Agglomeration

Patentee before: Henan Aerospace Zhongrui Technology Co., Ltd.