[go: up one dir, main page]

CN106407299A - Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters - Google Patents

Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters Download PDF

Info

Publication number
CN106407299A
CN106407299A CN201610767709.3A CN201610767709A CN106407299A CN 106407299 A CN106407299 A CN 106407299A CN 201610767709 A CN201610767709 A CN 201610767709A CN 106407299 A CN106407299 A CN 106407299A
Authority
CN
China
Prior art keywords
unit
crown word
asterisk wildcard
blacklist data
library 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.)
Pending
Application number
CN201610767709.3A
Other languages
Chinese (zh)
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.)
Eastern Communication Co Ltd
Hangzhou Dongxin Finance Technology Service Co Ltd
Original Assignee
Eastern Communication Co Ltd
Hangzhou Dongxin Finance Technology Service 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 Eastern Communication Co Ltd, Hangzhou Dongxin Finance Technology Service Co Ltd filed Critical Eastern Communication Co Ltd
Priority to CN201610767709.3A priority Critical patent/CN106407299A/en
Publication of CN106407299A publication Critical patent/CN106407299A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90339Query processing by using parallel associative memories or content-addressable memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a banknote crown word number blacklist data storage and retrieval method supporting wildcard characters. The storage method comprises the steps of decomposing a crown word number into an m-bit head and an n-bit number, and constructing a blacklist database file, wherein the blacklist database file comprises a wildcard character library, a head bit table, a head number storage area, multiple head units and multiple number units, the head units and the number units are in one-to-one correspondence, and each of the number units includes a number mode record table and multiple number storage areas. According to the banknote crown word number blacklist data storage and retrieval method supporting the wildcard characters disclosed by the invention, a special data structure is adopted as a blacklist database, so the storage space of a library file can be reduced, the data are added and deleted conveniently, and the retrieval speed is improved.

Description

