CN107767132B - Method and device for generating rechargeable card password - Google Patents

Method and device for generating rechargeable card password Download PDF

Info

Publication number
CN107767132B
CN107767132B CN201610709244.6A CN201610709244A CN107767132B CN 107767132 B CN107767132 B CN 107767132B CN 201610709244 A CN201610709244 A CN 201610709244A CN 107767132 B CN107767132 B CN 107767132B
Authority
CN
China
Prior art keywords
password
character string
card
predetermined
string
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.)
Active
Application number
CN201610709244.6A
Other languages
Chinese (zh)
Other versions
CN107767132A (en
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.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing 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 Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201610709244.6A priority Critical patent/CN107767132B/en
Publication of CN107767132A publication Critical patent/CN107767132A/en
Application granted granted Critical
Publication of CN107767132B publication Critical patent/CN107767132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment 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/349Rechargeable cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4018Transaction verification using the card verification value [CVV] associated with the card

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Credit Cards Or The Like (AREA)

Abstract

Methods and apparatus for generating a prepaid card password are disclosed. One embodiment of the method comprises: acquiring the serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number; generating a card number character string based on the sequence number and the timestamp value; generating a password string based on the random number; and generating a recharging card password based on the card number character string and the password character string. The embodiment effectively utilizes the generation time data of the rechargeable card password and solves the problem of the validity period of the rechargeable card password.

Description

Method and device for generating rechargeable card password
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of internet technologies, and in particular, to a method and an apparatus for generating a prepaid card password.
Background
The current rechargeable card is basically composed of two parts, one part is the rechargeable amount, and the other part is the covered rechargeable card password composed of numbers and letters. When the user recharges, the user only needs to input the covered recharging card password to recharge the recharging amount corresponding to the recharging card password to the account of the user. In the generation process of the recharging card password, two factors need to be considered: (1) in order to ensure the safety of the rechargeable card, the rechargeable card password is as long as possible and the decryption difficulty is increased; (2) for the convenience of user input, the rechargeable card password cannot be too long, which increases the input burden of the user.
The existing rechargeable card adopts a method for solving the contradiction of the password length of the rechargeable card, wherein the existing rechargeable card is provided with a validity period, and the rechargeable card after exceeding the validity period cannot be recharged because the password of the rechargeable card exceeding the validity period can be recycled. This causes inconvenience in use to the user.
Disclosure of Invention
It is an object of the present application to propose an improved method and apparatus for generating a prepaid card cryptogram, which solves the technical problems mentioned in the background section above.
In a first aspect, the present application provides a method for generating a prepaid card password, the method comprising: acquiring the serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number; generating a card number character string based on the sequence number and the timestamp value; generating a password string based on the random number; and generating a recharging card password based on the card number character string and the password character string.
In some embodiments, said generating a rechargeable card password based on said card number string and said password string comprises: and splicing the password character string to the card number character string to form a rechargeable card password, or splicing the card number character string to the password character string to form the rechargeable card password.
In some embodiments, said generating a card number string based on said sequence number and said timestamp value comprises: shifting the timestamp value to obtain a shifted timestamp value; and splicing the shift timestamp values to the serial numbers to form a spliced character string serving as a card number character string.
In some embodiments, prior to the shifting the timestamp value, the method further comprises: and rounding the timestamp value.
In some embodiments, the shifting the timestamp value to obtain a shifted timestamp value includes: acquiring the digit J of the timestamp value, wherein the J is a positive integer; generating a new J-bit positive integer as a shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the (J +1-J) th bit of the timestamp value.
In some embodiments, the forming a concatenation string as the card number string after the concatenating the shifted timestamp values to the serial numbers includes: converting the splicing character string from decimal system to preset system as card number character string; and generating a password string based on the random number, comprising: converting the random number from decimal to the predetermined scale as a password string.
In some embodiments, the card number string and the password string have a first predetermined number of digits and a second predetermined number of digits, respectively; and the converting the concatenation character string from decimal to predetermined scale as the card number character string includes: when the digit number of the spliced character string after the predetermined system conversion does not reach the first predetermined digit number, supplementing 0 to the high digit of the spliced character string after the predetermined system conversion to form a card number character string of the first predetermined digit number; the converting the random number from decimal to the predetermined scale as a password string includes: and when the digit of the random number after the predetermined system conversion does not reach the second predetermined digit, complementing 0 at the high order of the random number after the predetermined system conversion to form the password character string with the second predetermined digit.
In some embodiments, the timestamp value is generated based on an initial time and a current time, or based on the initial time, the current time, and a predetermined time period.
In some embodiments, the predetermined scale is thirty-two, and thirty-two characters in the thirty-two scale are 10 natural numbers between 0 and 9 and 22 uppercase english letters of the 26 uppercase english letters excluding I, O, S, Z.
In some embodiments, the predetermined scale is thirty-two, and thirty-two characters in the thirty-two scale are 10 natural numbers between 0 and 9 and 22 lowercase letters of the 26 lowercase letters excluding i, o, s, and z.
In a second aspect, the present application provides an apparatus for generating a charger card password, the apparatus comprising: the password generation device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire a serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number; a card number character string generating unit configured to generate a card number character string based on the serial number and the timestamp value; a password character string generating unit configured to generate a password character string based on the random number; and the rechargeable card password generating unit is configured for generating a rechargeable card password based on the card number character string and the password character string.
In some embodiments, the rechargeable card password generation unit is further configured to: and splicing the password character string to the card number character string to form a rechargeable card password, or splicing the card number character string to the password character string to form the rechargeable card password.
In some embodiments, the card number string generation unit includes: a shifting module configured to shift the timestamp value to obtain a shifted timestamp value; and the splicing module is configured to form a splicing character string as the card number character string after splicing the shift timestamp value to the serial number.
In some embodiments, the card number string generation unit further comprises: and the rounding module is configured to round the timestamp value.
In some embodiments, the shifting module is further configured to: acquiring the digit J of the timestamp value, wherein the J is a positive integer; generating a new J-bit positive integer as a shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the (J +1-J) th bit of the timestamp value.
In some embodiments, the stitching module is further configured to: -converting the concatenated string from decimal to predetermined scale as a card number string, and-the password string generation unit is further configured for: converting the random number from decimal to the predetermined scale as a password string.
In some embodiments, the card number string and the password string have a first predetermined number of digits and a second predetermined number of digits, respectively; and the converting the concatenation character string from decimal to predetermined scale as the card number character string includes: when the digit number of the spliced character string after the predetermined system conversion does not reach the first predetermined digit number, supplementing 0 to the high digit of the spliced character string after the predetermined system conversion to form a card number character string of the first predetermined digit number; the converting the random number from decimal to the predetermined scale as a password string includes: and when the digit of the random number after the predetermined system conversion does not reach the second predetermined digit, complementing 0 at the high order of the random number after the predetermined system conversion to form the password character string with the second predetermined digit.
In some embodiments, the timestamp value is generated based on an initial time and a current time, or based on the initial time, the current time, and a predetermined time period.
In some embodiments, the predetermined scale is thirty-two, and thirty-two characters in the thirty-two scale are 10 natural numbers between 0 and 9 and 22 uppercase english letters of the 26 uppercase english letters excluding I, O, S, Z.
In some embodiments, the predetermined scale is thirty-two, and thirty-two characters in the thirty-two scale are 10 natural numbers between 0 and 9 and 22 lowercase letters of the 26 lowercase letters excluding i, o, s, and z.
According to the method and the device for generating the rechargeable card password, the serial number of the rechargeable card of the password to be generated, the timestamp value during password generation and a random number are obtained; then, generating a card number character string based on the serial number and the timestamp value; then, generating a password character string based on the random number; and finally, generating a recharging card password based on the card number character string and the password character string. Therefore, the generation time data of the rechargeable card password is effectively utilized, and the problem of the validity period of the rechargeable card password is solved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow diagram of one embodiment of a method for generating a prepaid card password in accordance with the present application;
FIG. 2 is a schematic diagram of a top-up card password generation process according to the application;
FIG. 3 is a block diagram illustrating one embodiment of an apparatus for generating a prepaid card cryptogram in accordance with the present application;
FIG. 4 is a block diagram of a computer system suitable for use with the computer that implements the embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
FIG. 1 illustrates a flow 100 of one embodiment of a method for generating a prepaid card cryptogram in accordance with the present application. The method for generating the rechargeable card password comprises the following steps:
step 101, acquiring a serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number.
In this embodiment, the serial number of the rechargeable card to be generated with the password may be a number that is sequentially incremented, a character string composed of letters, or a character string formed by combining numbers and letters. For example, the sequence number may be a positive integer from 0 to 1023. Here, the rechargeable card to generate the password may be a plurality of rechargeable cards generated within a predetermined time period. The predetermined time period of the timestamp value in this embodiment may be seconds, or milliseconds, for example, 10 milliseconds, and 1024 rechargeable cards with serial numbers of 0 to 1023 may be generated within 10 milliseconds. The timestamp values of the rechargeable cards generated during the predetermined time period are all the same.
In some optional implementations of the present embodiment, the timestamp value may be generated based on the initial time and the current time. For example, the timestamp value may be the total number of seconds currently in transit from greenwich time 1970, 01, 00 hours 00 minutes 00 seconds (beijing time 1970, 01, 08 hours 00 seconds) to the present. Of course, the initial time here can also be set by itself. Because the timestamp values at different times are different, and the timestamp values are used in the rechargeable card passwords, the rechargeable card passwords generated at different times are different, so that the rechargeable card passwords can be ensured not to be repeated without setting the validity period, and the rechargeable card passwords do not need to be recycled.
In some optional implementations of the present embodiment, the timestamp value may also be generated based on the initial time, the current time, and the predetermined time period. For example, the timestamp value may be the current prevailing total number of seconds from greenwich time 1970, 01, 00 hours 00 minutes 00 seconds (beijing time 1970, 01, 08 hours 00 seconds) to the present divided by a predetermined time period (e.g., 10 milliseconds).
Step 102, generating a card number character string based on the sequence number and the timestamp value.
In this embodiment, the card number string may be generated based on the sequence number and the timestamp value in various ways. For example, the time stamp value may be spliced to the serial number to form a card number string; or the serial number can be spliced to the time stamp value to form a card number character string.
In some optional implementations of this embodiment, the card number string may be generated based on the sequence number and the timestamp value as follows: first, the time stamp value may be subjected to a shift process, resulting in a shifted time stamp value. For example, for a timestamp value 1465164366321 of 13 bits, after a cycle of 1-bit shift processing to the right, a shift timestamp value is obtained: 1146516436632, respectively; then, after the shift timestamp values are spliced to the serial numbers, a spliced character string is formed and serves as the card number character string. For example, for the serial number 1022, the time stamp value 1146516436632 is shifted, and the character string of the card number obtained after splicing the time stamp value to the serial number is: 10221146516436632.
in some optional implementations of this embodiment, the time stamp value may be shifted according to the following steps to obtain a shifted time stamp value: first, the number of bits J of the timestamp value may be obtained, J being a positive integer; then, a new J-bit positive integer is generated as the shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the (J +1-J) th bit of the timestamp value. As an example, after performing the shift processing on the timestamp value 1465164366321 of 13 bits, the shift timestamp value is obtained as: 1236634615641. the shifting timestamp value generated in the mode makes the real meaning of the shifting timestamp value difficult to see, and the cracking difficulty of the rechargeable card password is improved.
In some optional implementations of the present embodiment, the rounding process may be performed on the timestamp value before the shifting process is performed on the timestamp value. As an example, the rounding process is performed on the timestamp value 1471857071.368 to obtain a timestamp value of 1471857071.
In some optional implementations of the embodiment, in the case that the serial number is a number, after the shift timestamp value is spliced to the serial number, a spliced character string may be formed, and then the spliced character string may be converted from decimal to predetermined scale as the card number character string. Even if the card number character string obtained through the conversion of the preset system corresponds to the same time stamp value, the serial number is added, the serial number and the time stamp value are spliced and converted into the preset system, the system of the preset system and the characters used in the preset system are self-defined, the generation rule of the card number character string is difficult to see even if the card number character string is generated at the same time, the cracking difficulty of the password of the rechargeable card is increased, and the safety is improved.
In some optional implementations of this embodiment, the card number character string may have a first predetermined number of digits, and when the number of digits of the concatenated string after the predetermined carry conversion does not reach the first predetermined number of digits, the upper bits of the concatenated string after the predetermined carry conversion may be supplemented with 0 to form the card number character string with the first predetermined number of digits.
In some optional implementations of this embodiment, the predetermined scale may be thirty-two scale, and thirty-two characters in the thirty-two scale may be 10 natural numbers between 0 and 9 and 22 capital english letters excluding I, O, S, Z from the 26 capital english letters.
In some optional implementations of this embodiment, the predetermined binary system may also be a thirty-two binary system, and thirty-two characters in the thirty-two binary system may be 10 natural numbers between 0 and 9 and 22 lowercase english letters excluding i, o, s, and z in the 26 lowercase english letters.
Step 103, generating a password character string based on the random number.
In this embodiment, the password string may be generated based on the random number in various ways. For example, a random number may be used directly as a password string; or the random number is shifted to obtain the password character string.
In some optional implementations of the present embodiment, the random number may also be converted from decimal to a predetermined scale as a password string. First, the range of the value generated by the random number is difficult to be determined because the value generated randomly in decimal system is converted into a predetermined scale; in addition, the system of the preset system and the characters used in the preset system are self-defined, so that the difficulty of cracking the password character string is greatly increased.
In some optional implementations of this embodiment, the password character string may have a second predetermined number of digits, and when the number of digits of the random number after the predetermined scale conversion does not reach the second predetermined number of digits, the upper bits of the random number after the predetermined scale conversion may be complemented by 0 to form the password character string with the second predetermined number of digits.
It should be noted that, assuming that the second predetermined digit of the password character string is M, the predetermined scale is N, and both M and N are positive integers, the value range of the random number may be set to 0 to (N)M-1)。
In some optional implementations of this embodiment, the predetermined binary system may be thirty-two binary systems, and thirty-two characters in the thirty-two binary systems may be 10 natural numbers between 0 and 9 and 22 capital english letters excluding I, O, S, Z among the 26 capital english letters.
In some optional implementations of this embodiment, the predetermined binary system may also be a thirty-two binary system, and thirty-two characters in the thirty-two binary system may be 10 natural numbers between 0 and 9 and 22 lowercase english letters excluding i, o, s, and z in the 26 lowercase english letters.
In this way, the letters and the numbers in the thirty-two system are respectively removed from 1 and I or 1 and I, 0 and O or 0 and O, 5 and S or 5 and S and 2 and Z or 2 and Z which are easy to generate confusion, and based on the arrangement, the possible combination of English letters and numbers which are easy to generate confusion is removed from the finally generated recharge card password, so that the input burden of a user is reduced.
And 104, generating a recharging card password based on the card number character string and the password character string.
In this embodiment, the recharge card password may be generated based on the card number string and the password string in various ways.
In some optional implementation manners of this embodiment, the password character string may be spliced to the card number character string to form a rechargeable card password; or splicing the card number character string to the password character string to form the rechargeable card password.
Because the time stamp is used in the card number character string and the password character string is generated by the random number, the combination of the two increases the difficulty of cracking the rechargeable card password.
With continued reference to fig. 2, fig. 2 is a schematic diagram of a generation process of a prepaid card password according to the present embodiment. In the application scenario of fig. 2, to generate a 10-bit card number string and a 6-bit password string, first, a time stamp value 1465164366321 of 6 minutes 6.321 seconds of 6 days 6 months 6 years of current time 2016 is obtained, and then a shift processing is performed on the time stamp value 1465164366321 to obtain a shift time stamp value 1236634615641, which is from 0 to 1023 (i.e., 32) for the data string from 0 to 1023 (i.e., 32)10-8-1) generates a card number string with sequence number i for the current time 2016, 6 months 6 days 6 minutes 6.321 seconds. For example, for the serial number i of 1022, a splicing character string "10221236634615641" is generated, the splicing character string is converted from decimal to 32-digit, if the converted splicing character string is not enough than 10 digits, 0 is complemented at the upper digit of the converted splicing character string to form a 10-digit card number character string; then randomly generate 0 to 1073741823 (i.e. 32)6-1) as a random number, converting the random number into 32-ary, and if the converted random number is less than 6 bits, complementing 0 in the upper bits of the converted random number to form a 6-bit cipher string; finally, the card number string and the password string are spliced together to form 2016 for the current timeA recharge card password with sequence number 1022 of 6 minutes 6.321 seconds of 6 months and 6 days of 6 years.
The method provided by the embodiment of the application obtains the serial number of the rechargeable card of the password to be generated, the timestamp value during password generation and a random number; then, generating a card number character string based on the serial number and the timestamp value; then, generating a password character string based on the random number; and finally, generating a recharging card password based on the card number character string and the password character string. Therefore, the generation time data of the rechargeable card password is effectively utilized, the problem of the validity period of the rechargeable card password is solved, the security of the rechargeable card password is improved, and the input burden of a user is reduced.
With further reference to fig. 3, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for generating a prepaid card password, which corresponds to the embodiment of the method shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 3, the recharging device 300 of the present embodiment includes: an acquisition unit 301, a card number string generation unit 302, a password string generation unit 303, and a rechargeable card password generation unit 304. The acquiring unit 301 is configured to acquire a serial number of a rechargeable card of a password to be generated, a timestamp value during password generation, and a random number; a card number string generating unit 302 configured to generate a card number string based on the serial number and the timestamp value; a password character string generating unit 303 configured to generate a password character string based on the random number; the rechargeable card password generation unit 304 is configured to generate a rechargeable card password based on the card number character string and the password character string.
In this embodiment, specific processes of the obtaining unit 301, the card number character string generating unit 302, the password character string generating unit 303, and the rechargeable card password generating unit 304 of the device 300 for generating a rechargeable card password and technical effects thereof may refer to the related descriptions of step 101, step 102, step 103, and step 104 in the corresponding embodiment of fig. 1, and are not repeated herein.
In some optional implementations of the present embodiment, the rechargeable card password generating unit 304 may be further configured to: and splicing the password character string to the card number character string to form a rechargeable card password, or splicing the card number character string to the password character string to form the rechargeable card password.
In some optional implementations of this embodiment, the card number string generating unit 302 may include: a shifting module 3022, configured to shift the timestamp value to obtain a shifted timestamp value; the splicing module 3023 is configured to splice the shift timestamp values to the serial numbers to form a splicing character string as a card number character string.
In some optional implementations of this embodiment, the card number string generating unit 302 may further include: a rounding module 3021, configured to round the timestamp value.
In some optional implementations of the present embodiment, the shifting module 3021 may be further configured to: acquiring the digit J of the timestamp value, wherein the J is a positive integer; generating a new J-bit positive integer as a shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the (J +1-J) th bit of the timestamp value.
In some optional implementations of this embodiment, the splicing module 3022 may be further configured to: converting the concatenation character string from decimal to predetermined scale as a card number character string, and the password character string generating unit 303 may be further configured to: and converting the random number from decimal system to the preset system as the password character string.
In some optional implementations of this embodiment, the card number character string and the password character string may have a first predetermined number of digits and a second predetermined number of digits, respectively; and the converting the concatenation character string from decimal to predetermined scale as the card number character string may include: when the digit of the spliced character string after the predetermined system conversion does not reach the first predetermined digit, 0 is supplemented to the high digit of the spliced character string after the predetermined system conversion to form a card number character string of the first predetermined digit; the converting the random number from decimal to the predetermined scale may include, as a password character string: and when the digit of the random number after the predetermined system conversion does not reach the second predetermined digit, complementing 0 at the high order of the random number after the predetermined system conversion to form the password character string with the second predetermined digit.
In some optional implementations of the present embodiment, the timestamp value may be generated based on the initial time and the current time, or based on the initial time, the current time, and a predetermined time period.
In some optional implementations of this embodiment, the predetermined scale may be a thirty-two scale, and thirty-two characters in the thirty-two scale may be 10 natural numbers between 0 and 9 and 22 uppercase english letters excluding I, O, S, Z from the 26 uppercase english letters.
In some optional implementations of this embodiment, the predetermined scale may be a thirty-two scale, and thirty-two characters in the thirty-two scale may be 10 natural numbers between 0 and 9 and 22 lowercase english letters excluding i, o, s, and z in the 26 lowercase english letters.
Referring now to FIG. 4, shown is a block diagram of a computer system 400 suitable for use in implementing the computers of the embodiments of the present application.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: a storage section 406 including a hard disk and the like; and a communication section 407 including a network interface card such as a LAN card, a modem, or the like. The communication section 407 performs communication processing via a network such as the internet. A drive 408 is also connected to the I/O interface 405 as needed. A removable medium 409 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted as necessary on the drive 408, so that a computer program read out therefrom is mounted as necessary in the storage section 406.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 407 and/or installed from the removable medium 409. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 401.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a card number string generation unit, a password string generation unit, and a rechargeable card password generation unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the acquiring unit may also be described as a "unit that acquires basic information of the rechargeable card".
As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the apparatus in the above-described embodiments; or it may be a non-volatile computer storage medium that exists separately and is not incorporated into the terminal. The non-transitory computer storage medium stores one or more programs that, when executed by a device, cause the device to: acquiring the serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number; generating a card number character string based on the sequence number and the timestamp value; generating a password character string based on the random number; generating a recharging card password based on the card number character string and the password character string.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (16)

