US9619657B2

Method and apparatus for storing redeem code, and method and apparatus for verifying redeem code

Summary by NHIP

Redeem Code Storage and Verification

The method generates a random value, determines its index based on generation order, and creates a redeem code by mapping a number pair to an obfuscated string. Distinctive steps include calculating the index digit count from an expected generation quantity and setting the random value digit count based on a cracking probability threshold.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

Implementation manners of the present disclosure provide a method and an apparatus for storing a redeem code and a method and an apparatus for verifying a redeem code. The method for storing a redeem code includes: generating a random value, and determining an index of the random value according to an order in which the random value is generated; generating a number pair according to the random value and the index of the random value, mapping the number pair to a string, and generating a redeem code according to the string; and determining a storage location of the random value according to the index of the random value, and saving the random value at the determined storage location.

US9619657B2, drawing sheet 1
Sheet 1 of 5

Term

7 yearsleft in the term

Expires 9 October 2033.

  1. Priority
  2. Filed
  3. Granted
  4. Today
  5. Expires

12 claims: 4 independent, 8 dependent

  1. 1
    Broadest claimClaim Score 49, average(NHIP)A method for storing a redeem code, the method comprising:generating a random value, and determining an index of the random value according to an order in which the random value is generated;generating a number pair according to the random value and the index of the random value, mapping the number pair to a string, and generating a redeem code according to the string;anddetermining a storage location of the random value according to the index of the random value, and saving the random value at the determined storage location;wherein the generating a redeem code according to the string comprises:performing obfuscation processing on the string, to generate the redeem code;andwherein the method further comprises:determining an expected generation quantity of the redeem code, and determining a number of digits of the index according to the expected generation quantity of the redeem code;and determining a probability threshold value of cracking the redeem code, and determining the number of digits of the random value according to the probability threshold value of cracking the redeem code;andthe generating a random value, and determining an index of the random value according to an order in which the random value is generated comprises: generating the random value according to the number of digits of the random value, and determining the index of the random value according to the order in which the random value is generated and the number of digits of the index.
  2. 4
    A method for verifying a redeem code, the method comprising:receiving a redeem code, a method for generating the redeem code comprising:generating a random value, and determining an index of the random value according to an order in which the random value is generated;and generating a number pair according to the random value and the index of the random value, mapping the number pair to a string, and generating the redeem code according to the string;acquiring the string according to the redeem code, reversely mapping the string to the number pair, and determining a storage location according to the index of the random value in the number pair;andfurther determining, when it is determined that a random value stored at the storage location is not redeemed, whether the random value in the number pair is consistent with the random value stored at the storage location, and if yes, determining that verification of the redeem code succeeds;wherein the generating a redeem code according to the string comprises: performing obfuscation processing on the string, to generate the redeem code;andwherein the method further comprises:determining an expected generation quantity of the redeem code, and determining a number of digits of the index according to the expected generation quantity of the redeem code;and determining a probability threshold value of cracking the redeem code, and determining the number of digits of the random value according to the probability threshold value of cracking the redeem code;and the generating a random value, and determining an index of the random value according to an order in which the random value is generated comprises: generating the random value according to the number of digits of the random value, and determining the index of the random value according to the order in which the random value is generated and the number of digits of the index.
  3. 8
    An apparatus for storing a redeem code, the apparatus comprising:memory;one or more processors;andone or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs including:a random value generation unit, a redeem code generation unit, and a redeem code storage unit;the random value generation unit being configured to generate a random value, and determine an index of the random value according to an order in which the random value is generated;the redeem code generation unit being configured to generate a number pair according to the random value and the index of the random value, map the number pair to a string, and generate a redeem code according to the string;andthe redeem code storage unit being configured to determine a storage location of the random value according to the index of the random value, and save the random value at the determined storage location;wherein the generating a redeem code according to the string comprises: performing obfuscation processing on the string, to generate the redeem code;andwherein the apparatus further comprises a digit number determining unit, wherein,the digit number determining unit is configured to determine an expected generation quantity of the redeem code, and determine a number of digits of the index according to the expected generation quantity of the redeem code;and determine a probability threshold value of cracking the redeem code, and determine the number of digits of the random value according to the probability threshold value of cracking the redeem code;andthe random value generation unit is configured to generate the random value according to the number of digits of the random value, and determine the index of the random value according to the order in which the random value is generated and the number of digits of the index.
  4. 10
    An apparatus for verifying a redeem code, comprising memory;one or more processors; andone or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs including:a redeem code receiving unit, a storage location determining unit, and a verification unit;the redeem code receiving unit being configured to receive a redeem code, a method for generating the redeem code comprising:generating a random value, and determining an index of the random value according to an order in which the random value is generated;and generating a number pair according to the random value and the index of the random value, mapping the number pair to a string, and generating the redeem code according to the string;the storage location determining unit being configured to acquire the string according to the redeem code, reversely map the string to the number pair, and determine a storage location according to the index of the random value in the number pair;and the verification unit being configured to further determine, when it is determined that a random value stored at the storage location is not redeemed, whether the random value in the number pair is consistent with the random value stored at the storage location, and if yes, determine that verification of the redeem code succeeds;wherein the generating a redeem code according to the string comprises:performing obfuscation processing on the string, to generate the redeem code;wherein the apparatus further comprises a digit number determining unit, wherein,the digit number determining unit is configured to determine an expected generation quantity of the redeem code, and determine a number of digits of the index according to the expected generation quantity of the redeem code;and determine a probability threshold value of cracking the redeem code, and determine the number of digits of the random value according to the probability threshold value of cracking the redeem code;andthe generating a random value, and determining an index of the random value according to an order in which the random value is generated comprises: generating the random value according to the number of digits of the random value, and determining the index of the random value according to the order in which the random value is generated and the number of digits of the index.