IP Library Granted Patent US 11,288,664
Granted Patent B2
US 11,288,664 · App. 14/989,768 · Granted Mar 29, 2022

Method and apparatus for processing transactions

Inventor: Jun Yin (Hangzhou, CN)
Assignee: Advanced New Technologies Co., Ltd.
G06Q20/385G06Q20/3827
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,288,664
App. No.
14/989,768
Granted
Mar 29, 2022
Kind
B2
Abstract

Method and apparatus for processing a transaction are disclosed. The method includes receiving an original card number used for a request of processing a transaction; calculating a hash value corresponding to the original card number based on the original card number, and acquiring an index card number corresponding to the original card number based on the hash value corresponding to the original card number; and sending the index card number to an entity that processes the transaction to enable the entity to process the transaction based on the index card number. The present disclosure creates corresponding index card numbers for a number of original card numbers in a system respectively, which ensures a one-to-one correspondence between the index card numbers and the original card numbers in the case of high concurrency and a convenient search for an encrypted credit card number whose password is changed frequently.

Claims (94)

1. A method implemented by one or more computing devices for ensuring one-to-one correspondence between an index card number and an original card number, the method comprising:

receiving the original card number for a request of processing a transaction;

calculating a hash value corresponding to the original card number;

determining whether a card number record having the hash value is stored in a database among a plurality of card number records stored in the database, each card number record comprising a corresponding index card number, a corresponding card number cipher text, and a corresponding hash value; and

upon determining that the card number record having the hash value is stored in the database:

obtaining a card number cipher text from the card number record;

extracting a version of a secret key in the card number cipher text;

obtaining a secret key used for encrypting the card number cipher text by reading a secret key dictionary based on the version of the secret key;

obtaining a stored card number associated with the card number record by decrypting the card number cipher text using the secret key;

determining whether the original card number is identical to the stored card number; and

upon determining that the original card number is identical to the stored card number:

obtaining an index card number corresponding to the original card number based on the hash value corresponding to the original card number; and

sending the index card number to an entity to process the transaction based on the index card number.

2. The method of claim 1 further comprising:

upon determining that the card number record having the hash value is not stored in the database,

setting the original card number as a new card number;

setting a hash number corresponding to the original card number to be a first value, allocating an index card number to the original card number;

obtaining a latest secret key and a version of the latest secret key from a secret key dictionary;

encrypting the original card number using the latest secret key, and combining the version of the latest secret key with a front end of a cipher text obtained from the encryption to obtain a cipher text corresponding to the original card number; and

using the allocated index card number, the cipher text corresponding to the original card number, the hash value corresponding to the original card number, and the hash number corresponding to the hash value as a card number record corresponding to the original card number, and storing the card number record in the database, wherein the index card number is determined to be successfully allocated to the original card number if no violation of a restriction on the hash value and the hash number exists when storing the card number record corresponding to the original card number in the database.

3. The method of claim 1 , further comprising:

traversing the plurality of card number records stored in the database;

obtaining a card number cipher text from a currently traversed card number record and extracting a secret key version from the card number cipher text;

comparing the secret key version of the card number cipher text with a latest secret key version obtained from the secret key dictionary;

obtaining a secret key corresponding to the secret key version of the card number cipher text from the secret key dictionary and using the obtained secret key to decrypt the card number cipher text to obtain the original card number if the secret key version of the card number cipher text is not the latest secret key version;

obtaining a new secret key corresponding to the latest secret key version from the secret key dictionary, encrypting the original card number using the new secret key, and combining a cipher text obtained from the encryption with the latest secret key version to obtain an updated card number cipher text; and

updating a content in a field of the card number cipher text in the currently traversed card number record as an updated card number cipher text.

4. The method of claim 1 , further comprising:

upon determining that the original card number is not identical to the stored card number:

setting the original card number as a new card number;

setting a hash number corresponding to the stored card number to be a second value;

allocating an index card number to the stored card number;

obtaining a latest secret key and a version of the latest secret key from a secret key dictionary;

encrypting the original card number using the latest secret key;

combining the version of the latest secret key with a front end of a cipher text obtained from the encryption to obtain a cipher text corresponding to the original card number;

using the allocated index card number, the cipher text corresponding to the original card number, the hash value corresponding to the original card number and the hash number corresponding to the hash value as a card number record corresponding to the original card number; and

storing the card number record in the database, wherein the index card number is determined to be successfully allocated to the original card number if no violation of a restriction on the hash value and the hash number exists when storing the card number record corresponding to the original card number in the database.

5. An apparatus comprising:

one or more processors; and

memory coupled to the one or more processors, the memory storing a plurality of modules executable by the one or more processors, the plurality of modules including:

a receiving module configured to receive an original card number used for requesting to process a transaction;

a calculation module configured to calculate a hash value corresponding to the original card number received by the receiving module;

an acquisition module configured to obtain an index card number corresponding to the original card number based on the hash value corresponding to the original card number, the acquisition module comprising:

a search sub-module configured to search a database for a stored card number record having the hash value;

an acquisition sub-module configured to obtain a respective card number cipher text in each card number record that is found by the search sub-module, intercept a secret key version from the respective card number cipher text, read a secret key dictionary based on the secret key version, obtain a secret key used for encrypting the respective card number cipher text from the secret key dictionary,

a decryption sub-module configured to decrypt the respective card number cipher text using the secret key that is obtained by the acquisition sub-module to obtain a respective original card number from each card number record;

a comparison sub-module configured to compare the respective original card number of each card number record that is obtained by the decryption sub-module with the received original card number; and

a determination sub-module configured to set the original card number as a new card number when no card number record having the hash value is found in the database; and

a sending module configured to send the index card number obtained by the acquisition module to an entity that processes the transaction to enable the entity to process the transaction based on the index card number.