1. A method for generating a charger card password, the method comprising:
acquiring a serial number of a rechargeable card of a password to be generated, a timestamp value and a random number when the password is generated, wherein the rechargeable card of the password to be generated is a plurality of rechargeable cards generated in a preset time period, the serial number comprises sequentially increasing numbers corresponding to each rechargeable card in the rechargeable cards, and the timestamp values of the rechargeable cards are the same in the preset time period;
generating a card number character string based on the sequence number and the timestamp value; generating a card number string based on the sequence number and the timestamp value, including: shifting the timestamp value to obtain a shifted timestamp value; splicing the shift timestamp values to the serial numbers to form a spliced character string serving as a card number character string;
the shifting the timestamp value to obtain a shifted timestamp value includes: acquiring the digit J of the timestamp value, wherein the J is a positive integer; generating a new J-bit positive integer as a shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the J +1-J bits of the timestamp value;
generating a password string based on the random number;
and generating a recharging card password based on the card number character string and the password character string.
2. The method of claim 1, wherein generating a rechargeable card password based on the card number string and the password string comprises:
after the password character string is spliced to the card number character string, a rechargeable card password is formed, or
And splicing the card number character string to the password character string to form a rechargeable card password.
3. The method of claim 1, wherein prior to the shifting the timestamp value, the method further comprises:
and rounding the timestamp value.
4. The method of claim 1, wherein the concatenating the shift timestamp value to the serial number to form a concatenated string as a card number string comprises:
converting the splicing character string from decimal system to preset system as card number character string; and
generating a password string based on the random number, comprising:
converting the random number from decimal to the predetermined scale as a password string.
5. The method of claim 4 wherein said card number string has a first predetermined number of digits and said password string has a second predetermined number of digits; and
the converting the concatenation character string from decimal to predetermined scale as the card number character string includes:
when the digit number of the spliced character string after the predetermined system conversion does not reach the first predetermined digit number, supplementing 0 to the high digit of the spliced character string after the predetermined system conversion to form a card number character string of the first predetermined digit number;
the converting the random number from decimal to the predetermined scale as a password string includes:
and when the digit of the random number after the predetermined system conversion does not reach the second predetermined digit, complementing 0 at the high order of the random number after the predetermined system conversion to form the password character string with the second predetermined digit.
6. The method of any of claims 1 to 5, wherein the timestamp value is generated based on an initial time and a current time or based on an initial time, a current time and a predetermined time period.
7. The method of claim 4, wherein the predetermined bin is a thirty-two bin, and wherein thirty-two characters in the thirty-two bin are 10 natural numbers between 0 and 9 and 22 uppercase letters of the 26 uppercase letters excluding I, O, S, Z.
8. The method of claim 4, wherein the predetermined bin is a thirty-two bin, and wherein thirty-two characters in the thirty-two bin are 10 natural numbers between 0 and 9 and 22 lowercase letters of the 26 lowercase letters excluding i, o, s, and z.
9. An apparatus for generating a charger card password, the apparatus comprising:
the password generating device comprises an acquiring unit, a processing unit and a processing unit, wherein the acquiring unit is configured to acquire a serial number of a rechargeable card of a password to be generated, a timestamp value during password generation and a random number, the rechargeable card of the password to be generated is a plurality of rechargeable cards generated in a preset time period, the serial number comprises sequentially increasing numbers corresponding to each rechargeable card in the rechargeable cards, and the timestamp values of the rechargeable cards in the preset time period are the same;
a card number character string generating unit configured to generate a card number character string based on the serial number and the timestamp value; the card number character string generating unit includes: a shifting module configured to shift the timestamp value to obtain a shifted timestamp value; the splicing module is configured to form a splicing character string as a card number character string after the shifting timestamp value is spliced to the serial number;
the shifting module is further configured to: acquiring the digit J of the timestamp value, wherein the J is a positive integer; generating a new J-bit positive integer as a shift timestamp value, wherein for a positive integer J from 1 to J, the value of the jth bit of the shift timestamp value is set to the value of the J +1-J bits of the timestamp value;
a password character string generating unit configured to generate a password character string based on the random number;
and the rechargeable card password generating unit is configured for generating a rechargeable card password based on the card number character string and the password character string.
10. The apparatus of claim 9, wherein the rechargeable card password generation unit is further configured to:
after the password character string is spliced to the card number character string, a rechargeable card password is formed, or
And splicing the card number character string to the password character string to form a rechargeable card password.
11. The apparatus of claim 9, wherein the card number string generation unit further comprises:
and the rounding module is configured to round the timestamp value.
12. The apparatus of claim 9, wherein the splicing module is further configured to:
converting the concatenated string from decimal to predetermined scale as a card number string, an
The password character string generation unit is further configured to:
converting the random number from decimal to the predetermined scale as a password string.
13. The apparatus of claim 12 wherein said card number string has a first predetermined number of digits and said password string has a second predetermined number of digits; and
the converting the concatenation character string from decimal to predetermined scale as the card number character string includes:
when the digit number of the spliced character string after the predetermined system conversion does not reach the first predetermined digit number, supplementing 0 to the high digit of the spliced character string after the predetermined system conversion to form a card number character string of the first predetermined digit number;
the converting the random number from decimal to the predetermined scale as a password string includes:
and when the digit of the random number after the predetermined system conversion does not reach the second predetermined digit, complementing 0 at the high order of the random number after the predetermined system conversion to form the password character string with the second predetermined digit.
14. The apparatus of any of claims 9 to 13, wherein the timestamp value is generated based on an initial time and a current time or based on an initial time, a current time and a predetermined time period.
15. The apparatus of claim 12, wherein the predetermined bin is a thirty-two bin, and wherein thirty-two characters in the thirty-two bin are 10 natural numbers between 0 and 9 and 22 uppercase english letters of the 26 uppercase english letters excluding I, O, S, Z.
16. The apparatus of claim 12, wherein the predetermined bin is a thirty-two bin, and wherein thirty-two characters in the thirty-two bin are 10 natural numbers between 0 and 9 and 22 lowercase letters of the 26 lowercase letters excluding i, o, s, and z.
CN201610709244.6A 2016-08-23 2016-08-23 Method and device for generating rechargeable card password Active CN107767132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610709244.6A CN107767132B (en) 2016-08-23 2016-08-23 Method and device for generating rechargeable card password

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610709244.6A CN107767132B (en) 2016-08-23 2016-08-23 Method and device for generating rechargeable card password