A kind of paper money number blacklist data supporting asterisk wildcard stores and search method
Technical field
Data storage and search technical field of the present invention, more particularly, to a kind of paper money number blacklist supporting asterisk wildcard Data storage and search method.
Background technology
In China's cash circulation field and banking system, the legitimacy of bank note identity differentiates and circulation tracking is to hit puppet Make, the powerful measure of the criminal offence such as the national currency that alters, be also the important leverage safeguarding financial security.Illegal point of minority The son counterfeit money that makes unlicensed printing is sought exorbitant profit, and disrupts the market, the financial security of heavy damage country.In order in self-service cash Processing equipment(As ATM)Upper Zhen, except filtering these counterfeit moneys, timely and accurately provides counterfeit money to warn for vast bank client, effectively Ground prevents counterfeit money and back flows back into the field of circulation by ATM inflow bank or from bank, needs invention one kind to be preced with using bank note Font size code blacklist, carries out, to the bank note cash of the ATM that comes in and goes out, the system that the contrast of crown word number is filtered, will appear in blacklist Crown word number or the suspect note matching with the crown word number of wildcard pattern in blacklist detain recovery, and to carrying out The bank client of the deposit or the withdrawal and bank's background monitoring system provide warning letter.
In order to generate paper money number blacklist, need counterfeit money crown word number is entered in blacklist data library file, by In counterfeit money substantial amounts, corresponding serial number is also magnanimity information, if crown word number is stored one by one in order black In name monofile, need huge memory space, and retrieve quite time-consuming, recall precision is low.
Content of the invention
The purpose of the present invention is to overcome current paper money number blacklist data storage and search method to take memory space Greatly, the slow technical problem of retrieval rate, there is provided a kind of paper money number blacklist data supporting asterisk wildcard stores and retrieves Method, it adopts special data structure as black list database, can reduce the memory space of library file, convenient add and Delete data, improve retrieval rate.
In order to solve the above problems, the present invention employs the following technical solutions and is achieved:
A kind of paper money number blacklist data storage method supporting asterisk wildcard of the present invention, including:
Crown word number is decomposed into the number of m position and the number of n position, builds blacklist data library file, blacklist data library file Including asterisk wildcard storehouse, number position table, number number memory block, several number units and several number units, number unit Correspond with number unit, number unit includes Number pattern log and several number memory blocks;
Asterisk wildcard storehouse, sole legal wildcard characters in the blacklist data library file that is stored with;
Number position table, including some positions, each represents a specific number, and is provided with this representative of mark on each The number whether position key assignments in blacklist data library file;
Number number memory block, the total number of the blacklist data library file medium size head that is stored with;
Number unit, be stored with different number;
Number unit, the number of the corresponding number unit storage of each number unit is associated, and storage has this pass chain store Whole numbers of head, each the number memory block in number unit is stored with a number;
Number pattern log, using the number with identical asterisk wildcard number, position as a kind of Number pattern, each according to number Whether position is that number is divided into 2 by asterisk wildcardnPlant Number pattern, corresponding number of each Number pattern in the number unit of record place The number of code.
In the technical program, crown word number is decomposed into number and number, is stored in different forms respectively, and set The vertical number position table representing that number whether there is, by number unit and number unit by crown word number full storage, number unit Storage has whole numbers of association number, and the memory space of occupancy is greatly reduced.Meanwhile, the data structure that the present invention adopts Except specific serial number can be stored, the serial number with some asterisk wildcards can also be stored, that is, carry asterisk wildcard The set of cluster serial number, reduces the memory space of occupancy further.For example, store one in advance in black list database Individual specific crown word number D06B123456, when ATM detects and inquires this crown word number in data base, you can should Bank note does screening as suspicious coin and filters process;Crown word number D06B****** can also be prestored then it represents that all with The crown word number of D06B beginning, can be queried to and regard suspicious coin and process.
Preferably, described number unit includes number memory block and index address, each number memory block is stored with one Individual number, index address points to the corresponding number unit of place number unit.
Preferably, described blacklist data library file also includes maximum, and commonly crown word number number memory block, maximum are special Crown word number number memory block, common crown word number number memory block and special crown word number number memory block, common crown word number does not contain Asterisk wildcard, special crown word number contains asterisk wildcard.Asterisk wildcard storehouse, maximum common crown word number number memory block, maximum special crown word number Number memory block, common crown word number number memory block and special crown word number number memory block, number position table, the storage of number number Area, several number units and several number units are sequentially deposited successively.
Preferably, the value of each of number is all to choose from 26 letters, 10 numerals and 1 asterisk wildcard , number is regarded as 37 system numbers, sets this corresponding decimal value of 10 numerals of 0-9 as value itself, this 26 letters of A-Z are right The decimal value answered is respectively 10-35, and the corresponding decimal value of asterisk wildcard is 36, calculates the corresponding decimal value of number, It is the number of a that a+1 position in the table of number position represents corresponding decimal value.Whether inquiry number is in blacklist data library file When middle, calculate number corresponding decimal value a, the position key assignments of a+1 position in the table of inquiry number position, if position key assignments is 1 Represent this number in blacklist data library file, if position key assignments is 0 to represent this number not in blacklist data library file.
Preferably, number unit depositing in blacklist data library file is sequentially 37 according to its stored number The arrangement of binary value ascending order.Dichotomising search easy to use searches number, improves retrieval rate.
Preferably, the value of each of number is all to choose in 10 numerals and 1 asterisk wildcard, number is regarded as 11 system numbers, set this corresponding decimal value of 10 numerals of 0-9 as value itself, and the corresponding decimal value of asterisk wildcard is 10, number In code unit, number memory block deposits the 11 binary value ascending order arrangements that order is according to its stored number.It is easy to use Dichotomising search searches number, improves retrieval rate.
Preferably, number unit is deposited according to 37 binary value ascending order orders of its stored number, number unit is pressed Associate after 37 binary value ascending orders of number are sequentially stored in number unit according to it, the size of each number unit is K1 word Section, the size of each number unit is K2 byte;
When needing to add crown word number to blacklist data library file, execute following steps:
N1:Judge whether blacklist data library file is empty, if sky, then add number unit and number unit, according to hat The number setting number position table of font size, if not being empty, execution step N2;
N2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then execution step N3, otherwise execution step N4;
N3:The position key assignments of position corresponding in the table of number position is put 1, the number number in number number memory block is added 1, determines number The on position of unit simultaneously adds number unit, determines the on position of number unit and adds number unit, updates number mould Formula log, the index address of all number units before this number unit is added K1, will be all after this number unit The index address of number unit adds K3, K3=K1+K2;
N4:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if in number unit, add step and terminate, otherwise, add number, and update Number pattern log, should The index address of all number units after number unit adds K2.
Preferably, when needing to delete the crown word number in blacklist data library file, executing following steps:
M1:Judge whether blacklist data library file is empty, if sky, then delete unsuccessfully, if not being empty, execution step M2;
M2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then deleting unsuccessfully, otherwise execution step M3;
M3:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if not in number unit, deleted unsuccessfully, if in number unit, execution step M4;
M4:If this number unit is last and this number unit only one of which number of all number units, will number In the table of head position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and is somebody's turn to do Number unit, the index address of all number units before this number unit subtracts K1;
If last and this number unit only one of which number of this number unit not all number unit, by number In the table of position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and this number Code unit, the index address of all number units before this number unit subtracts K1, all number lists after this number unit The index address of unit subtracts K3, K3=K1+K2;
If this number unit is last of all number units and this number unit has multiple numbers, delete this number Corresponding number in unit, updates Number pattern log;
If last and this number unit of this number unit not all number unit have multiple numbers, delete this number Corresponding number in code unit, updates Number pattern log, the index address of all number units after this number unit Subtract K2.
Data order in blacklist data library file is deposited, when deleting crown word number, internal data adjust automatically storage Location and index address, reduce memory space.
The present invention a kind of based on a kind of above-mentioned paper money number blacklist data storage method supporting asterisk wildcard Data retrieval method, including:
S1:Read the crown word number to be checked of input, take out the number of crown word number to be checked, this number is common number without asterisk wildcard Head, the numerical value in one or more in number is replaced with asterisk wildcard, obtains 2mSpecial number of -1 difference containing asterisk wildcard Head, using common number and special number as number to be checked;
S2:Inquire about the position key assignments of each number to be checked corresponding position in the table of number position successively, number to be checked is judged according to position key assignments Whether it is stored in blacklist data library file, when inquiring certain number to be checked and being stored in blacklist data library file, Execution step S3, if all numbers to be checked are all not stored in blacklist data library file, exports crown word number to be checked not Information in blacklist;
S3:Take out the number of crown word number to be checked, this number is the common number without asterisk wildcard, will be one or more in number On numerical value with asterisk wildcard replace, obtain 2n- 1 different special number containing asterisk wildcard, by common number and special number As number to be checked;
Find out the number unit corresponding number unit storing this number to be checked, inquire about the Number pattern of this number unit successively The number of the corresponding number of every kind of Number pattern in log, is more than 0 when inquiring certain Number pattern corresponding number number When, obtain the number to be checked belonging to this Number pattern, whether be stored with enquiry number unit this number to be checked, if it does, Then export information in blacklist for the crown word number to be checked, and terminate to inquire about, otherwise continue the Number pattern that inquiry residue is not inquired about The number of corresponding number;
When all Number patterns in Number pattern log be all queried out-of-date, if not storing any one in number unit Individual number to be checked, then export information not in blacklist for the crown word number to be checked.
The invention has the beneficial effects as follows:Using special data structure as black list database, except tool can be stored The serial number of body, can also store the serial number with some asterisk wildcards, that is, carry the cluster serial number of asterisk wildcard Set, can reduce the memory space of library file, conveniently add and delete data, improve retrieval rate.
Brief description
Fig. 1 is the storage organization schematic diagram of blacklist data library file;
Fig. 2 is the interpolation flow process of blacklist crown word number;
Fig. 3 is the deletion flow process of blacklist crown word number.
Specific embodiment
Below by embodiment, and combine accompanying drawing, technical scheme is described in further detail.
Embodiment:A kind of paper money number blacklist data storage method supporting asterisk wildcard of the present embodiment, including:
Crown word number is decomposed into the number of m position and the number of n position, builds blacklist data library file, as shown in figure 1, blacklist Database file includes asterisk wildcard storehouse, maximum common crown word number number memory block, the maximum special crown word number sequentially deposited successively Number memory block, common crown word number number memory block, special crown word number number memory block, number position table, number number memory block, Several number units and several number units, common crown word number does not contain asterisk wildcard, and special crown word number contains asterisk wildcard, number Head unit is corresponded with number unit, and number unit includes Number pattern log and several number memory blocks;
Asterisk wildcard storehouse, the ASCII character of sole legal wildcard characters in the blacklist data library file that is stored with;
Number position table, including some positions, each represents a specific number, and is provided with this representative of mark on each The number whether position key assignments in blacklist data library file;
Number number memory block, the total number of the blacklist data library file medium size head that is stored with;
Number unit, be stored with different number;Number unit includes number memory block and index address, and each number is deposited Storage area is stored with a number, and index address points to the corresponding number unit of place number unit;
Number unit, the number of the corresponding number unit storage of each number unit is associated, and storage has this pass chain store Whole numbers of head, each the number memory block in number unit is stored with a number;
Number pattern log, using the number with identical asterisk wildcard number, position as a kind of Number pattern, each according to number Whether position is that number is divided into 2 by asterisk wildcardnPlant Number pattern, corresponding number of each Number pattern in the number unit of record place The number of code.
Crown word number is decomposed into number and number, is stored in different forms respectively, and whether set up expression number The number position table existing, by number unit and number unit by crown word number full storage, number unit storage has pass chain store Whole numbers of head, are greatly reduced the memory space of occupancy.Meanwhile, the data structure that the present invention adopts is except storing tool The serial number of body, can also store the serial number with some asterisk wildcards, that is, carry the cluster serial number of asterisk wildcard Set, reduces the memory space of occupancy further.For example, store a specific crown word number in advance in black list database D06B123456, when ATM detects and inquires this crown word number in data base, you can using this bank note as suspicious coin Do screening and filter process;Crown word number D06B****** can also be prestored then it represents that all crown word number with D06B beginning, Can be queried to and regard suspicious coin to process.
Because the possible situation containing asterisk wildcard is 2 in n item codenIndividual, so having 2nPlant Number pattern.Such as 12345* With asterisk wildcard in 54335* all at the 6th, belong to same Number pattern;In 12*45* and 54*35* asterisk wildcard all the 3rd, Six, belong to same Number pattern.
The value of each of number is all to choose from 26 letters, 10 numerals and 1 asterisk wildcard, and number is seen Make 37 system numbers, set this corresponding decimal value of 10 numerals of 0-9 as value itself, this corresponding decimal scale of 26 letters of A-Z Value is respectively 10-35, and the corresponding decimal value of asterisk wildcard is 36, calculates the corresponding decimal value of number, in the table of number position A+1 position represent the number that corresponding decimal value is a.For example:Number D0*B is in the 13*37 of number position table3+0*372+ 36*37+11+1 position, if this position key assignments is 1 to represent this number in blacklist data library file, if this position key Value is 0 to represent this number not in blacklist data library file.
Number unit depositing in blacklist data library file is sequentially 37 binary value according to its stored number Ascending order arrangement.Dichotomising search easy to use searches number, improves retrieval rate.
The value of each of number is all to choose in 10 numerals and 1 asterisk wildcard, and number is regarded as 11 system numbers, Set this corresponding decimal value of 10 numerals of 0-9 as value itself, the corresponding decimal value of asterisk wildcard is 10, interior number of number unit The order of depositing of code memory block is to arrange according to 11 binary value ascending orders of its stored number.Dichotomising search easy to use Search number, improve retrieval rate.
Number unit is deposited according to 37 binary value ascending order orders of its stored number, and number unit closes chain store according to it After 37 binary value ascending orders of head are sequentially stored in number unit, the size of each number unit is K1 byte, each number The size of unit is K2 byte;
As shown in Fig. 2 when needing to add crown word number to blacklist data library file, executing following steps:
N1:Judge whether blacklist data library file is empty, if sky, then add number unit and number unit, setting number Head position table, index address, number number, Number pattern log, if not being empty, execution step N2;
N2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then execution step N3, otherwise execution step N4;
N3:The position key assignments of position corresponding in the table of number position is put 1, the number number in number number memory block is added 1, determines number The on position of unit simultaneously adds number unit, determines the on position of number unit and adds number unit, updates number mould Formula log, the index address of all number units before this number unit is added K1, will be all after this number unit The index address of number unit adds K3, K3=K1+K2;
N4:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if in number unit, add step and terminate, otherwise, add number, and update Number pattern log, should The index address of all number units after number unit adds K2.
As shown in figure 3, when needing to delete the crown word number in blacklist data library file, executing following steps:
M1:Judge whether blacklist data library file is empty, if sky, then delete unsuccessfully, if not being empty, execution step M2;
M2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then deleting unsuccessfully, otherwise execution step M3;
M3:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if not in number unit, deleted unsuccessfully, if in number unit, execution step M4;
M4:If this number unit is last and this number unit only one of which number of all number units, will number In the table of head position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and is somebody's turn to do Number unit, the index address of all number units before this number unit subtracts K1;
If last and this number unit only one of which number of this number unit not all number unit, by number In the table of position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and this number Code unit, the index address of all number units before this number unit subtracts K1, all number lists after this number unit The index address of unit subtracts K3, K3=K1+K2;
If this number unit is last of all number units and this number unit has multiple numbers, delete this number Corresponding number in unit, updates Number pattern log;
If last and this number unit of this number unit not all number unit have multiple numbers, delete this number Corresponding number in code unit, updates Number pattern log, the index address of all number units after this number unit Subtract K2.
Data order in blacklist data library file is deposited, when deleting crown word number, internal data adjust automatically storage Location and index address, reduce memory space.
The present embodiment a kind of based on a kind of above-mentioned paper money number blacklist data storage method supporting asterisk wildcard Data retrieval method, including:
S1:Read the crown word number to be checked of input(Crown word number to be checked does not contain asterisk wildcard), whether judge blacklist data library file For sky, if sky, then retrieving unsuccessfully, if not being empty, taking out the number of crown word number to be checked, this number is without asterisk wildcard Common number, the numerical value in one or more in number is replaced with asterisk wildcard, obtains 2m- 1 is not containing asterisk wildcard With special number, using common number and special number as number to be checked;
S2:Inquire about the position key assignments of each number to be checked corresponding position in the table of number position successively, number to be checked is judged according to position key assignments Whether it is stored in blacklist data library file, when inquiring certain number to be checked and being stored in blacklist data library file, Execution step S3, if all numbers to be checked are all not stored in blacklist data library file, exports crown word number to be checked not Information in blacklist;
S3:Take out the number of crown word number to be checked, this number is the common number without asterisk wildcard, will be one or more in number On numerical value with asterisk wildcard replace, obtain 2n- 1 different special number containing asterisk wildcard, by common number and special number As number to be checked;
Find out the number unit corresponding number unit storing this number to be checked, inquire about the Number pattern of this number unit successively The number of the corresponding number of every kind of Number pattern in log, is more than 0 when inquiring certain Number pattern corresponding number number When, obtain the number to be checked belonging to this Number pattern, using whether being stored with binary chop method enquiry number unit, this is treated Directory enquiry code, if it is present output information in blacklist for the crown word number to be checked, and terminate to inquire about, otherwise continue inquiry remaining The number of the corresponding number of Number pattern do not inquired about;
When all Number patterns in Number pattern log be all queried out-of-date, if not storing any one in number unit Individual number to be checked, then export information not in blacklist for the crown word number to be checked.
Taking RMB as a example explanation paper money number blacklist data storage method and search method:RMB serial number It is made up of 4 item heads and 6 item codes, in number, each all may comprise 26 letters, 10 Arabic numerals and 1 wildcard Symbol;And each in number only comprises 10 numerals or 1 asterisk wildcard.
Blacklist data library file is set as follows:Asterisk wildcard storehouse size is 1byte, and asterisk wildcard is set to ' * '.Maximum Common crown word number number memory block, maximum special crown word number number memory block, common crown word number number memory block, special crown word number Number memory block, number number memory block size are all 4bytes.In the table of number position, each size is 1bit.Number unit is big Little number memory block size is 4bytes for 8bytes, and index address size is 4bytes.
The size of number unit is 268bytes.Each number memory block size is 4bytes.Number pattern log is big Little for 256bytes, comprise 64 fields, each field 4bytes, a kind of Number pattern of each field references.Because 6 item codes In the possible situation containing asterisk wildcard be 26Individual, so to record corresponding Number pattern respectively in this number using 64 fields The number of corresponding number in unit.For example, store in a number unit 2 numbers 123456,654321,12345*, 11223* and 1234*6.Because 123456 and 654321 is equally a kind of Number pattern, then by first character in mode record table Section is set to 2;Because 12345* and 11223* is equally a kind of Number pattern, then second field in mode record table is put 2;And Number pattern 1234*6 belongs to another Number pattern, then by table to the 3rd field of pattern 1 should be put.
Add crown word number D0*B1234*6 to blacklist data library file step be:
N1:Judge whether blacklist data library file is empty, if sky, then add number unit and number unit, according to hat The number setting number position table of font size, if not being empty, execution step N2;
N2:Inquiry number position table, number D0*B is in the 13*37 of number position table3+0*372+ 36*37+11+1 position, if this position Position key assignments be 1 to represent this number in blacklist data library file, execution step N4, if this position key assignments is 0 representative This number not in blacklist data library file, execution step N3;
N3:The position key assignments of position corresponding in the table of number position is put 1, the number number in number number memory block is added 1, determines number The on position of unit simultaneously adds number unit, determines the on position of number unit and adds number unit, updates number mould Formula log, the index address of all number units before this number unit is added 8bytes, after this number unit The index address of all number units adds 276bytes;
N4:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if in number unit, add step and terminate, otherwise, add number, and update Number pattern log, should The index address of all number units after number unit adds 268bytes.
Step in blacklist is retrieval crown word number D06B123456:
S1:Judging whether blacklist data library file is empty, if sky, then retrieve unsuccessfully, if not being empty, taking out to be checked Number D06B of crown word number, this number is the common number without asterisk wildcard, and the numerical value in one or more in number is used Asterisk wildcard is replaced, and obtains the special number of 15 differences containing asterisk wildcard, that is, D06*, D0*B, D0**, D*6B, D*6*, D**B, D***, * 06B, * 06*, * 0*B, * 0**, * * 6B, * * 6*, * * * B, * * * *, using common number and special number as treating directory enquiry Head;
S2:Inquire about the position key assignments of each number to be checked corresponding position in the table of number position successively, number to be checked is judged according to position key assignments Whether it is stored in blacklist data library file, when inquiring certain number to be checked and being stored in blacklist data library file, Execution step S3, if all numbers to be checked are all not stored in blacklist data library file, exports crown word number to be checked not Information in blacklist;
S3:Take out the number 123456 of crown word number to be checked, this number is the common number without asterisk wildcard, by one in number Or the numerical value in multidigit with asterisk wildcard replace, obtain 63 different special numbers containing asterisk wildcard, that is, 12345*, 1234*6, 1234**, 123*56,123*5*, 123**6,123***, 12*456,12*45* etc., using common number and special number as treating Directory enquiry code;
Find out the number unit corresponding number unit storing this number to be checked, inquire about the Number pattern of this number unit successively The number of the corresponding number of every kind of Number pattern in log, is more than 0 when inquiring certain Number pattern corresponding number number When, obtain the number to be checked belonging to this Number pattern, using whether being stored with binary chop method enquiry number unit, this is treated Directory enquiry code, if it is present output information in blacklist for the crown word number to be checked, and terminate to inquire about, otherwise continue inquiry remaining The number of the corresponding number of Number pattern do not inquired about;
When all Number patterns in Number pattern log be all queried out-of-date, if not storing any one in number unit Individual number to be checked, then export information not in blacklist for the crown word number to be checked.