6. The apparatus of claim 5 , wherein the acquisition module further comprises:

an allocation sub-module configured to set a hash number corresponding to the original card number to be a first value and allocating an index card number to the original card number, after the determination sub-module sets the original card number as the new card number;

an encryption sub-module configured to obtain a latest secret key and a version of the latest secret key from a secret key dictionary, encrypt the original card number using the latest secret key, and combine the version of the latest secret key with a front end of a cipher text obtained from the encryption to obtain a cipher text corresponding to the original card number; and

a storage sub-module configured to use the index card number allocated by the allocation sub-module, the cipher text corresponding to the original card number obtained by the encryption sub-module, the hash value corresponding to the original card number and the hash number corresponding to the hash value as a card number record corresponding to the original card number, and store the card number record in the database.

7. The apparatus of claim 6 , wherein the determination sub-module is further configured to determine that the index card number is successfully allocated to the original card number when no violation of a restriction on the hash value and the hash number exists when the storage sub-module stores the card number record corresponding to the original card number in the database.

8. The apparatus of claim 5 , wherein the acquisition sub-module is further configured to obtain an index card number corresponding to the received original card number from a card number record having a corresponding card number that is identical to the received original card number.

9. The apparatus of claim 5 , wherein the acquisition module further comprises a setting sub-module, the setting sub-module configured to set a hash number corresponding to the original card number to be a second value upon the comparison sub-module determining that no card number record having a card number that is identical to the received original card number exists in the database and the determination sub-module setting the received original card number as a new card number.

10. One or more memories storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts for ensuring one-to-one correspondence between an index card number and an original card number, the acts comprising:

receiving the original card number for a request of processing a transaction;

calculating a hash value corresponding to the original card number;

determining whether a card number record having the hash value is stored in a database among a plurality of card number records stored in the database, each card number record comprising a corresponding index card number, a corresponding card number cipher text, and a corresponding hash value; and

upon determining that the card number record having the hash value is stored in the database:

obtaining a card number cipher text from the card number record;

extracting a version of a secret key in the card number cipher text;

obtaining a secret key used for encrypting the card number cipher text by reading a secret key dictionary based on the version of the secret key;

obtaining a stored card number associated with the card number record by decrypting the card number cipher text using the secret key; and

determining whether the stored card number is identical to the original card number;

upon determining that the stored card number is identical to the original card number:

obtaining an index card number corresponding to the original card number based on the hash value corresponding to the original card number; and

sending the index card number to an entity to process the transaction based on the index card number.

11. The one or more memories of claim 10 , wherein, upon determining that the card number record having the hash value is not stored in the database, the acts further comprise:

setting the original card number as a new card number;

setting a hash number corresponding to the original card number to be a first value, allocating an index card number to the original card number;

obtaining a latest secret key and a version of the latest secret key from a secret key dictionary;

encrypting the original card number using the latest secret key, and combining the version of the latest secret key with a front end of a cipher text obtained from the encryption to obtain a cipher text corresponding to the original card number; and

using the allocated index card number, the cipher text corresponding to the original card number, the hash value corresponding to the original card number and the hash number corresponding to the hash value as a card number record corresponding to the original card number, and storing the card number record in the database, wherein the index card number is determined to be successfully allocated to the original card number if no violation of a restriction on the hash value and the hash number exists when storing the card number record corresponding to the original card number in the database.

12. The one or more memories of claim 10 , wherein the acts further comprise:

determining whether the stored card number is identical to the original card number; and

upon determining that the stored card number is identical with the original card number, obtaining an index card number corresponding to the original card number from the card number record.

13. The one or more memories of claim 12 , wherein, upon determining that the stored card number is not identical to the original card number, the acts further comprise:

setting the original card number as a new card number;

setting a hash number corresponding to the stored card number to be a second value;

allocating an index card number to the original card number;

obtaining a latest secret key and a version of the latest secret key from a secret key dictionary;

encrypting the original card number using the latest secret key;

combining the version of the latest secret key with a front end of a cipher text obtained from the encryption to obtain a cipher text corresponding to the original card number;

using the allocated index card number, the cipher text corresponding to the original card number, the hash value corresponding to the original card number and the hash number corresponding to the hash value as a card number record corresponding to the original card number; and

storing the card number record in the database, wherein the index card number is determined to be successfully allocated to the original card number if no violation of a restriction on the hash value and the hash number exists when storing the card number record corresponding to the original card number in the database.

14. The one or more memories of claim 10 , wherein the acts further comprise:

traversing the plurality of card number records stored in the database;

obtaining a card number cipher text from a currently traversed card number record and extracting a secret key version from the card number cipher text;

comparing the secret key version of the card number cipher text with a latest secret key version obtained from the secret key dictionary;

obtaining a secret key corresponding to the secret key version of the card number cipher text from the secret key dictionary and using the obtained secret key to decrypt the card number cipher text to obtain the original card number if the secret key version of the card number cipher text is not the latest secret key version;

obtaining a new secret key corresponding to the latest secret key version from the secret key dictionary, encrypting the original card number using the new secret key, and combining a cipher text obtained from the encryption with the latest secret key version to obtain an updated card number cipher text; and

updating a content in a field of the card number cipher text in the currently traversed card number record as an updated card number cipher text.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2024
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NOVA TECHNOLOGIES (SINGAPORE) HOLDING PTE. LTD.
Reel/Frame 067804/0557 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 10, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 054064/0610 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053650/0816 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 7, 2016
From: YIN, JUN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 037909/0679 →
Priority Claims (1)
CN 201510007411.8 · Jan 7, 2015 · national
Continuity (1)
Related Publication 20160196554A1 · Jul 7, 2016