Publications (2)

Publication Number Publication Date
CN107767132A CN107767132A (en) 2018-03-06
CN107767132B true CN107767132B (en) 2022-01-14

Family

ID=61263629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610709244.6A Active CN107767132B (en) 2016-08-23 2016-08-23 Method and device for generating rechargeable card password

Country Status (1)

Country Link
CN (1) CN107767132B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829650B (en) * 2018-06-01 2022-08-23 腾讯科技(北京)有限公司 Card number generation method, device, server and storage medium
CN114024665A (en) * 2021-09-14 2022-02-08 天聚地合(苏州)数据股份有限公司 Random key and card number generation method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874357A (en) * 2005-09-30 2006-12-06 华为技术有限公司 Method for generating id symbol
CN101533414A (en) * 2009-04-15 2009-09-16 阿里巴巴集团控股有限公司 A method and a device for generating unique identifier of database record
CN102332030A (en) * 2011-10-17 2012-01-25 中国科学院计算技术研究所 Data storing, managing and inquiring method and system for distributed key-value storage system
CN102622359A (en) * 2011-01-27 2012-08-01 联想移动通信科技有限公司 Method and device for searching character strings in database
CN103118351A (en) * 2013-01-17 2013-05-22 北京印天网真科技有限公司 Generation method and device of rechargeable card data
US8533474B2 (en) * 2008-02-27 2013-09-10 Red Hat, Inc. Generating session keys
CN105450712A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Data transmission method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874357A (en) * 2005-09-30 2006-12-06 华为技术有限公司 Method for generating id symbol
US8533474B2 (en) * 2008-02-27 2013-09-10 Red Hat, Inc. Generating session keys
CN101533414A (en) * 2009-04-15 2009-09-16 阿里巴巴集团控股有限公司 A method and a device for generating unique identifier of database record
CN102622359A (en) * 2011-01-27 2012-08-01 联想移动通信科技有限公司 Method and device for searching character strings in database
CN102332030A (en) * 2011-10-17 2012-01-25 中国科学院计算技术研究所 Data storing, managing and inquiring method and system for distributed key-value storage system
CN103118351A (en) * 2013-01-17 2013-05-22 北京印天网真科技有限公司 Generation method and device of rechargeable card data
CN105450712A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN107767132A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN107147616B (en) Data ciphering method and device
CN110737908B (en) Encryption method and apparatus, decryption method and apparatus, electronic device, and medium
CN108052805B (en) Data encryption and decryption method and device
CN106530206B (en) Image encryption and decryption method and device based on optical encryption and decryption technology
US20200177380A1 (en) Seed key expansion method and its uses
CN107767132B (en) Method and device for generating rechargeable card password
CN104168116A (en) Database identity authentication method and system
CN110224811A (en) Internet of Things cipher processing method, apparatus and system
CN109359276B (en) Anti-counterfeiting code generation method, device, equipment and storage medium
CN112019328B (en) Encryption method, device, equipment and storage medium of IP address
CN103095449A (en) Dynamic encryption and decryption method based on stream ciphers
CN112235319B (en) Data encryption and decryption method and device and encryption and decryption circuit
CN118300672A (en) Beidou satellite-based data transmission method and system
CN103118351A (en) Generation method and device of rechargeable card data
CN110730453B (en) Wireless body area network, key generation method, key distribution method and related device thereof
CN111597521B (en) Method and system for safely processing data of mobile terminal of transformer substation
CN110515591B (en) Random number generation method and device based on block chain
CN115834163B (en) Method, device, equipment and storage medium for generating secret key of encrypted data
CN110249299A (en) Generate method, chip and the electronic equipment of random number
CN111931204A (en) Encryption and de-duplication storage method and terminal equipment for distributed system
CN114943205A (en) Method, system, storage medium and electronic equipment for generating identity recognition code UUID
KR101758727B1 (en) Method for transmitting hidden information using message composed of string digital code
CN103580874A (en) Identity authentication method and system and password protection device
CN115935299A (en) Authorization control method, device, computer equipment and storage medium
CN109257341B (en) Block chain address management method and equipment

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
GR01 Patent grant
GR01 Patent grant