Claims (9)

1. a kind of paper money number blacklist data storage method supporting asterisk wildcard is it is characterised in that include:
Crown word number is decomposed into the number of m position and the number of n position, builds blacklist data library file, blacklist data library file Including asterisk wildcard storehouse, number position table, number number memory block, several number units and several number units, number unit Correspond with number unit, number unit includes Number pattern log and several number memory blocks;
Asterisk wildcard storehouse, sole legal wildcard characters in the blacklist data library file that is stored with;
Number position table, including some positions, each represents a specific number, and is provided with this representative of mark on each The number whether position key assignments in blacklist data library file;
Number number memory block, the total number of the blacklist data library file medium size head that is stored with;
Number unit, be stored with different number;
Number unit, the number of the corresponding number unit storage of each number unit is associated, and storage has this pass chain store Whole numbers of head, each the number memory block in number unit is stored with a number;
Number pattern log, using the number with identical asterisk wildcard number, position as a kind of Number pattern, each according to number Whether position is that number is divided into 2 by asterisk wildcardnPlant Number pattern, corresponding number of each Number pattern in the number unit of record place The number of code.
2. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 1, its feature It is:Described number unit includes number memory block and index address, and each number memory block is stored with a number, index ground The corresponding number unit of location sensing place number unit.
3. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 1, its feature It is:Described blacklist data library file also includes maximum common crown word number number memory block, maximum special crown word number number is deposited Storage area, common crown word number number memory block and special crown word number number memory block, common crown word number does not contain asterisk wildcard, special hat Font size contains asterisk wildcard.
4. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 2, its feature It is:The value of each of number is all to choose from 26 letters, 10 numerals and 1 asterisk wildcard, and number is regarded as 37 system numbers, set this corresponding decimal value of 10 numerals of 0-9 as value itself, this corresponding decimal value of 26 letters of A-Z It is respectively 10-35, the corresponding decimal value of asterisk wildcard is 36, calculates the corresponding decimal value of number, in the table of number position It is the number of a that a+1 position represents corresponding decimal value.
5. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 4, its feature It is:Number unit depositing in blacklist data library file is sequentially the 37 binary value ascending orders according to its stored number Arrangement.
6. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 5, its feature It is:The value of each of number is all to choose in 10 numerals and 1 asterisk wildcard, and number is regarded as 11 system numbers, if Determining this corresponding decimal value of 10 numerals of 0-9 is value itself, and the corresponding decimal value of asterisk wildcard is 10, number in number unit The order of depositing of memory block is to arrange according to 11 binary value ascending orders of its stored number.
7. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 6, its feature It is:Number unit is deposited according to 37 binary value ascending order orders of its stored number, and number unit associates number according to it 37 binary value ascending orders be sequentially stored in number unit after, the size of each number unit is K1 byte, each number list The size of unit is K2 byte;
When needing to add crown word number to blacklist data library file, execute following steps:
N1:Judge whether blacklist data library file is empty, if sky, then add number unit and number unit, according to hat The number setting number position table of font size, if not being empty, execution step N2;
N2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then execution step N3, otherwise execution step N4;
N3:The position key assignments of position corresponding in the table of number position is put 1, the number number in number number memory block is added 1, determines number The on position of unit simultaneously adds number unit, determines the on position of number unit and adds number unit, updates number mould Formula log, the index address of all number units before this number unit is added K1, will be all after this number unit The index address of number unit adds K3, K3=K1+K2;
N4:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if in number unit, add step and terminate, otherwise, add number, and update Number pattern log, should The index address of all number units after number unit adds K2.
8. a kind of paper money number blacklist data storage method supporting asterisk wildcard according to claim 7, its feature It is:When needing to delete the crown word number in blacklist data library file, execute following steps:
M1:Judge whether blacklist data library file is empty, if sky, then delete unsuccessfully, if not being empty, execution step M2;
M2:Inquiry number position table, the number judging crown word number whether in blacklist data library file, if not in blacklist number According in library file, then deleting unsuccessfully, otherwise execution step M3;
M3:Find out the number unit corresponding number unit storing this number, whether the number judging crown word number is in number list In unit, if not in number unit, deleted unsuccessfully, if in number unit, execution step M4;
M4:If this number unit is last and this number unit only one of which number of all number units, will number In the table of head position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and is somebody's turn to do Number unit, the index address of all number units before this number unit subtracts K1;
If last and this number unit only one of which number of this number unit not all number unit, by number In the table of position, the position key assignments of corresponding position sets to 0, and the number number in number number memory block is subtracted 1, deletes this number unit and this number Code unit, the index address of all number units before this number unit subtracts K1, all number lists after this number unit The index address of unit subtracts K3, K3=K1+K2;
If this number unit is last of all number units and this number unit has multiple numbers, delete this number Corresponding number in unit, updates Number pattern log;
If last and this number unit of this number unit not all number unit have multiple numbers, delete this number Corresponding number in code unit, updates Number pattern log, the index address of all number units after this number unit Subtract K2.
9. a kind of number based on a kind of paper money number blacklist data storage method supporting asterisk wildcard described in claim 1 According to search method it is characterised in that including:
S1:Read the crown word number to be checked of input, take out the number of crown word number to be checked, this number is common number without asterisk wildcard Head, the numerical value in one or more in number is replaced with asterisk wildcard, obtains 2mSpecial number of -1 difference containing asterisk wildcard Head, using common number and special number as number to be checked;
S2:Inquire about the position key assignments of each number to be checked corresponding position in the table of number position successively, number to be checked is judged according to position key assignments Whether it is stored in blacklist data library file, when inquiring certain number to be checked and being stored in blacklist data library file, Execution step S3, if all numbers to be checked are all not stored in blacklist data library file, exports crown word number to be checked not Information in blacklist;
S3:Take out the number of crown word number to be checked, this number is the common number without asterisk wildcard, will be one or more in number On numerical value with asterisk wildcard replace, obtain 2n- 1 different special number containing asterisk wildcard, by common number and special number As number to be checked;
Find out the number unit corresponding number unit storing this number to be checked, inquire about the Number pattern of this number unit successively The number of the corresponding number of every kind of Number pattern in log, is more than 0 when inquiring certain Number pattern corresponding number number When, obtain the number to be checked belonging to this Number pattern, whether be stored with enquiry number unit this number to be checked, if it does, Then export information in blacklist for the crown word number to be checked, and terminate to inquire about, otherwise continue the Number pattern that inquiry residue is not inquired about The number of corresponding number;
When all Number patterns in Number pattern log be all queried out-of-date, if not storing any one in number unit Individual number to be checked, then export information not in blacklist for the crown word number to be checked.
CN201610767709.3A 2016-08-31 2016-08-31 Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters Pending CN106407299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610767709.3A CN106407299A (en) 2016-08-31 2016-08-31 Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610767709.3A CN106407299A (en) 2016-08-31 2016-08-31 Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters

Publications (1)

Publication Number Publication Date
CN106407299A true CN106407299A (en) 2017-02-15

Family

ID=58003863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610767709.3A Pending CN106407299A (en) 2016-08-31 2016-08-31 Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters

Country Status (1)

Country Link
CN (1) CN106407299A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345469A (en) * 2013-05-24 2013-10-09 联动优势科技有限公司 Storing and inquiring method and device of number sets
CN103761795A (en) * 2014-02-27 2014-04-30 华中科技大学 Method for identifying counterfeit money of paper money anti-counterfeit feature database
CN105427450A (en) * 2015-11-10 2016-03-23 东方通信股份有限公司 ATM counterfeit banknote identification system and method based on novel banknote serial number storage structure
CN105589973A (en) * 2016-01-17 2016-05-18 浙江维融电子科技股份有限公司 Efficient blacklist search method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345469A (en) * 2013-05-24 2013-10-09 联动优势科技有限公司 Storing and inquiring method and device of number sets
CN103761795A (en) * 2014-02-27 2014-04-30 华中科技大学 Method for identifying counterfeit money of paper money anti-counterfeit feature database
CN105427450A (en) * 2015-11-10 2016-03-23 东方通信股份有限公司 ATM counterfeit banknote identification system and method based on novel banknote serial number storage structure
CN105589973A (en) * 2016-01-17 2016-05-18 浙江维融电子科技股份有限公司 Efficient blacklist search method

