CN102611688B - 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
- CN102611688B CN102611688B CN201110427060.8A CN201110427060A CN102611688B CN 102611688 B CN102611688 B CN 102611688B CN 201110427060 A CN201110427060 A CN 201110427060A CN 102611688 B CN102611688 B CN 102611688B
- 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.)
- Expired - Fee Related
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 large 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 is generally downloaded (dialing, GPRS, VPN etc.) by network and upgraded.Blacklist is to change every day, has the blacklist of increase, also has the blacklist of minimizing.The whole blacklists (base table) that sorted are issued in central server timing every day in backstage, blacklist data must sort, POS can utilize the method search efficiency of binary search the highest like this, is distributed in the POS machine of various places, city by the whole blacklists of network down loading updating.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, 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, the available ram space of program is minimum be the minimum erasable unit of FLASH n+1 doubly, n >=1, FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA); Use district, treatment region to there is identical structure, use and divide into blacklist file header and blacklist file body; Blacklist file header indicates the information such as blacklist service marking, version number, blacklist number; Increment blacklist, the decrement blacklist of download deposited in scratchpad area (SPA);
Step 1: 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, point out without download; If version number is not up-to-date, download corresponding increment list and decrement list; If central server does not have increment list and the decrement list of the version number that terminal POS device submits to, the up-to-date base table of download center server;
Step 3: terminal POS device adds the increment blacklist that is stored in scratchpad area (SPA) in base table to is deleted decrement blacklist data from base table.
The detailed process of described step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to starting position, put FLASH and use district's increment list sector pointers to starting position, put FLASH and use district's decrement list sector pointers to starting position;
Step 3-102: judge and use district's base table whether to finish dealing with, if completed, go to step 3-501; If do not completed, go to step 3-103;
Step 3-103: read and use base table sector pointers place of district 1 sector data to base table buffering area;
Step 3-104: judge that whether decrement list data finish dealing with, if completed, go to step 3-201; If do not completed, go to step 3-105;
Step 3-105: read 1, FLASH decrement list pointer place decrement list blacklist to decrement list buffering area, then judgement: base table buffering area and decrement list buffer data are compared, if there is no decrement list buffer data in base table buffering area, go to step 3-201; If have decrement list buffer data in base table buffering area, go to step 3-106;
Step 3-106: delete identical data in base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Then go to step 3-104;
Step 3-201: judge that whether increment list data finish dealing with, and go to step 3-401 if completed; If do not completed, go to step 3-202;
Step 3-202: read 1, FLASH increment list pointer place increment list blacklist to increment list buffering area;
Step 3-203: then judgement: whether increment list buffer data within the scope of base table buffering area, if not, goes to step 3-301; If so, go to step 3-204;
Step 3-204: incremental data is inserted into base table buffer data, the rearrangement of base table buffering area; Then increment list pointer+1; Then go to step 3-201;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector, if not, go to step 302; If so, sort after first remaining FLASH increment list blacklist being put into base table buffering area, and then go to step 302;
Step 3-302: judge whether base table buffering area is greater than a sector capacity of FLASH, and if so, base table buffering area intercepts a sector data and lists treatment region in, and base table buffering area subtracts a sector byte number, then repeating step 3-302; If not, go to step 3-401;
Step 3-401: judgement is used district's base table sector pointers, whether points to last sector, if so, all base table buffering area valid data is written to treatment region; If not, go to step 3-102;
Step 3-501: put treatment region for using district, use district is treatment region, then exits.
The present invention needs following configuration.
Backstage central server can be regularly published the blacklist base table, increment blacklist table, the decrement blacklist table that have sorted.Server retention increment blacklist, decrement blacklist a period of time.
POS machine configuration: program can be utilized doubly (n >=1) of n+1 of the space of the RAM minimum erasable unit of the minimum FLASH of being, the space of RAM is the bigger the better.If the every sector of the minimum erasable unit of FLASH is S byte, every blacklist B byte, multipotency is processed increment blacklist and decrement blacklist n*S/B bar at every turn, that is to say that ram space larger single treatment increment blacklist and decrement blacklist quantity are more; FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA).Use district, treatment region to there is identical structure, use and divide into blacklist file header and blacklist file body.Blacklist file header indicates the information such as blacklist service marking, version number, blacklist number.Increment blacklist, the decrement blacklist of download deposited in scratchpad area (SPA)
Backstage central server also can be issued increment blacklist based on a upper blacklist base table (card lose report the loss) and decrement blacklist (after reporting the loss, finding again card) every day, the increment blacklist that issue every day and decrement blacklist retain a period of time, for example 10 days.If the blacklist date of POS machine the inside is in 10 days like this, POS machine is only downloaded corresponding increment blacklist and decrement blacklist, then POS machine carries out ordering by merging processing to original oneself blacklist and firm just-downloaded increment blacklist and decrement blacklist, has been exactly up-to-date blacklist.
The present invention has the following advantages with respect to prior art:
(1) while utilizing means of communication downloading data, only download increase and decrease amount data, the communication transfer 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) size of blacklist base table does not limit, as long as FLASH can preserve, just can sort.
Brief description of the drawings
Fig. 1 is that the present invention realizes the detailed process logic diagram that data are downloaded.
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 bus.IC-card consumption terminal can be connected with dispatch terminal, by dispatch terminal consumption data upload in real time, service centre also can real time down parameter.
The hardware configuration of IC-card consumption terminal is as follows:
In CPU:ARM7LPC2378 sheet, there is the RAM of 56k
Outside FLASH: two SST25VF032,32Mbit SPI Serial Flash.Minimum erasable every sector 4Kbyte
The software configuration of algorithm:
The basic buffer memory of distributing to this algorithm is 2*4Kbyte, processes at most increment decrement blacklist 4kbyte byte (every blacklist 8 bytes in this example, once can process totally 512, increment decrement blacklist).Generally every day only issued blacklist one time by central server, and increment blacklist and decrement blacklist summation can not exceed 512.
Step 1: 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, point out without download; If version number is not up-to-date, download corresponding increment list and decrement list; If central server does not have increment list and the decrement list of the version number that terminal POS device submits to, the up-to-date base table of download center server;
Step 3: terminal POS device adds the increment blacklist that is stored in scratchpad area (SPA) in base table to is deleted decrement blacklist data from base table.
The detailed process of described step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to starting position, put FLASH and use district's increment list sector pointers to starting position, put FLASH and use district's decrement list sector pointers to starting position;
Step 3-102: judge and use district's base table whether to finish dealing with, if completed, go to step 3-501; If do not completed, go to step 3-103;
Step 3-103: read and use base table sector pointers place of district 1 sector data to base table buffering area;
Step 3-104: judge that whether decrement list data finish dealing with, if completed, go to step 3-201; If do not completed, go to step 3-105;
Step 3-105: read 1, FLASH decrement list pointer place decrement list blacklist to decrement list buffering area, then judgement: base table buffering area and decrement list buffer data are compared, if there is no decrement list buffer data in base table buffering area, go to step 3-201; If have decrement list buffer data in base table buffering area, go to step 3-106;
Step 3-106: delete identical data in base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Then go to step 3-104;
Step 3-201: judge that whether increment list data finish dealing with, and go to step 3-401 if completed; If do not completed, go to step 3-202;
Step 3-202: read 1, FLASH increment list pointer place increment list blacklist to increment list buffering area;
Step 3-203: then judgement: whether increment list buffer data within the scope of base table buffering area, if not, goes to step 3-301; If so, go to step 3-204;
Step 3-204: incremental data is inserted into base table buffer data, the rearrangement of base table buffering area; Then increment list pointer+1; Then go to step 3-201;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector, if not, go to step 302; If so, sort after first remaining FLASH increment list blacklist being put into base table buffering area, and then go to step 302;
Step 3-302: judge whether base table buffering area is greater than a sector capacity of FLASH, and if so, base table buffering area intercepts a sector data and lists treatment region in, and base table buffering area subtracts a sector byte number, then repeating step 3-302; If not, go to step 3-401;
Step 3-401: judgement is used district's base table sector pointers, whether points to last sector, if so, all base table buffering area valid data is written to treatment region; If not, go to step 3-102;
Step 3-501: put treatment region for using district, use district is treatment region, then exits.
Network connects configuration:
IC-card consumption terminal is interconnected by CAN and dispatch terminal, and dispatch terminal is interconnected by GPRS and server.
Actual download data:
Download blacklist base table 8000 (every 8byte) and need 36 minutes.
Download 150 60 seconds of decrement blacklist used time of 150 increment blacklists, 3 seconds of data processing used time.
Test result: apparent by contrasting the superiority of this algorithm.
Claims (2)
1. terminal POS device blacklist remote data update method, 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, the available ram space of program is minimum be the minimum erasable unit of FLASH n+1 doubly, n >=1, FLASH preserves blacklist, is divided into current use district, treatment region and scratchpad area (SPA); Use district, treatment region to there is identical structure, use and divide into blacklist file header and blacklist file body; Blacklist file header indicates blacklist service marking, version number, blacklist number information; Increment blacklist, the decrement blacklist of download deposited in scratchpad area (SPA); It is characterized in that:
Step 1: 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, point out without download; If version number is not up-to-date, download corresponding increment list and decrement list; If central server does not have increment list and the decrement list of the version number that terminal POS device submits to, the up-to-date base table of download center server;
Step 3: terminal POS device adds the increment blacklist that is stored in scratchpad area (SPA) in base table to is deleted decrement blacklist data from base table.
2. terminal POS device blacklist remote data update method according to claim 1, is characterized in that, the detailed process of described step 3 is:
Step 3-101: initializing variable, put FLASH and use district's base table sector pointers to starting position, put FLASH and use district's increment list sector pointers to starting position, put FLASH and use district's decrement list sector pointers to starting position;
Step 3-102: judge and use district's base table whether to finish dealing with, if completed, go to step 3-501; If do not completed, go to step 3-103;
Step 3-103: read and use base table sector pointers place of district 1 sector data to base table buffering area;
Step 3-104: judge that whether decrement list data finish dealing with, if completed, go to step 3-201; If do not completed, go to step 3-105;
Step 3-105: read 1, FLASH decrement list pointer place decrement list blacklist to decrement list buffering area, then judgement: base table buffering area and decrement list buffer data are compared, if there is no decrement list buffer data in base table buffering area, go to step 3-201; If have decrement list buffer data in base table buffering area, go to step 3-106;
Step 3-106: delete identical data in base table buffering area, the rearrangement of base table buffering area; FLASH decrement list pointer+1; Then go to step 3-104;
Step 3-201: judge that whether increment list data finish dealing with, and go to step 3-401 if completed; If do not completed, go to step 3-202;
Step 3-202: read 1, FLASH increment list pointer place increment list blacklist to increment list buffering area;
Step 3-203: judge that increment list buffer data whether within the scope of base table buffering area, if not, goes to step 3-301; If so, go to step 3-204;
Step 3-204: incremental data is inserted into base table buffer data, the rearrangement of base table buffering area; Then increment list pointer+1; Then go to step 3-201;
Step 3-301: judge and use district's base table sector pointers whether to point to last sector, if not, go to step 302; If so, sort after first remaining FLASH increment list blacklist being put into base table buffering area, and then go to step 302;
Step 3-302: judge whether base table buffering area is greater than a sector capacity of FLASH, and if so, base table buffering area intercepts a sector data and lists treatment region in, and base table buffering area subtracts a sector byte number, then repeating step 3-302; If not, go to step 3-401;
Step 3-401: judgement is used district's base table sector pointers, whether points to last sector, if so, all base table buffering area valid data is written to treatment region; If not, go to step 3-102;
Step 3-501: put treatment region for using district, use district is treatment region, then exits.
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 CN102611688A (en) | 2012-07-25 |
CN102611688B true 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) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103035083A (en) * | 2012-11-29 | 2013-04-10 | 深圳市新国都技术股份有限公司 | Intelligent card transaction function implement method |
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 |
CN105359180B (en) * | 2013-07-01 | 2020-08-14 | 日本电气株式会社 | Validity control system, terminal device and method |
US20160210619A1 (en) * | 2013-09-19 | 2016-07-21 | Nec Corporation | 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 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2838536B1 (en) * | 2002-04-16 | 2005-06-24 | A S K | METHOD OF MODIFYING DATA OF A MEMORY CARD DURING A TRANSACTION |
KR20050024007A (en) * | 2003-09-04 | 2005-03-10 | 주식회사 피메이트 | Small sum liquidation method and system thereof |
-
2011
- 2011-12-15 CN CN201110427060.8A patent/CN102611688B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN102611688A (en) | 2012-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102611688B (en) | Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device | |
CN111124277B (en) | Deep learning data set caching method, system, terminal and storage medium | |
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 | |
CN110543324B (en) | Plug-in increment updating method and device for application program | |
CN109756533B (en) | Mirror image acceleration method and device and server | |
CN108681504A (en) | Automated testing method, test server and computer readable storage medium | |
CN100378663C (en) | Method, system and module for dynamic downloading of applied programe to user identification | |
CN112711612A (en) | Data processing method, data processing device, storage medium and electronic device | |
CN108875035B (en) | Data storage method of distributed file system and related equipment | |
CN112069195A (en) | Database-based message transmission method and device, electronic equipment and storage medium | |
CN110489138A (en) | A kind of application update method, device and storage medium | |
CN112182010A (en) | Dirty page refreshing method and device, storage medium and electronic equipment | |
CN109582344A (en) | Increment updating method, device, Cloud Server and computer readable storage medium | |
CN109471799B (en) | Method, device, storage medium and terminal for deploying demand environment | |
CN104239538B (en) | A kind of snapshot-type log compression method, system and device | |
CN112416388A (en) | Intelligent mobile terminal software upgrading method and upgrading control system thereof | |
CN112559020A (en) | File upgrading method, device, equipment and medium | |
CN104123160A (en) | Element level updating method for navigation equipment | |
CN117056428A (en) | Automatic expansion method, device and server of partition table | |
CN102480505A (en) | Data increment transmission method and device | |
CN108829574B (en) | Test data laying method, test server and computer readable storage medium | |
CN111277624A (en) | Vehicle-mounted device and vehicle information collection system | |
CN104836842A (en) | Method and device for synchronizing FTP server files | |
CN113434525B (en) | Cache data updating method and device, storage medium and electronic device |
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 |
Granted publication date: 20140917 Termination date: 20211215 |
|
CF01 | Termination of patent right due to non-payment of annual fee |