CN113721887A - Method for generating system card number by random hash algorithm - Google Patents
Method for generating system card number by random hash algorithm Download PDFInfo
- Publication number
- CN113721887A CN113721887A CN202111004291.8A CN202111004291A CN113721887A CN 113721887 A CN113721887 A CN 113721887A CN 202111004291 A CN202111004291 A CN 202111004291A CN 113721887 A CN113721887 A CN 113721887A
- Authority
- CN
- China
- Prior art keywords
- card number
- card
- database
- generating
- hash algorithm
- 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
- 238000000034 method Methods 0.000 title claims abstract description 26
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/58—Random or pseudo-random number generators
- G06F7/588—Random number generators, i.e. based on natural stochastic processes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
-
- 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/34—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
- G06Q20/341—Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Computer Networks & Wireless Communication (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a method for generating a system card number by a random hash algorithm, which comprises the following steps: writing the sequentially generated card numbers into a card number file, then scrambling the sequence of the card numbers in the card number file, and then storing the scrambled card numbers into a database; when obtaining the card number, the invention receives the command of obtaining the card number, reads a card number from the database, modifies the state of the obtained card number into the used state, and deletes the card number with the used state.
Description
Technical Field
The invention belongs to the technical field of data security, and particularly relates to a method for generating a system card number by a random hash algorithm.
Background
In the current solution, the card number is generated based on the original card number, and is generated sequentially. Therefore, a lawbreaker may try the card number continuously from top to bottom through a certain card number to perform financial related illegal operations.
Disclosure of Invention
The present invention is made to solve the above problems, and an object of the present invention is to provide a method for generating a system card number by a random hash algorithm, which obtains a random card number and reduces financial security problems caused by the card number.
The invention provides a method for generating a system card number by a random hash algorithm, which is characterized by comprising the following steps:
writing the sequentially generated card numbers into a card number file, then scrambling the sequence of the card numbers in the card number file, and then storing the scrambled card numbers into a database;
when card number is obtained, the command of obtaining card number is received, a card number is read from the database, the state of the obtained card number is changed into used, and the card number with the used state is deleted.
Further, in the method for generating a system card number by using a random hash algorithm provided by the present invention, the method may further have the following characteristics: the method for generating the system card number by the random hash algorithm is developed based on the shell language and SQL.
Further, in the method for generating a system card number by using a random hash algorithm provided by the present invention, the method may further have the following characteristics: and when the sequence of the card numbers in the card number file is disturbed, using a shuf command in the shell language to carry out the disturbance.
Further, in the method for generating a system card number by using a random hash algorithm provided by the present invention, the method may further have the following characteristics: when obtaining the card number, judging whether the card number exists in the database, if so, obtaining the card number from the database, and if not, prompting that no card number can be obtained.
Further, in the method for generating a system card number by using a random hash algorithm provided by the present invention, the method may further have the following characteristics: and when the card number is acquired and read from the database, sequentially reading the card number in the database.
The invention has the following advantages:
the method for generating the system card number by the random hash algorithm obtains the card number randomly, so that a lawless person can avoid trying the card number which is continuous up and down through a certain card number to perform financial related illegal operation, and the financial security is improved.
Drawings
Fig. 1 is a flow chart illustrating the execution of generating a non-sequential card number in the present invention.
Fig. 2 is a flow chart of the present invention for executing card number acquisition.
Detailed Description
In order to make the technical means, the creation features, the achievement purposes and the efficacy of the present invention easy to understand, the following embodiments describe the method for generating the system card number by the random hash algorithm in detail with reference to the accompanying drawings.
The method for generating the system card number by the random hash algorithm comprises the following steps:
and writing the sequentially generated card numbers into a card number file, then scrambling the sequence of the card numbers in the card number file, and storing the scrambled card numbers into a database. In this embodiment, the card number in the card number file is scrambled using the shuf command in the shell language.
When card number is obtained, the command of obtaining card number is received, a card number is read from the database, the state of the obtained card number is changed into used, and the card number with the used state is deleted.
In this embodiment, when acquiring the card number, it is determined whether the card number exists in the database, if so, one card number is acquired, and if not, no card number is indicated to be acquired.
In this embodiment, when the card number is obtained, the card numbers in the database are sequentially read when the card numbers are read from the database.
In this embodiment, the method for generating the system card number by using the random hash algorithm is implemented based on the shell language and SQL development.
The execution flow of the method for generating the system card number by the random hash algorithm is as follows:
as shown in FIG. 1, the execution flow of generating the non-sequential card number is as follows:
in step S1-1, the card numbers generated in sequence are written into the card number file.
And step S1-2, using the shuf command in the shell language to scramble the card number in the card number file.
And step S1-3, storing the scrambled card number into a database.
As shown in fig. 2, the execution flow when obtaining the card number is as follows:
at step S2-1, a command to acquire a card number is received.
Step S2-2, judging whether the database has card number, if yes, going to step S2-3a, if not, going to step S2-3 b.
At step S2-3a, a card number is sequentially obtained from the database, the state of the obtained card number is modified to be used, and the card number whose state is used is deleted.
At step S2-3b, it is prompted that no card number is available.
The above embodiments are preferred examples of the present invention, and are not intended to limit the scope of the present invention.
Claims (5)
1. A method for generating a system card number by a random hash algorithm is characterized by comprising the following steps:
writing the sequentially generated card numbers into a card number file, then scrambling the sequence of the card numbers in the card number file, and then storing the scrambled card numbers into a database;
when card number is obtained, the command of obtaining card number is received, a card number is read from the database, the state of the obtained card number is changed into used, and the card number with the used state is deleted.
2. The method of generating a system card number according to claim 1, wherein:
the method for generating the system card number by the random hash algorithm is developed based on the shell language and SQL.
3. The method of generating a system card number according to claim 2, wherein:
and when the sequence of the card numbers in the card number file is disturbed, using a shuf command in the shell language to carry out the disturbance.
4. The method of generating a system card number according to claim 1, wherein:
when obtaining the card number, judging whether the card number exists in the database, if so, obtaining the card number from the database, and if not, prompting that no card number can be obtained.
5. The method of generating a system card number according to claim 1, wherein:
and when the card number is acquired and read from the database, sequentially reading the card number in the database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111004291.8A CN113721887A (en) | 2021-08-30 | 2021-08-30 | Method for generating system card number by random hash algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111004291.8A CN113721887A (en) | 2021-08-30 | 2021-08-30 | Method for generating system card number by random hash algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113721887A true CN113721887A (en) | 2021-11-30 |
Family
ID=78678993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111004291.8A Pending CN113721887A (en) | 2021-08-30 | 2021-08-30 | Method for generating system card number by random hash algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113721887A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114612215A (en) * | 2022-03-10 | 2022-06-10 | 中国农业银行股份有限公司 | Credit card number management method and related equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102098401A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Voucher card generating, charging and inquiring methods and systems |
CN105095263A (en) * | 2014-05-08 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Generation method for card number and apparatus thereof |
CN107622102A (en) * | 2017-09-11 | 2018-01-23 | 平安科技(深圳)有限公司 | Entity card number generation method and terminal device |
CN110069242A (en) * | 2019-04-26 | 2019-07-30 | 迅付信息科技有限公司 | A kind of generation method of randomizer and electronic ticket, dynamic payment code |
CN110765738A (en) * | 2018-07-24 | 2020-02-07 | 鸿合科技股份有限公司 | System and method for generating card number and electronic equipment |
CN112884098A (en) * | 2021-01-25 | 2021-06-01 | 中国建设银行股份有限公司 | Card number generation method and device |
-
2021
- 2021-08-30 CN CN202111004291.8A patent/CN113721887A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102098401A (en) * | 2009-12-11 | 2011-06-15 | 华为技术有限公司 | Voucher card generating, charging and inquiring methods and systems |
CN105095263A (en) * | 2014-05-08 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Generation method for card number and apparatus thereof |
CN107622102A (en) * | 2017-09-11 | 2018-01-23 | 平安科技(深圳)有限公司 | Entity card number generation method and terminal device |
CN110765738A (en) * | 2018-07-24 | 2020-02-07 | 鸿合科技股份有限公司 | System and method for generating card number and electronic equipment |
CN110069242A (en) * | 2019-04-26 | 2019-07-30 | 迅付信息科技有限公司 | A kind of generation method of randomizer and electronic ticket, dynamic payment code |
CN112884098A (en) * | 2021-01-25 | 2021-06-01 | 中国建设银行股份有限公司 | Card number generation method and device |
Non-Patent Citations (1)
Title |
---|
周期律等: "测试数据脱敏综合评价体系的研究与探讨", 《中国金融电脑》, no. 7, pages 55 - 58 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114612215A (en) * | 2022-03-10 | 2022-06-10 | 中国农业银行股份有限公司 | Credit card number management method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105005718B (en) | A kind of method that Code obfuscation is realized using Markov chain | |
CN110324146A (en) | Alleviation to offline attack with known plaintext | |
CN101261666B (en) | A method for realizing software copyright protection based on encrypted executable program file | |
CN102238001B (en) | Method and device for enhancing data security | |
CN105787324A (en) | Computer information security system | |
CN108073821B (en) | Data security processing method and device | |
CN113721887A (en) | Method for generating system card number by random hash algorithm | |
US10706160B1 (en) | Methods, systems, and articles of manufacture for protecting data in an electronic document using steganography techniques | |
CN105897417A (en) | Encrypted data input method and encrypted data input device | |
CN103745479A (en) | Digital steganography and steganalysis method for color image | |
Cui et al. | Multitask identity-aware image steganography via minimax optimization | |
CN107087002B (en) | A kind of encipher-decipher method of data, device and electronic equipment | |
Castiglione et al. | Hiding Information into OOXML Documents: New Steganographic Perspectives. | |
CN116503232A (en) | Remote sensing image zero watermark processing method based on robust statistical characteristics | |
CN113810189B (en) | Method and device for generating key picture | |
CN102426592A (en) | Method for initializing database based on dynamic password | |
CN110955889A (en) | Electronic document tracing method based on digital fingerprints | |
CN106228503A (en) | The digital watermark embedding of satellite remote-sensing image SHP dot file and extracting method | |
Al-Saadi et al. | A blind watermarking model of the 3D object and the polygonal mesh objects for securing copyright | |
CN109766141A (en) | A kind of data dynamic updating method and its device based on dynamic link library | |
CN111563266B (en) | Encryption method and device, decryption method and device for data operation program of power system | |
CN106598863A (en) | Method and device for verifying copyright of embedded software | |
CN109190741B (en) | Secret information management method based on QR (quick response) code and terminal | |
CN111931134A (en) | Encryption method of computer system | |
Xiang et al. | A digital watermarking algorithm for dem image based on stationary wavelet transform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211130 |