Similar Documents

Publication Publication Date Title
CN103294671B (en) The detection method and system of document
CN115168345B (en) Database classification method, system, device and storage medium
CN103631842B (en) For detecting the method and system of multiple row compound keys row set
CN108062484A (en) A kind of classification stage division based on data sensitive feature and database metadata
CN111143838B (en) Database user abnormal behavior detection method
CN103177128A (en) Method and system for processing bill crown word number information
CN104636337B (en) A kind of data cleansing storage method for value-added tax
CN110599289A (en) Method for formatting official document
US20210165808A1 (en) Computer system and method for indexing and retrieval of partially specified type-less semi-infinite information
CN107301210A (en) A kind of data processing method
CN112365339A (en) Method for judging commercial value credit loan amount of small and medium-sized enterprises
CN104636341B (en) A kind of data cleansing storage method for the several monitoring of value-added tax No.1
CN101751475B (en) Method for compressing section records and device therefor
CN104750852A (en) Method for finding and classifying Chinese address data
CN113505117A (en) Data quality evaluation method, device, equipment and medium based on data indexes
CN116089620A (en) Electronic archive data management method and system
CN103903331A (en) Automatic teller machine
CN108170691A (en) It is associated with the determining method and apparatus of document
CN105427450A (en) ATM counterfeit banknote identification system and method based on novel banknote serial number storage structure
CN106407299A (en) Banknote crown word number blacklist data storage and retrieval methods supporting wildcard characters
CN114844638B (en) Big data volume secret key duplication removing method and system based on cuckoo filter
CN105515917B (en) Network protocol features matching process based on index sub-clustering
CN116361840B (en) Bank self-service equipment data security management system
CN102426687A (en) Currency circulation safety management system based on code recording radio frequency technology
CN109960934A (en) A CNN-based malicious request detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170215