CN102611688A - Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device - Google Patents
Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device Download PDFInfo
- Publication number
- CN102611688A CN102611688A CN2011104270608A CN201110427060A CN102611688A CN 102611688 A CN102611688 A CN 102611688A CN 2011104270608 A CN2011104270608 A CN 2011104270608A CN 201110427060 A CN201110427060 A CN 201110427060A CN 102611688 A CN102611688 A CN 102611688A
- Authority
- CN
- China
- Prior art keywords
- blacklist
- base table
- data
- list
- decrement
- 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
Links
Landscapes
- Cash Registers Or Receiving Machines (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a long-distance updating method of blacklist data of a terminal POS (Point-Of-Sale) device. The long-distance updating method of the blacklist data of the terminal POS (Point-Of-Sale) device comprises the following steps of: step 1, uploading an own version number of the blacklist data; step 2, selectively downloading blacklists by a center server according to the blacklist version number of the terminal POS device; step 3, adding increment blacklists stored in a temporary storage area into a base list and deleting decrement blacklist data from the base list by the terminal POS device. Compared with the prior art, the long-distance updating method provided by the invention has the advantages as follows: only the increment and decrement data can be downloaded when the data is downloaded by using a communication means; and the communication transmission time is short.
Description
Technical field:
The present invention relates to realize between the equipment in a kind of two or more big group the method for work compound, further relate to a kind of terminal POS device blacklist remote data update method.
Background technology:
The POS of reality off-line consumption has the blacklist of reporting the loss card, and blacklist generally upgrades through network download (dialing, GPRS, VPN etc.).Blacklist is to change every day, the blacklist of increase is arranged, also the blacklist of minimizing arranged.The backstage central server is regularly issued the good whole blacklists (base table) of ordering every day; The blacklist data must sort; POS can utilize the method search efficiency of binary search the highest like this, and the POS machine that is distributed in the various places, city upgrades whole blacklists through network download.Download whole blacklists every day under the slow transmission means of network, need for a long time.
Summary of the invention:
The object of the present invention is to provide a kind of economical and practical blacklist data-updating method.
Terminal POS device blacklist remote data update method; The blacklist data are divided into base table, increment list, decrement list; Version number of every group of blacklist data setting, central server is regularly published new blacklist data, and the available ram space of program is minimum to be n+1 times (n >=1) of the minimum erasable unit of FLASH; FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA); Use district, treatment region to have identical structure, be divided into blacklist file header and blacklist file body; The blacklist file header indicates information such as blacklist service marking, version number, blacklist bar number; Increment blacklist, the decrement blacklist of download deposited in the scratchpad area (SPA);
Step 1: at first terminal POS device and central server communication, upload the blacklist versions of data number of self;
Step 2: central server is selectively downloaded blacklist according to the blacklist version number of terminal POS device; If version number is up-to-date, then prompting need not to download; If version number is not up-to-date, then download corresponding increment list and decrement list; If central server does not have the increment list and the decrement list of the version number that the terminal POS device submitted to, the then up-to-date base table of download center server;
Step 3: the terminal POS device adds the increment blacklist that is stored in the scratchpad area (SPA) in the base table to, and decrement blacklist data are deleted from base table.
The detailed process of said step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to the starting position, put FLASH and use district's increment list sector pointers to the starting position, put FLASH and use district's decrement list sector pointers to the starting position;
Step 3-102: judge and use district's base table whether to finish dealing with,, change step 3-501 if accomplish; If do not accomplish, change step 3-103;
Step 3-103: read and use base table sector pointers place, district 1 sector data to the base table buffering area;
Step 3-104: judge whether the decrement list data finish dealing with,, change step 3-201 if accomplish; If do not accomplish, change step 3-105;
Step 3-105: read 1 the decrement list blacklist in FLASH decrement list pointer place to the decrement list buffering area, judge then: base table buffering area and decrement list buffer data are compared, if do not have, change step 3-201; If have, change step 3-106;
Step 3-106: the identical data of deletion in the base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Change step 3-104 then;
Step 3-201: judge whether the increment list data finish dealing with, change step 3-401 if accomplish; If do not accomplish, change step 3-202;
Step 3-202: read 1 the increment list blacklist in FLASH increment list pointer place to the increment list buffering area;
Step 3-203: judge then: whether the increment list buffer data in base table buffering area scope, if not, changes step 3-301; If change step 3-204;
Step 3-204: incremental data is inserted into the base table buffer data, the rearrangement of base table buffering area; Increment list pointer+1 then; Change step 3-201 then;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector,, change step 302 if not; If elder generation sorts after remaining FLASH increment list blacklist is put into the base table buffering area, and then change step 302;
Step 3-302: judge the base table buffering area whether greater than the sector capacity of FLASH, if base table buffering area intercepting one sector data is listed treatment region in, the base table buffering area subtracts a sector byte number, repeating step 3-302 then; If, do not change step 3-401;
Step 3-401: judge and use district's base table sector pointers, whether point to last sector, if all valid data of base table buffering area are written to treatment region; If, do not change step 3-102;
Step 3-501: put treatment region for using the district, use the district to be treatment region to withdraw from then.
The present invention needs following configuration.
The backstage central server can be regularly published ordering good blacklist base table, increment blacklist table, decrement blacklist table.Server retention increment blacklist, decrement blacklist a period of time.
The configuration of POS machine: the space of program RAM capable of using is minimum to be n+1 times (n >=1) of the minimum erasable unit of FLASH, and the space of RAM is the bigger the better.If the every sector of the minimum erasable unit of FLASH is a S byte; Every blacklist B byte; Then at every turn multipotency is handled increment blacklist and decrement blacklist n*S/B bar, that is to say that ram space big more single treatment increment blacklist and decrement blacklist quantity are many more; FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA).Use district, treatment region to have identical structure, be divided into blacklist file header and blacklist file body.The blacklist file header indicates information such as blacklist service marking, version number, blacklist bar number.Increment blacklist, the decrement blacklist of download deposited in the scratchpad area (SPA)
The backstage central server also can be issued increment blacklist based on a last blacklist base table (card lose report the loss) and decrement blacklist (finding card after reporting the loss again) every day; The increment blacklist and the decrement blacklist of issue every day keep a period of time, for example 10 days.If the blacklist date of POS machine the inside is in 10 days like this; The POS machine is only downloaded corresponding increment blacklist and decrement blacklist; The POS machine carries out the ordering by merging processing to original own blacklist and increment blacklist of just having downloaded and decrement blacklist then, has been exactly up-to-date blacklist.
The present invention has the following advantages with respect to prior art:
Only download increase and decrease amount data when (one) utilizing the means of communication data download, the communication transmission time is short.
(2) hardware components is only used the internal RAM of processor self band, need not expand external RAM, effectively reduces product cost.
(3) not restriction of the size of blacklist base table as long as FLASH can preserve, just can be sorted.
Description of drawings
Fig. 1 realizes the detailed process logic diagram that data are downloaded for the present invention.
Embodiment:
Embodiment:
IC-card consumption terminal (being equivalent to the POS machine that the present invention mentions) and dispatch terminal (data communication apparatus) are installed above the bus.The IC-card consumption terminal can be connected with dispatch terminal, through dispatch terminal consumption data upload in real time, service centre also can the real time down parameter.
The Hardware configuration of IC-card consumption terminal is following:
The RAM that 56k is arranged in the CPU:ARM7 LPC2378 sheet
Outside FLASH: two SST25VF032,32Mbit SPI Serial Flash.Minimum erasable every sector 4Kbyte
The software arrangements of algorithm:
The basic buffer memory of distributing to this algorithm is 2*4Kbyte, handles increment decrement blacklist 4kbyte byte (every blacklist 8 bytes in this example once can be handled totally 512 in increment decrement blacklist) at most.Every day only issued blacklist one time by central server generally speaking, and increment blacklist and decrement blacklist summation can be above 512.
Step 1: at first terminal POS device and central server communication, upload the blacklist versions of data number of self;
Step 2: central server is selectively downloaded blacklist according to the blacklist version number of terminal POS device; If version number is up-to-date, then prompting need not to download; If version number is not up-to-date, then download corresponding increment list and decrement list; If central server does not have the increment list and the decrement list of the version number that the terminal POS device submitted to, the then up-to-date base table of download center server;
Step 3: the terminal POS device adds the increment blacklist that is stored in the scratchpad area (SPA) in the base table to, and decrement blacklist data are deleted from base table.
The detailed process of said step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to the starting position, put FLASH and use district's increment list sector pointers to the starting position, put FLASH and use district's decrement list sector pointers to the starting position;
Step 3-102: judge and use district's base table whether to finish dealing with,, change step 3-501 if accomplish; If do not accomplish, change step 3-103;
Step 3-103: read and use base table sector pointers place, district 1 sector data to the base table buffering area;
Step 3-104: judge whether the decrement list data finish dealing with,, change step 3-201 if accomplish; If do not accomplish, change step 3-105;
Step 3-105: read 1 the decrement list blacklist in FLASH decrement list pointer place to the decrement list buffering area, judge then: base table buffering area and decrement list buffer data are compared, if do not have, change step 3-201; If have, change step 3-106;
Step 3-106: the identical data of deletion in the base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Change step 3-104 then;
Step 3-201: judge whether the increment list data finish dealing with, change step 3-401 if accomplish; If do not accomplish, change step 3-202;
Step 3-202: read 1 the increment list blacklist in FLASH increment list pointer place to the increment list buffering area;
Step 3-203: judge then: whether the increment list buffer data in base table buffering area scope, if not, changes step 3-301; If change step 3-204;
Step 3-204: incremental data is inserted into the base table buffer data, the rearrangement of base table buffering area; Increment list pointer+1 then; Change step 3-201 then;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector,, change step 302 if not; If elder generation sorts after remaining FLASH increment list blacklist is put into the base table buffering area, and then change step 302;
Step 3-302: judge the base table buffering area whether greater than the sector capacity of FLASH, if base table buffering area intercepting one sector data is listed treatment region in, the base table buffering area subtracts a sector byte number, repeating step 3-302 then; If, do not change step 3-401;
Step 3-401: judge and use district's base table sector pointers, whether point to last sector, if all valid data of base table buffering area are written to treatment region; If, do not change step 3-102;
Step 3-501: put treatment region for using the district, use the district to be treatment region to withdraw from then.
Network connects configuration:
The IC-card consumption terminal is interconnected through CAN and dispatch terminal, and dispatch terminal is interconnected through GPRS and server.
The actual download data:
Download blacklist base table 8000 (every 8byte) and need 36 minutes.
Download 150 60 seconds of decrement blacklist time spent of 150 increment blacklists, 3 seconds of data processing time spent.
Test result: the superiority through contrasting this algorithm is obvious.
Claims (2)
1. terminal POS device blacklist remote data update method; The blacklist data are divided into base table, increment list, decrement list; Version number of every group of blacklist data setting, central server is regularly published new blacklist data, and the available ram space of program is minimum to be n+1 times (n >=1) of the minimum erasable unit of FLASH; FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA); Use district, treatment region to have identical structure, be divided into blacklist file header and blacklist file body; The blacklist file header indicates information such as blacklist service marking, version number, blacklist bar number; Increment blacklist, the decrement blacklist of download deposited in the scratchpad area (SPA); It is characterized in that:
Step 1: at first terminal POS device and central server communication, upload the blacklist versions of data number of self;
Step 2: central server is selectively downloaded blacklist according to the blacklist version number of terminal POS device; If version number is up-to-date, then prompting need not to download; If version number is not up-to-date, then download corresponding increment list and decrement list; If central server does not have the increment list and the decrement list of the version number that the terminal POS device submitted to, the then up-to-date base table of download center server;
Step 3: the terminal POS device adds the increment blacklist that is stored in the scratchpad area (SPA) in the base table to, and decrement blacklist data are deleted from base table.
2. according to the said terminal POS device of claim 1 blacklist remote data update method, it is characterized in that the detailed process of said step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to the starting position, put FLASH and use district's increment list sector pointers to the starting position, put FLASH and use district's decrement list sector pointers to the starting position;
Step 3-102: judge and use district's base table whether to finish dealing with,, change step 3-501 if accomplish; If do not accomplish, change step 3-103;
Step 3-103: read and use base table sector pointers place, district 1 sector data to the base table buffering area;
Step 3-104: judge whether the decrement list data finish dealing with,, change step 3-201 if accomplish; If do not accomplish, change step 3-105;
Step 3-105: read 1 the decrement list blacklist in FLASH decrement list pointer place to the decrement list buffering area, judge then: base table buffering area and decrement list buffer data are compared, if do not have, change step 3-201; If have, change step 3-106;
Step 3-106: the identical data of deletion in the base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Change step 3-104 then;
Step 3-201: judge whether the increment list data finish dealing with, change step 3-401 if accomplish; If do not accomplish, change step 3-202;
Step 3-202: read 1 the increment list blacklist in FLASH increment list pointer place to the increment list buffering area;
Step 3-203: judge that the increment list buffer data whether in base table buffering area scope, if not, changes step 3-301; If change step 3-204;
Step 3-204: incremental data is inserted into the base table buffer data, the rearrangement of base table buffering area; Increment list pointer+1 then; Change step 3-201 then;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector,, change step 302 if not; If elder generation sorts after remaining FLASH increment list blacklist is put into the base table buffering area, and then change step 302;
Step 3-302: judge the base table buffering area whether greater than the sector capacity of FLASH, if base table buffering area intercepting one sector data is listed treatment region in, the base table buffering area subtracts a sector byte number, repeating step 3-302 then; If, do not change step 3-401;
Step 3-401: judge and use district's base table sector pointers, whether point to last sector, if all valid data of base table buffering area are written to treatment region; If, do not change step 3-102;
Step 3-501: put treatment region for using the district, use the district to be treatment region to withdraw from then.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110427060.8A CN102611688B (en) | 2011-12-15 | 2011-12-15 | Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110427060.8A CN102611688B (en) | 2011-12-15 | 2011-12-15 | Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102611688A true CN102611688A (en) | 2012-07-25 |
CN102611688B CN102611688B (en) | 2014-09-17 |
Family
ID=46528844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110427060.8A Expired - Fee Related CN102611688B (en) | 2011-12-15 | 2011-12-15 | Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102611688B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103035083A (en) * | 2012-11-29 | 2013-04-10 | 深圳市新国都技术股份有限公司 | Intelligent card transaction function implement method |
CN103064908A (en) * | 2012-12-18 | 2013-04-24 | 北京讯鸟软件有限公司 | Method for rapidly removing repeated list through a memory |
CN103294978A (en) * | 2013-05-09 | 2013-09-11 | 马钢控制技术有限责任公司 | Method of POS machine for identifying RFID electronic tag |
CN104954123A (en) * | 2014-03-28 | 2015-09-30 | 中国银联股份有限公司 | Intelligent POS terminal main key updating system and updating method |
CN105359180A (en) * | 2013-07-01 | 2016-02-24 | 日本电气株式会社 | Validity control system, terminal device, server device, recording medium, method, and program |
CN105580037A (en) * | 2013-09-19 | 2016-05-11 | 日本电气株式会社 | Blacklist updating system, terminal device, method, and program recording medium |
CN107025472A (en) * | 2015-06-24 | 2017-08-08 | 广东华大互联网股份有限公司 | A kind of card reader and its control method with wireless communication module |
CN107426154A (en) * | 2017-04-14 | 2017-12-01 | 广州羊城通有限公司 | A kind of method for managing black list |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050024007A (en) * | 2003-09-04 | 2005-03-10 | 주식회사 피메이트 | Small sum liquidation method and system thereof |
US20050071539A1 (en) * | 2002-04-16 | 2005-03-31 | Eric Gerbault | Method for modification of data on a memory card on a transaction |
CN1916852A (en) * | 2006-09-07 | 2007-02-21 | 中控科技集团有限公司 | Method for modifying single data through online |
CN1968086A (en) * | 2005-11-17 | 2007-05-23 | 日电(中国)有限公司 | Subscriber authentication system and method for communication network |
-
2011
- 2011-12-15 CN CN201110427060.8A patent/CN102611688B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050071539A1 (en) * | 2002-04-16 | 2005-03-31 | Eric Gerbault | Method for modification of data on a memory card on a transaction |
KR20050024007A (en) * | 2003-09-04 | 2005-03-10 | 주식회사 피메이트 | Small sum liquidation method and system thereof |
CN1968086A (en) * | 2005-11-17 | 2007-05-23 | 日电(中国)有限公司 | Subscriber authentication system and method for communication network |
CN1916852A (en) * | 2006-09-07 | 2007-02-21 | 中控科技集团有限公司 | Method for modifying single data through online |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103035083A (en) * | 2012-11-29 | 2013-04-10 | 深圳市新国都技术股份有限公司 | Intelligent card transaction function implement method |
CN103064908A (en) * | 2012-12-18 | 2013-04-24 | 北京讯鸟软件有限公司 | Method for rapidly removing repeated list through a memory |
CN103064908B (en) * | 2012-12-18 | 2016-03-16 | 北京讯鸟软件有限公司 | A kind of method by the quick duplicate removal list of internal memory |
CN103294978A (en) * | 2013-05-09 | 2013-09-11 | 马钢控制技术有限责任公司 | Method of POS machine for identifying RFID electronic tag |
CN105359180A (en) * | 2013-07-01 | 2016-02-24 | 日本电气株式会社 | Validity control system, terminal device, server device, recording medium, method, and program |
CN105580037A (en) * | 2013-09-19 | 2016-05-11 | 日本电气株式会社 | Blacklist updating system, terminal device, method, and program recording medium |
CN104954123A (en) * | 2014-03-28 | 2015-09-30 | 中国银联股份有限公司 | Intelligent POS terminal main key updating system and updating method |
CN107025472A (en) * | 2015-06-24 | 2017-08-08 | 广东华大互联网股份有限公司 | A kind of card reader and its control method with wireless communication module |
CN107426154A (en) * | 2017-04-14 | 2017-12-01 | 广州羊城通有限公司 | A kind of method for managing black list |
Also Published As
Publication number | Publication date |
---|---|
CN102611688B (en) | 2014-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102611688B (en) | Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device | |
CN101539885B (en) | Soft ware autonomous air upgrading method of wireless communication module, device and system thereof | |
CN103312732A (en) | Method and device for data file transmission | |
CN107027036A (en) | A kind of FPGA isomeries accelerate decompression method, the apparatus and system of platform | |
CN104066077A (en) | OTA downloading and upgrading method and device thereof | |
CN105553684B (en) | A kind of communication system and its router upgrade method of application | |
Samteladze et al. | DELTA: Delta encoding for less traffic for apps | |
CN104410700A (en) | Method for issuing crank call list as well as crank call interception method and system | |
CN112182010B (en) | Dirty page refreshing method and device, storage medium and electronic equipment | |
CN108415708A (en) | Processing method, device, equipment and the storage medium of application program installation kit size | |
CN112711612A (en) | Data processing method, data processing device, storage medium and electronic device | |
CN104866339A (en) | Distributed persistent management method, system and device of FOTA data | |
CN109377383A (en) | Product data synchronous method, device, computer equipment and storage medium | |
CN110489138A (en) | A kind of application update method, device and storage medium | |
CN105204981A (en) | Application performance test method and device | |
CN104956340A (en) | Scalable data deduplication | |
CN109471799B (en) | Method, device, storage medium and terminal for deploying demand environment | |
CN105187556A (en) | Method and device for data back-to-source, and edge server | |
CN104239538B (en) | A kind of snapshot-type log compression method, system and device | |
CN112559020A (en) | File upgrading method, device, equipment and medium | |
CN104123160A (en) | Element level updating method for navigation equipment | |
CN102480505A (en) | Data increment transmission method and device | |
CN110166318A (en) | A kind of data statistical approach and device | |
CN106775802B (en) | Method and system for quickly updating mass small files | |
CN115328457A (en) | Method and device for realizing form page based on parameter configuration |
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 | ||
C56 | Change in the name or address of the patentee | ||
CP01 | Change in the name or title of a patent holder |
Address after: 300142 Hebei District, Chen Chen Road, No. 3, Tianjin Patentee after: TIANJIN TONGKA INTELLIGENT NETWORK TECHNOLOGY CO.,LTD. Address before: 300142 Hebei District, Chen Chen Road, No. 3, Tianjin Patentee before: TIANJIN IC CARD PUBLIC NETWORK SYSTEM Co.,Ltd. |
|
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: 20140917 Termination date: 20211215 |