CN105956921A - Method and device for selecting bankcard number by user himself/herself - Google Patents
Method and device for selecting bankcard number by user himself/herself Download PDFInfo
- Publication number
- CN105956921A CN105956921A CN201610349091.9A CN201610349091A CN105956921A CN 105956921 A CN105956921 A CN 105956921A CN 201610349091 A CN201610349091 A CN 201610349091A CN 105956921 A CN105956921 A CN 105956921A
- Authority
- CN
- China
- Prior art keywords
- bank
- numerical value
- runs
- user
- card
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/02—Banking, e.g. interest calculation or account maintenance
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
Abstract
The invention provides a method and device for selecting the bankcard number by a user himself/herself. The method comprises that the value of self-selection bits of the user is determined; the value of a squeezing bit is determined according to the value of the self-selection bit and an identification code of a card issuing mechanism; the value of the squeezing bit, the value of the self-selection bit and the identification code of the card issuing mechanism are combined to generate the self-selection bankcard number; the self-selection bankcard number is compared with bankcard numbers existing in a database, if the self-selection bankcard number is the same with certain existing bankcard number in the database, the value of the self-selection bit is determined again, and if the self-selection bankcard number is the different from the existing bankcard numbers in the database, the generated self-selection bankcard number is determined to be available. Thus, the user can make autonomous selection of the bankcard number, and customized requirements of the user can be met.
Description
Technical field
The present invention relates to number selection technique field, particularly to a kind of bank's card number optional method and device.
Background technology
In usually life, the most of contact that choose checked numbers are exactly choosing of phone number, and its numerical selection mode is:
The phone number that can provide all is enumerated out by each number point of sale, and client selects certainly in the number provided
The number that oneself likes, such as, have the number of several consecutive identical numeral, 8 and 6 more number occur in number
Etc., the mode being only responsible for one number that can use of offer that this number sells mode more conventional improves flexibly
Property, meet the individual demand of client.
And for bank, usually user fills data, the when of application bank card, bank can distribute automatically
To one number of user.Bank's card number mainly by card sending mechanism authentication code (BIN), the self-defined position of card sending mechanism and
Check bit totally three part composition.Wherein, card sending mechanism authentication code (BIN) is front 6 bit digital, and check bit is card
Number last 1, middle figure place is the self-defined position of card sending mechanism, and the self-defined position of card sending mechanism can include hair fastener area code
With card sequence number, as shown in Figure 1, it is also possible to do not include hair fastener area code, only include card sequence number, as shown in Figure 2.Existing
Card number Dou Shi bank of bank independently distribute to user, user does not has autonomous right to choose, so can not meet user's
Individual demand.
Summary of the invention
Embodiments provide a kind of bank card number optional method, the individual demand of user can be met.The party
Method includes:
Determine user's numerical value from bit selecting;
According to user from the numerical value of bit selecting and card sending mechanism identification code, determine the numerical value of the position that runs on a bank;In bank's card number in advance
If can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, the position that runs on a bank was positioned at user before bit selecting;
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sending mechanism identification code combination producing free bank card number;
The bank's card number deposited in free bank card number and the data base that will generate is compared, if the free bank of generation
Card number is identical with the bank number deposited in data base, then redefine user's numerical value from bit selecting, if generate is free
Bank's card number is different from the bank number deposited in data base, it is determined that the free bank card number of generation can be used.
In one embodiment, described according to user from the numerical value of bit selecting and card sending mechanism identification code, determine the position that runs on a bank
Numerical value, including:
According to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm is utilized to determine the numerical value of the position that runs on a bank.
In one embodiment, described according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn to calculate
Method determines the numerical value of the position that runs on a bank, and specifically includes:
When the figure place of the position that runs on a bank is one, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn
Algorithm inverting determines the numerical value of the position that runs on a bank;
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position before the position that runs on a bank by the order that numerical value is ascending,
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code and the position that runs on a bank, utilize Luhn algorithm
Inverting determines the numerical value of n-th, the position that runs on a bank, and wherein, n is more than or equal to 2, and n is integer.
In one embodiment, when the described figure place when the position that runs on a bank is one, according to user from the numerical value of bit selecting and hair fastener
Authority identification code, utilizes Luhn algorithm inverting to determine the numerical value of the position that runs on a bank, specifically includes:
When the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine;Described school
Testing position is user last position from bit selecting;
When the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even number
Position runs on a bank the numerical value of position;
Described odd bits or even bit determine as follows:
Start to count forward from last position of bit selecting from user.
In one embodiment, before determining the position that runs on a bank before the numerical value of n-1 position, also include:
Inquiry current sequence number generator sequence number;
The described order ascending by numerical value determines the numerical value of n-1 position before the position that runs on a bank, and specifically includes:
Running on a bank accordingly from current sequence number generator sequence number from the beginning of the numerical value of position, the order ascending by numerical value determines
Run on a bank the numerical value of n-1 position before position.
In one embodiment, described according to user from the numerical value of bit selecting and card sending mechanism identification code, determine the position that runs on a bank
Numerical value, specifically includes:
According to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, Luhn algorithm is utilized to determine crowded
Convert the numerical value of position;
The described numerical value by the position that runs on a bank, user are from the numerical value of bit selecting and the free bank card of card sending mechanism identification code combination producing
Number, specifically include:
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code combination producing certainly
Select bank's card number.
The embodiment of the present invention additionally provides a kind of bank free device of card number, can meet the individual demand of user.Should
Device includes:
Free bit value determines module, for user from the numerical value of bit selecting;
The position that runs on a bank determines module, for according to user from the numerical value of bit selecting and card sending mechanism identification code, determine the position that runs on a bank
Numerical value;Bank's card number is preset can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, run on a bank position, position
In user before bit selecting;
Free bank card number generation module, for by the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sending mechanism mark
Know code combination producing free bank card number;
Comparing module, for the bank's card number deposited in the free bank card number and the data base that generate is compared, if
The free bank card number generated is identical with the bank number deposited in data base, then redefine user's number from bit selecting
Value, if the free bank card number generated is different from the bank number deposited in data base, it is determined that the free bank of generation
Card number can be used.
In one embodiment, run on a bank described in position determine module specifically for:
According to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm is utilized to determine the numerical value of the position that runs on a bank.
In one embodiment, run on a bank described in position determine module specifically for:
When the figure place of the position that runs on a bank is one, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn
Algorithm inverting determines the numerical value of the position that runs on a bank;
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position before the position that runs on a bank by the order that numerical value is ascending,
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code and the position that runs on a bank, utilize Luhn algorithm
Inverting determines the numerical value of n-th, the position that runs on a bank, and wherein, n is more than or equal to 2, and n is integer.
In one embodiment, run on a bank described in position determine module specifically for:
When the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine;Described school
Testing position is user last position from bit selecting;
When the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even number
Position runs on a bank the numerical value of position;
Described odd bits or even bit determine as follows:
Start to count forward from last position of bit selecting from user.
In one embodiment, also include:
Enquiry module, is used for inquiring about current sequence number generator sequence number;
The described position that runs on a bank determine module specifically for:
Running on a bank accordingly from current sequence number generator sequence number from the beginning of the numerical value of position, the order ascending by numerical value determines
Run on a bank the numerical value of n-1 position before position.
In one embodiment, run on a bank described in position determine module specifically for:
According to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, Luhn algorithm is utilized to determine crowded
Convert the numerical value of position;
Described free bank card number generation module specifically for:
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code combination producing certainly
Select bank's card number.
In embodiments of the present invention, first user determines the numerical value from bit selecting, then according to user from the numerical value of bit selecting and
Card sending mechanism identification code, determines the numerical value of the position that runs on a bank, then by the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and hair fastener
Authority identification code combination producing free bank card number, the bank's card number finally will deposited in free bank card number and data base
Compare, determine whether this free bank card number can be used, user oneself can be made to select bank by the inventive method
Card number, can meet the individual demand of user.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only
It is some embodiments of the present invention, for those of ordinary skill in the art, in the premise not paying creative work
Under, it is also possible to other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is a kind of bank card number composition form schematic diagram;
Fig. 2 is another kind of bank card number composition form schematic diagram;
Fig. 3 is a kind of bank card number optional method flow chart;
Fig. 4 is a kind of Luhn algorithm schematic diagram;
Fig. 5 is the card number schematic diagram when the position that runs on a bank is odd bits;
Fig. 6 is the card number schematic diagram when the position that runs on a bank is even bit;
Fig. 7 is the card number schematic diagram when the position that runs on a bank is 2;
Fig. 8 is the card number schematic diagram when the position that runs on a bank is 3;
Fig. 9 is a kind of bank's card number free apparatus structure schematic diagram.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.
Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
Every other embodiment, broadly falls into the scope of protection of the invention.
Existing bank card number is all independently to be arranged by bank, is handed down to user after allowing, and user can not oneself select certainly
The number that oneself likes, so can not meet the individual demand of user.Based on this, in embodiments of the present invention, propose
A kind of bank card number optional method and device.
Fig. 3 is a kind of bank card number optional method flow chart;As it is shown on figure 3, the method includes:
Step 301: determine user's numerical value from bit selecting;
Step 302: according to user from the numerical value of bit selecting and card sending mechanism identification code, determine the numerical value of the position that runs on a bank;At silver
Row card number is preset can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, it is free that the position that runs on a bank is positioned at user
Before Wei;
Step 303: the numerical value of the position that runs on a bank, user is free from numerical value and the card sending mechanism identification code combination producing of bit selecting
Bank's card number;
Step 304: the bank's card number deposited in free bank card number and the data base that will generate is compared, if generation
Free bank card number identical with the bank number deposited in data base, then redefine user's numerical value from bit selecting, if
The free bank card number generated is different from the bank number deposited in data base, it is determined that the free bank card number of generation can
With.
When being embodied as, user from the figure place that the figure place of bit selecting is card sequence number (in bank's card number preset can be from bit selecting),
Be generally card sequence number position all by user from hanking the number liked, then by calculating the number obtaining check bit
Value, then whether the checking free card number of user can be used.But the present invention is numerical value and the part of user's sets itself check bit
The numerical value of card sequence number position, then by calculating the numerical value remaining the position not being easily selected by a user in acquisition card sequence number position, then
Whether the checking free card number of user can be used.
A length of 16 or 19 of the card number of the bank card of most domestic distribution at present.With one of domestic four big row
As a example by the card number of Bank of China's distribution, a length of 19 of debit card, mainly by 6 BIN+4 position hair fastener area codes+8
Sequence number+1 bit check position, position composition;The card number length of quasi-credit card is currently 16, is mainly sent out by 6 BIN+2 positions
Card area code+7 sequence numbers+1 bit check position forms.The card number length of domestic credit card is currently 16, mainly by 6
Sequence number+1 bit check position, BIN+9 position, position composition.It follows that bank's card number is in two kinds of situation: one is not send out
Card area code, another kind is to have hair fastener area code.
For the first situation, determine after the numerical value of bit selecting user, need according to user from the numerical value of bit selecting
With card sending mechanism identification code, determine the numerical value of the position that runs on a bank.For the second situation, determine the number from bit selecting user
After value, need according to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, determine the position that runs on a bank
Numerical value.Wherein, run on a bank position: when the figure place that user is free is less than figure place that can be free, unselected figure place is
Run on a bank position.As it is shown in figure 1, user's free rear 7 (including check bit), can be free for latter 9, then run on a bank position
For 8th, 9 reciprocal, X, the Y i.e. illustrated.Check bit: position is positioned at last 1 bit digital of card number, as shown in Figure 1.
Its purpose is not used to digital encryption, but in order to effectively prevent accidental Introduced cases mistake.
In this example, when determining the numerical value of the position that runs on a bank, the present invention uses Luhn algorithm.Luhn algorithm is by IBM
Hans Peter Luhn invention, be also called " mould 10 " algorithm.It is a kind of simple checksum algorithm, is used for testing
Card identification number, is widely used in the legitimate verification of bank's card number, IMEI number, SSN (social security number).First,
From the beginning of last bit digital of card number, even bit is multiplied by 2, if product is double figures, then by the number on two positions
Word is added and preserves.Then all numerals are added summation.If card number is legal, then summation can be divided exactly by 10.Under
Face is as a example by 19 debit card number, and as shown in Figure 4, rightmost X is check bit, and Luhn algorithm is described:
1, from last position of card number, even bit carries out taking advantage of 2 operations, and then the numeral with remaining carries out cumulative summation
Operation;Wherein take advantage of 2 operation gained >=10, tens and units carry out cumulative summation (i.e. subtracting 9 to add up);
For take advantage of 2 operation gained < 10, normal cumulative summation.Computing formula is as follows:
SUM=X+ (8*2-9)+7+ (6*2-9)+5+ (4*2)+3+ (2*2)+1+ (0*2)+0+ (1*2)+0
+ (1*2)+6+ (6*2-9)+1+ (2*2)+6=X+62;
2, according to Luhn algorithm, SUM mould 10 is 0.I.e. (X+62) mod 10=0, so check bit X=8.
When being embodied as, owing to user is indefinite from the figure place of bit selecting, the figure place of the position that therefore runs on a bank also is indefinite.Run on a bank position
Figure place can be 1, it is also possible to is n position, and wherein, n is more than or equal to 2, and n is integer.In this example, determine and run on a bank
The algorithm of position is as follows:
For the first situation (not including hair fastener area code):
When run on a bank 1, position time, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn algorithm inverting
Determine the numerical value of 1 position that runs on a bank.
When the figure place of the position that runs on a bank is n position, by the order that numerical value is ascending determine n-1 position before the position that runs on a bank numerical value (because of
It is all to carry out hair fastener according to incremental sequence number for bank's card number), according to user from the numerical value of bit selecting, card sending mechanism identification code
With the numerical value of n-1 position before the position that runs on a bank, Luhn algorithm inverting is utilized to determine the numerical value of n-th, the position that runs on a bank.
Concrete, when run on a bank 2, position time, for ensureing that card number is sequentially generated from small to large, the most first determine the position first that runs on a bank
Bit value, attempts successively from 0-9, and the second of the position that runs on a bank then identifies from the numerical value of bit selecting, card sending mechanism according to user
Before code and the position that runs on a bank, the numerical value of 1, utilizes Luhn algorithm inverting to obtain.
When run on a bank 3, position time, for ensure card number be sequentially generated from small to large, the most first determine a front two numerical value that runs on a bank,
Attempt successively from 00-99;Run on a bank the 3rd of position and then from the numerical value of bit selecting, card sending mechanism identification code and squeeze according to user
Convert the numerical value of 2 before position, utilize Luhn algorithm inverting to obtain.
The position that runs on a bank is 4,5,6 ..., the processing mode of n position is by that analogy.
For the second situation (including hair fastener area code):
When run on a bank 1, position time, according to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, utilize
Luhn algorithm inverting determines the numerical value of 1 position that runs on a bank.
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position, root before the position that runs on a bank by the order that numerical value is ascending
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code, hair fastener area code and the position that runs on a bank, utilize
Luhn algorithm inverting determines the numerical value of n-th, the position that runs on a bank.
Concrete, when run on a bank 2, position time, for ensureing that card number is sequentially generated from small to large, the most first determine the position first that runs on a bank
Bit value, attempts successively from 0-9, and the second of the position that runs on a bank then identifies from the numerical value of bit selecting, card sending mechanism according to user
Before code, hair fastener area code and the position that runs on a bank, the numerical value of 1, utilizes Luhn algorithm inverting to obtain.
When run on a bank 3, position time, for ensure card number be sequentially generated from small to large, the most first determine a front two numerical value that runs on a bank,
Attempt successively from 00-99;Run on a bank the 3rd of position then according to user from the numerical value of bit selecting, card sending mechanism identification code, send out
Before card area code and the position that runs on a bank, the numerical value of 2, utilizes Luhn algorithm inverting to obtain.
The position that runs on a bank is 4,5,6 ..., the processing mode of n position is by that analogy.
When being embodied as, when the position that runs on a bank is 1, its value directly obtains according to Luhn algorithm inverting.Luhn algorithm is tested
Card requirement, for the card number generated, from the beginning of last position, is multiplied by 2 every one, and then cumulative summation, finally tires out
After adding check bit, after its result mould 10, remainder should be 0.Because 2 need to be taken advantage of every position, so having whether the position that runs on a bank takes advantage of 2 liang
The situation of kind, i.e. starts to count forward from card number last position (user is from last position of bit selecting), determines that the position that runs on a bank is odd number
Position or even bit.Hereinafter carry out respectively calculation specifications:
A. when the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine.Or, according to
User is from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, and odd bits is squeezed to utilize Luhn algorithm inverting to determine
Convert the numerical value of position.
For convenience of explanation, it is that 19 bit digital (including hair fastener area code) illustrate with card number.As it is shown in figure 5, it is right
In 19 debit card number that the free mantissa of user is 88888888, an X that runs on a bank is according to Luhn algorithm, in the process calculated
In be not carry out taking advantage of 2 operations;And the last check bit of card number does not the most carry out when Luhn proof of algorithm is sued for peace taking advantage of 2 behaviour
Make.Therefore, the role exchange of run on a bank an X and check bit can be recalculated, inverting by we according to Luhn algorithm
The value of the check bit gone out runs on a bank the value of position the most exactly.
Run on a bank after position and check bit role exchange, as follows according to a Luhn algorithm inverting process that runs on a bank:
SUM=(8*2-9)+8+ (8*2-9)+8+ (8*2-9)+8+ (8*2-9)+8[check bit]+(0*2)+0
+ (1*2)+0+ (1*2)+6+ (6*2-9)+1+ (2*2)+6=84;
Inverting runs on a bank position=10 (SUM mod 10)=10-(84mod 10)=6.The i.e. free mantissa of user shown in Fig. 5 is
The card number value of 8888888 is " 6216610100688888888 ".
B. when the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even bit
Run on a bank the numerical value of position.Or, according to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, utilize Luhn
Carry out again after algorithm inverting inversely calculating except 2, determine that even bit runs on a bank the numerical value of position.
For convenience of explanation, it is that 16 bit digital (not including hair fastener area code) illustrate with card number.As shown in Figure 6,
Mantissa free for user is 9 debit card number of 123456789, according to Luhn algorithm, runs on a bank during calculating
Position X need to carry out taking advantage of 2 operations, and the last check bit of card number carries out taking advantage of 2 operations when Luhn proof of algorithm is sued for peace.Therefore,
We need to carry out inversely calculating except 2 after being calculated by the role exchange of run on a bank an X and check bit, are finally inversed by the value of the position that runs on a bank.
Calculating process is as follows:
SUM=(8*2-9)+7+ (6*2-9)+5+ (4*2)+3+ (2*2)+1+9[check bit]+6+ (6*2-9)
+ 6+ (9*2-9)+0+ (4*2)=79;
10 (SUM mod 10)=10-(79mod 10)=1, inverting runs on a bank position=(1+9)/2=5.
Illustrate when run on a bank 2, position time, the determination algorithm of the position that runs on a bank.
For ensureing that card number is sequentially generated from small to large, first determine position the first bit value that runs on a bank, attempt successively from 0-9, the
Two then obtain according to Luhn algorithm inverting.As it is shown in fig. 7, owing to the value of X is 0 to 9 totally 10 kinds of situations, therefore
Meet the card number of free 7 mantissa of user according to Luhn algorithm and there are 10 (do not consider repeat send out number) in theory.When
After the value of X is fixing, then calculating when running on a bank Y, algorithm refutation process is with " bit length that runs on a bank is 1 figure place ".
It is respectively as follows: according to qualified 10 the bank's card numbers of Luhn algorithm Inversion Calculation
6216610100068888888
6216610100118888888
6216610100258888888
6216610100308888888
6216610100498888888
6216610100548888888
6216610100688888888
6216610100738888888
6216610100878888888
6216610100928888888
When being embodied as, bank's card number all carries out hair fastener according to incremental sequence number, and therefore bank can be occurred by sequence number
Device counts, and which numerical value record bank card number is issued to.In this example, n-1 position before determining the position that runs on a bank
Before numerical value, also include:
Inquiry current sequence number generator sequence number;
Running on a bank accordingly from current sequence number generator sequence number from the beginning of the numerical value of position, the order ascending by numerical value determines
Run on a bank the numerical value of n-1 position before position.
Concrete, it is that 19 bit digital (including hair fastener area code) illustrate with card number.Current sequence number generator sequence
Number it is 6216610100065555555.When the position that runs on a bank in numerical selection is two, as it is shown in fig. 7, wherein 06 be
The position that runs on a bank in current sequence number generator sequence number, if user is 8888888 from latter several of numerical selection, then squeezing from numerical selection
The numerical value converting an X can be from the beginning of 0, and a Y that runs on a bank utilizes Luhn algorithm inverting to obtain.When the position that runs on a bank in numerical selection
When being three, as shown in Figure 8, wherein 065 is the position that runs on a bank in current sequence number generator sequence number, if user is from numerical selection
Latter several be 888888, then can be from the beginning of 06 from the numerical value of an XY that runs on a bank of numerical selection, the Z of running on a bank utilizes
Luhn algorithm inverting obtains.
When being embodied as, after determining the numerical value of the position that runs on a bank, for the first situation (not including hair fastener area code):
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sending mechanism identification code combination producing free bank card number.For
The second situation (includes hair fastener area code): by the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism mark
Know code and hair fastener area code combination producing free bank card number.
After generating free bank card number, need to compare the card number deposited in free bank card number and data storehouse
Inquiry, if free bank card number is identical with the bank number deposited in data storehouse, represents that this number is issued, then jumps
Cross this number, prevent card number from repeating distribution, allow user redefine the numerical value from bit selecting;Or, ask user to confirm to know
No agreement bank independently revise one or several from the numerical value of bit selecting, if user agrees to, bank is raw by above-mentioned steps
Become one or several the several banks card number from bit selecting of amendment, and the several banks card number generated is available, please
User selects one of them.When the free bank card number generated is different from the bank number deposited in data base, representing should
Number is not issued, and determines that the free bank card number of generation can be used.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of bank free device of card number, as following
Described in embodiment.Due to the free device of bank's card number, to solve the principle of problem similar, therefore to bank card number optional method
The enforcement of the free device of bank's card number may refer to the enforcement of bank's card number optional method, repeats no more in place of repetition.With
Lower used, term " unit " or " module " can realize the software of predetermined function and/or the combination of hardware.
Although the device described by following example preferably realizes with software, but hardware, or the group of software and hardware
The realization closed also may and be contemplated.
Fig. 9 is a kind of bank's card number free apparatus structure schematic diagram, as it is shown in figure 9, this device includes:
Free bit value determines module 901, for user from the numerical value of bit selecting;
The position that runs on a bank determines module 902, for according to user from the numerical value of bit selecting and card sending mechanism identification code, determine and run on a bank
The numerical value of position;Bank's card number is preset can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, run on a bank
Position was positioned at user before bit selecting;
Free bank card number generation module 903, for by the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sender
Structure identification code combination producing free bank card number;
Comparing module 904, for comparing the bank's card number deposited in the free bank card number and the data base that generate
Right, if the free bank card number generated is identical with the bank number deposited in data base, then redefine user from bit selecting
Numerical value, if the free bank card number generated is different from the bank number deposited in data base, it is determined that generation free
Bank's card number can be used.
When being embodied as, the position that runs on a bank determine module 902 specifically for:
According to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm is utilized to determine the numerical value of the position that runs on a bank.
When being embodied as, the position that runs on a bank determine module 902 specifically for:
When the figure place of the position that runs on a bank is one, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn
Algorithm inverting determines the numerical value of the position that runs on a bank;
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position before the position that runs on a bank by the order that numerical value is ascending,
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code and the position that runs on a bank, utilize Luhn algorithm
Inverting determines the numerical value of n-th, the position that runs on a bank, and wherein, n is more than or equal to 2, and n is integer.
When being embodied as, the position that runs on a bank determine module 902 specifically for:
When the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine;Described school
Testing position is user last position from bit selecting;
When the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even number
Position runs on a bank the numerical value of position.
When being embodied as, also include:
Enquiry module 905, is used for inquiring about current sequence number generator sequence number;
Run on a bank position determine module 902 specifically for:
From the beginning of the numerical value of position of running on a bank accordingly from current sequence number generator sequence number adds 1, by the order that numerical value is ascending
Determine the numerical value of n-1 position before the position that runs on a bank.
When being embodied as, the position that runs on a bank determine module 902 specifically for:
According to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, Luhn algorithm is utilized to determine crowded
Convert the numerical value of position;
Free bank card number generation module 903 specifically for:
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code combination producing certainly
Select bank's card number.
In sum, the present invention proposes bank's card number optional method and device have the advantage that
1, the present invention can effectively solve the free function of card number, and the card number simultaneously generated meets the verification of LUHN algorithm
Position rule;
2, the present invention run on a bank position order select can make the card number of generation meet ascending order or descending rule;
3, the present invention by with sequence number generator current sequence number comparison, it is possible to generation rapidly and efficiently meet LUHN calculate
The card number of method rule;The card number of card number and the data base by generating is compared inquiry again, gets rid of and repeats data, prevents
Only repeat hair fastener.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer journey
Sequence product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or combine software and hardware
The form of the embodiment of aspect.And, the present invention can use and wherein include computer available programs one or more
The computer-usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) of code
The form of the computer program of upper enforcement.
The present invention is with reference to method, equipment (system) and the stream of computer program according to embodiments of the present invention
Journey figure and/or block diagram describe.It should be understood that can be by computer program instructions flowchart and/or block diagram
Flow process in each flow process and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These can be provided
Computer program instructions processes to general purpose computer, special-purpose computer, Embedded Processor or other programmable datas and sets
Standby processor is to produce a machine so that held by the processor of computer or other programmable data processing device
The instruction of row produces for realizing one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple side
The device of the function specified in frame.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces bag
Including the manufacture of command device, this command device realizes at one flow process of flow chart or multiple flow process and/or block diagram one
The function specified in individual square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter
On calculation machine or other programmable devices, execution sequence of operations step is to produce computer implemented process, thus is calculating
The instruction performed on machine or other programmable devices provide for realizing in one flow process of flow chart or multiple flow process and/or
The step of the function specified in one square frame of block diagram or multiple square frame.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the skill of this area
For art personnel, the embodiment of the present invention can have various modifications and variations.All within the spirit and principles in the present invention,
Any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.
Claims (12)
1. bank's card number optional method, it is characterised in that including:
Determine user's numerical value from bit selecting;
According to user from the numerical value of bit selecting and card sending mechanism identification code, determine the numerical value of the position that runs on a bank;In bank's card number in advance
If can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, the position that runs on a bank was positioned at user before bit selecting;
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sending mechanism identification code combination producing free bank card number;
The bank's card number deposited in free bank card number and the data base that will generate is compared, if the free bank of generation
Card number is identical with the bank number deposited in data base, then redefine user's numerical value from bit selecting, if generate is free
Bank's card number is different from the bank number deposited in data base, it is determined that the free bank card number of generation can be used.
2. bank as claimed in claim 1 card number optional method, it is characterised in that described according to user from bit selecting
Numerical value and card sending mechanism identification code, determine the numerical value of the position that runs on a bank, including:
According to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm is utilized to determine the numerical value of the position that runs on a bank.
3. bank as claimed in claim 2 card number optional method, it is characterised in that described according to user from bit selecting
Numerical value and card sending mechanism identification code, utilize Luhn algorithm to determine the numerical value of the position that runs on a bank, specifically include:
When the figure place of the position that runs on a bank is one, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn
Algorithm inverting determines the numerical value of the position that runs on a bank;
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position before the position that runs on a bank by the order that numerical value is ascending,
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code and the position that runs on a bank, utilize Luhn algorithm
Inverting determines the numerical value of n-th, the position that runs on a bank, and wherein, n is more than or equal to 2, and n is integer.
4. bank as claimed in claim 3 card number optional method, it is characterised in that described when the figure place of the position that runs on a bank
When being one, according to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm inverting is utilized to determine one
Run on a bank the numerical value of position, specifically includes:
When the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine;Described school
Testing position is user last position from bit selecting;
When the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even number
Position runs on a bank the numerical value of position;
Described odd bits or even bit determine as follows:
Start to count forward from last position of bit selecting from user.
5. bank as claimed in claim 3 card number optional method, it is characterised in that n-1 before determining the position that runs on a bank
Before the numerical value of position, also include:
Inquiry current sequence number generator sequence number;
The described order ascending by numerical value determines the numerical value of n-1 position before the position that runs on a bank, and specifically includes:
Running on a bank accordingly from current sequence number generator sequence number from the beginning of the numerical value of position, the order ascending by numerical value determines
Run on a bank the numerical value of n-1 position before position.
6. bank as claimed in claim 2 card number optional method, it is characterised in that described according to user from bit selecting
Numerical value and card sending mechanism identification code, determine the numerical value of the position that runs on a bank, specifically include:
According to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, Luhn algorithm is utilized to determine crowded
Convert the numerical value of position;
The described numerical value by the position that runs on a bank, user are from the numerical value of bit selecting and the free bank card of card sending mechanism identification code combination producing
Number, specifically include:
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code combination producing certainly
Select bank's card number.
7. the free device of bank's card number, it is characterised in that including:
Free bit value determines module, for user from the numerical value of bit selecting;
The position that runs on a bank determines module, for according to user from the numerical value of bit selecting and card sending mechanism identification code, determine the position that runs on a bank
Numerical value;Bank's card number is preset can to remove user in bit selecting remaining for the position that runs on a bank after bit selecting, run on a bank position, position
In user before bit selecting;
Free bank card number generation module, for by the numerical value of the position that runs on a bank, user from the numerical value of bit selecting and card sending mechanism mark
Know code combination producing free bank card number;
Comparing module, for the bank's card number deposited in the free bank card number and the data base that generate is compared, if
The free bank card number generated is identical with the bank number deposited in data base, then redefine user's number from bit selecting
Value, if the free bank card number generated is different from the bank number deposited in data base, it is determined that the free bank of generation
Card number can be used.
8. the bank as claimed in claim 7 free device of card number, it is characterised in that described in the position that runs on a bank determine module
Specifically for:
According to user from the numerical value of bit selecting and card sending mechanism identification code, Luhn algorithm is utilized to determine the numerical value of the position that runs on a bank.
9. the bank as claimed in claim 8 free device of card number, it is characterised in that described in the position that runs on a bank determine module
Specifically for:
When the figure place of the position that runs on a bank is one, according to user from the numerical value of bit selecting and card sending mechanism identification code, utilize Luhn
Algorithm inverting determines the numerical value of the position that runs on a bank;
When the figure place of the position that runs on a bank is n position, determine the numerical value of n-1 position before the position that runs on a bank by the order that numerical value is ascending,
According to user's numerical value of n-1 position before the numerical value of bit selecting, card sending mechanism identification code and the position that runs on a bank, utilize Luhn algorithm
Inverting determines the numerical value of n-th, the position that runs on a bank, and wherein, n is more than or equal to 2, and n is integer.
10. the bank as claimed in claim 9 free device of card number, it is characterised in that described in the position that runs on a bank determine module
Specifically for:
When the position that runs on a bank is odd bits, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, odd bits runs on a bank the numerical value of position to utilize Luhn algorithm inverting to determine;Described school
Testing position is user last position from bit selecting;
When the position that runs on a bank is even bit, by numerical value and the exchange of values of check bit of the position that runs on a bank, free according to user
The numerical value of position and card sending mechanism identification code, carry out after utilizing Luhn algorithm inverting inversely calculating except 2 again, determine even number
Position runs on a bank the numerical value of position;
Described odd bits or even bit determine as follows:
Start to count forward from last position of bit selecting from user.
The 11. bank as claimed in claim 9 free devices of card number, it is characterised in that also include:
Enquiry module, is used for inquiring about current sequence number generator sequence number;
The described position that runs on a bank determine module specifically for:
Running on a bank accordingly from current sequence number generator sequence number from the beginning of the numerical value of position, the order ascending by numerical value determines
Run on a bank the numerical value of n-1 position before position.
The 12. bank as claimed in claim 8 free devices of card number, it is characterised in that described in the position that runs on a bank determine module
Specifically for:
According to user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code, Luhn algorithm is utilized to determine crowded
Convert the numerical value of position;
Described free bank card number generation module specifically for:
By the numerical value of the position that runs on a bank, user from the numerical value of bit selecting, card sending mechanism identification code and hair fastener area code combination producing certainly
Select bank's card number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610349091.9A CN105956921A (en) | 2016-05-24 | 2016-05-24 | Method and device for selecting bankcard number by user himself/herself |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610349091.9A CN105956921A (en) | 2016-05-24 | 2016-05-24 | Method and device for selecting bankcard number by user himself/herself |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105956921A true CN105956921A (en) | 2016-09-21 |
Family
ID=56909504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610349091.9A Pending CN105956921A (en) | 2016-05-24 | 2016-05-24 | Method and device for selecting bankcard number by user himself/herself |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105956921A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109544323A (en) * | 2018-11-16 | 2019-03-29 | 上海浦东发展银行股份有限公司信用卡中心 | A kind of intelligent management system of credit card number |
CN111708921A (en) * | 2020-06-11 | 2020-09-25 | 中国建设银行股份有限公司 | Number selection method, device, equipment and storage medium |
CN111914956A (en) * | 2019-05-08 | 2020-11-10 | 威海新北洋荣鑫科技股份有限公司 | Unordered card issuing method and device, card issuing machine and computer readable storage medium |
CN112001789A (en) * | 2020-08-24 | 2020-11-27 | 中国银行股份有限公司 | Bank account generation method and device |
CN112612790A (en) * | 2020-12-17 | 2021-04-06 | 深圳前海微众银行股份有限公司 | Card number configuration method, device, equipment and computer storage medium |
CN112884098A (en) * | 2021-01-25 | 2021-06-01 | 中国建设银行股份有限公司 | Card number generation method and device |
CN113313491A (en) * | 2021-06-22 | 2021-08-27 | 中国农业银行股份有限公司 | Method and related device for generating virtual card number |
CN114612215A (en) * | 2022-03-10 | 2022-06-10 | 中国农业银行股份有限公司 | Credit card number management method and related equipment |
-
2016
- 2016-05-24 CN CN201610349091.9A patent/CN105956921A/en active Pending
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109544323A (en) * | 2018-11-16 | 2019-03-29 | 上海浦东发展银行股份有限公司信用卡中心 | A kind of intelligent management system of credit card number |
CN109544323B (en) * | 2018-11-16 | 2023-07-25 | 上海浦东发展银行股份有限公司信用卡中心 | Intelligent management system for credit card number |
CN111914956A (en) * | 2019-05-08 | 2020-11-10 | 威海新北洋荣鑫科技股份有限公司 | Unordered card issuing method and device, card issuing machine and computer readable storage medium |
CN111708921A (en) * | 2020-06-11 | 2020-09-25 | 中国建设银行股份有限公司 | Number selection method, device, equipment and storage medium |
CN111708921B (en) * | 2020-06-11 | 2024-04-26 | 中国建设银行股份有限公司 | Number selection method, device, equipment and storage medium |
CN112001789A (en) * | 2020-08-24 | 2020-11-27 | 中国银行股份有限公司 | Bank account generation method and device |
CN112001789B (en) * | 2020-08-24 | 2023-08-18 | 中国银行股份有限公司 | Bank account generation method and device |
CN112612790A (en) * | 2020-12-17 | 2021-04-06 | 深圳前海微众银行股份有限公司 | Card number configuration method, device, equipment and computer storage medium |
CN112884098A (en) * | 2021-01-25 | 2021-06-01 | 中国建设银行股份有限公司 | Card number generation method and device |
CN112884098B (en) * | 2021-01-25 | 2024-05-28 | 中国建设银行股份有限公司 | Card number generation method and device |
CN113313491A (en) * | 2021-06-22 | 2021-08-27 | 中国农业银行股份有限公司 | Method and related device for generating virtual card number |
CN114612215A (en) * | 2022-03-10 | 2022-06-10 | 中国农业银行股份有限公司 | Credit card number management method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105956921A (en) | Method and device for selecting bankcard number by user himself/herself | |
US10333710B2 (en) | Method and system for determining desired size of private randomness using Tsallis entropy | |
CN109274717B (en) | Block chain based shared storage method, device, medium and electronic equipment | |
US9350728B2 (en) | Method and system for generating and authorizing dynamic password | |
CN104866601A (en) | Serial number generating method and device | |
US20180034636A1 (en) | Method and system for creating public randomness | |
CN111788791A (en) | Computer-implemented voting process and system | |
CN115065459A (en) | Multi-party privacy set intersection method, device, equipment and storage medium | |
CN110166238A (en) | The generation method and device of quantum key | |
CN111695097A (en) | Login checking method and device and computer readable storage medium | |
CN104657481A (en) | Data storage method and device and data query method and device | |
CN112217639B (en) | Data encryption sharing method and device, electronic equipment and computer storage medium | |
CN113360321A (en) | Micro-service retry calling method and device, electronic equipment and storage medium | |
CN112446765A (en) | Product recommendation method and device, electronic equipment and computer-readable storage medium | |
CN106215417A (en) | Server and gift bag distributor and method | |
CN113965314B (en) | Homomorphic encryption processing method and related equipment | |
CN109636551A (en) | Service order generation method and device | |
CN115242402A (en) | Signature method, signature verification method and electronic equipment | |
CN109117648B (en) | Encryption method for floating point data of database | |
CN113592529A (en) | Potential customer recommendation method and device for bond products | |
CN112559497A (en) | Data processing method, information transmission method and device and electronic equipment | |
CN112053125A (en) | Countersigning method and device, electronic equipment and computer readable storage medium | |
CN103580858B (en) | RSA Algorithm private key element acquisition methods and acquisition device | |
CN112395623A (en) | Data processing method and device and electronic equipment | |
CN110348878A (en) | The method and apparatus that a kind of couple of user is grouped |
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 |
Application publication date: 20160921 |
|
RJ01 | Rejection of invention patent application after publication |