A method for establishing a PAYG-ID payment code for a pay-as-you-go product

By encrypted and combined with the function code in Payg-Id, the product payment product is paid to the Payg-ID, the problem of confusion of the existing coding rules is solved, the product is accurate management and protection, supports offline installment payment, and reduces the cost of equipment.

CN114818607BActive Publication Date: 2025-01-24BOYANG ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210384073.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-01-24
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

The existing payment code PAYG-ID encoding rules for the existing payment code of the ready-to-use product are confused, resulting in the inability to accurately identify the area of ​​the product user, affecting payment management and customer management, and being easily cracked.

Method used

By encrypting and combining the Q-ID function code, Pay-ID function code and Secretkey function code, Payg-ID is generated. The Q-ID function code is used in regional grading management. The Pay-id function code is clear. Users can view product-related information. The Secretkey function code is internal management code.

Benefits of technology

It achieves precise management of products, enhances product protection, facilitates management, has strong anti-tampering capabilities, supports offline installment payment, reduces equipment costs, and meets green environmental protection requirements.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present application discloses a method for establishing a PAYG‑ID payment code for a pay-as-you-go product, wherein the PAYG‑ID includes a Q‑ID function code, a PAY‑ID function code, and a SecretKey function code; the Q‑ID function code is used for internal hierarchical management of different regions where different models of products are sold; the PAY‑ID function code is a product identification code that users can directly view on the product packaging shell or the product UI interface, i.e., a plain code; the SecretKey function code is an internal management password for the product, i.e., a cipher code. The PAYG‑ID established in the present application achieves precise management of products in the background by establishing a connection between product codes and sales areas and encrypting and managing the codes, and the related ID is not easy to crack after encryption, and has the characteristics of convenient management and strong anti-tampering ability. It is applied to the field of offline installment payment, which is conducive to the promotion of offline installment payment methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method for establishing a PAYG-ID payment code for a pay-as-you-go product, and belongs to the technical field of offline installment payment. Background Art

[0002] With the development of digital technology, the sales model and business model of today's market have undergone tremendous changes, from the previous person-to-person delivery of goods and payment to contactless self-service payment. For the sales of some large-scale equipment products, a deposit is usually paid in advance, and the user pays the balance after receiving the product. However, it often happens that some users cannot pay the balance in time after receiving the product, or even deliberately default on the payment, which brings great troubles and economic losses to the manufacturer and seller. Therefore, a sales method of prepayment, namely PAYG, has gradually emerged. By embedding a certain control program in the product, the deposit paid by the user can only support the use of the product for a certain period of time. If the user fails to pay the full amount within the specified time, the right to use the product will be lost, which effectively protects the rights and interests of the manufacturer or seller.

[0003] Products that use the PAYG system must have specific codes to uniquely identify the product and perform corresponding payment and usage management. However, the existing PAYG-ID payment codes are unclear and confusing due to unclear coding rules. They often fail to accurately identify the region where the product users are located, which is not conducive to payment management and customer management, and is easy to be cracked. Summary of the invention

[0004] According to the present application, a method for establishing a pay-as-you-go product payment code PAYG-ID is provided. In the method, the pay-as-you-go product payment code PAYG-ID includes a Q-ID function code, a PAY-ID function code and a SecretKey function code. By encrypting and combining different function codes, product protection is enhanced while facilitating product management.

[0005] The method for establishing the pay-as-you-go product payment code PAYG-ID is characterized in that the PAYG-ID includes a Q-ID function code, a PAY-ID function code and a SecretKey function code;

[0006] The Q-ID function code is used for internal hierarchical management of different regions where different models of products are sold;

[0007] The PAY-ID function code is a product identification code that a user can directly view on the product packaging shell or the product UI interface, i.e., a plain code; a user can query product-related information through the plain code;

[0008] The SecretKey function code is the internal management password of the product, i.e. the secret code;

[0009] The method for establishing the PAYG-ID payment code of the pay-as-you-go product comprises at least the following steps:

[0010] Step 1: Generate the Q-ID function code of the product according to the device type, the location code of the user's location and the product code;

[0011] Step 2: Encrypt the Q-ID function code using an encryption strategy to generate a PAY-ID function code;

[0012] Step 3: Combine the Q-ID function code and the PAY-ID function code to generate a Secret Key function code.

[0013] Optionally, in step 1, the device type code uses its corresponding capital letter abbreviation;

[0014] The location code of the user's location is selected as the country code of the user's location.

[0015] Specifically, in the specific implementation process, the positioning code of the user's location can directly adopt the international standard country code, or can adopt a self-defined country code.

[0016] Optionally, in step 2, the Q-ID function code is encrypted using an encryption strategy, which at least includes:

[0017] 2.1 Extract the location code and product code of the user's location from the Q-ID function code to form an initial code;

[0018] 2.2 The initial code is superimposed on the current Gregorian calendar date to form a final code.

[0019] Optionally, the step 2 further includes step 2.3:

[0020] 2.3 Add a code serial number and / or a serial number supplement code to the end of the final code.

[0021] Usually, the digital representation of the Gregorian calendar date is YYYYMMDD, and there may be a YYMMDD representation. For example, September 29, 2021 will be represented as 20210929 or 210929. Those skilled in the art can select different forms of Gregorian calendar date representation according to coding requirements. Specifically, the YYMMDD representation used in the embodiment of the present application.

[0022] The product code may be selected from numbers in a specific arrangement according to the needs of those skilled in the art, or may directly use a multi-digit number. Specifically, during the implementation of this application, the product code uses 0001 to 9999.

[0023] Optionally, the serial number encoding criteria are:

[0024] Determine whether the current final code is updated;

[0025] If the current final code has not been updated, the serial number is added to the previous serial number;

[0026] If the current final code has been updated, the serial number will start counting again;

[0027] Preferably, the serial number is a decimal number with a length of 3.

[0028] The serial number can be selected from numbers in a specific arrangement according to the needs of those skilled in the art, or can be directly a multi-digit number. Specifically, in the implementation of this application, the serial number uses 001 to 999.

[0029] Optionally, the criteria for the serial number supplementary code are:

[0030] Extract the value of the last digit of the final code;

[0031] Determine the polling complement code interval according to the value of the last digit in accordance with the polling rule, and select the serial number supplement code within the polling complement code interval;

[0032] Preferably, the serial number supplementary code is a decimal number with a length of 2.

[0033] The serial number can be selected from numbers in a specific arrangement according to the needs of those skilled in the art, or can be directly a multi-digit number. Specifically, in the implementation of this application, the serial number uses 01 to 99.

[0034] Optionally, the polling complementary code interval and polling rule include:

[0035] The polling rule of the first polling complement code interval is: the sum of the digits in the serial number complement code is 9, and the first polling complement code interval is composed of the serial number complement codes whose sum of the digits is 9 arranged in order of size;

[0036] The polling rule of the second polling complement code interval is: the sum of the digits in the serial number complement code is 8, and the second polling complement code interval is composed of the serial number complement codes whose sum of the digits is 8 arranged in order of size;

[0037] The polling rule of the third polling complement code interval is: the sum of the digits in the serial number complement code is 7, and the third polling complement code interval is composed of the serial number complement codes whose sum of the digits is 7 arranged in order of size;

[0038] The polling rule of the fourth polling complement code interval is: the sum of the digits in the serial number complement code is 6, and the fourth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 6 arranged in order of size;

[0039] The polling rule of the fifth polling complement code interval is: the sum of the digits in the serial number complement code is 5, and the fifth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 5 arranged in order of size;

[0040] The polling rule of the sixth polling complement code interval is: the sum of the digits in the serial number complement code is 4, and the sixth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 4 arranged in order of size;

[0041] The polling rule of the seventh polling complement code interval is: the sum of the digits in the serial number complement code is 3, and the seventh polling complement code interval is composed of the serial number complement codes whose sum of the digits is 3 arranged in order of size;

[0042] The polling rule of the 8th polling complement code interval is: the sum of the digits in the serial number complement code is 2, and the 8th polling complement code interval is composed of the serial number complement codes whose sum of the digits is 2 arranged in order of size;

[0043] The polling rule of the 9th polling complement code interval is: the superposition count of each digit in the serial number complement code is 1, and the 9th polling complement code interval is composed of the serial number complement codes in which the superposition count of each digit is 1, arranged in size.

[0044] Optionally, the serial number supplementary code is selected in sequence according to the arrangement order of the serial number supplementary codes in the polling supplementary code interval;

[0045] If the Nth polling complement code interval is located according to the polling rule, and the number of serial number complement codes in this interval is less than the required number of serial number complement codes, then enter the N+1th polling complement code interval to select serial number complement codes in turn until all serial number complement codes are added.

[0046] Optionally, the serial number supplementary codes constituting the polling complement code interval do not include serial number supplementary codes formed by overlapping digits.

[0047] Optionally, step 3 includes:

[0048] 3.1 Generate a first combination code and a second combination code based on the Q-ID function code, and generate a third combination code and a fourth combination code based on the PAY-ID function code;

[0049] The generation of the first combination code includes:

[0050] Select a number of English letters, convert the English letters into ASCII codes, and obtain the number A1;

[0051] A number of consecutive digits of the Q-ID function code are extracted to obtain the number A2; preferably, the first three digits of the Q-ID function code are extracted, specifically, the country code is selected.

[0052] Connect the number A1 and the number A2 to obtain a first combination code;

[0053] The second combination code is composed of several consecutive digits in the Q-ID function code except the digit A2; preferably, the last four digits in the Q-ID function code are extracted, specifically, the product code is selected.

[0054] The generation of the third combination code includes:

[0055] Extract several consecutive digits of the PAY-ID function code to obtain the number P1;

[0056] Select a number of English letters and / or symbols, convert the English letters and / or symbols into ASCII codes, and obtain a number P2;

[0057] Connect the number P1 and the number P2 to obtain a third combination code;

[0058] The fourth combination code is composed of a number of consecutive digits in the PAY-ID function code except the digit P1;

[0059] 3.2 Connect the first combination code, the second combination code, the third combination code and the fourth combination code through the ASCII code of the connector “ / ” to obtain a combined character string;

[0060] 3.3 Convert the combined string into a hexadecimal string to obtain the Secret Key function code.

[0061] For the ordering of the combination codes in the combination string, those skilled in the art may select different ordering methods according to their needs. In order to facilitate the coding distinction and encryption, preferably, the arrangement of the first combination code, the third combination code, the second combination code, and the fourth combination code is adopted. At the same time, in order to facilitate the management and tracking of the product, the second combination code adopts a 4-digit number, and the fourth combination code adopts a 5-digit number. Further preferably, the second combination code adopts the product code, and the fourth combination code adopts the serial number in the PAY-ID function code + the serial number supplement code.

[0062] Optionally, converting the combined string into a hexadecimal string includes:

[0063] 3.3.1 Decompose the combined character string into several segments, convert each segment into a binary value, and obtain a combined binary array;

[0064] The length of the decomposed characters can be selected by those skilled in the art according to different requirements and processing methods. In the embodiment of the present application, for the same combination code, every 4 digits are decomposed into a group, and if there are less than 4 digits left, they are grouped separately; the ASCII code of the connector " / " is grouped separately.

[0065] However, if the combination code adjacent to the ASCII code of the connector " / " is a product code, a serial number or a serial number supplement code, the ASCII code of the connector " / " is split, wherein at least one digit is combined with the adjacent combination code to form a decomposed character, and the decomposed character is converted into a binary value; then the binary value obtained by converting the decomposed character is bitwise inverted to obtain an inverted binary value; and the inverted binary value is placed after the binary value obtained by converting the decomposed character;

[0066] The present application inverts the decomposed characters and inserts them into a combined binary array, which can effectively encrypt product codes and serial numbers.

[0067] 3.3.2 inserting a number of bit-filling check binary numbers into the combined binary array to obtain a final binary array;

[0068] 3.3.3 Convert the final binary array into a hexadecimal array;

[0069] Preferably, the step 3.3.2 comprises:

[0070] Define binary values ​​B1=101, B2=010, B3=110;

[0071] Insert B1 after the binary value obtained by converting the first segment of decomposed characters;

[0072] Insert B2 and B3 respectively before the inverted binary value;

[0073] Preferably, step 3.3 also includes step 3.3.4:

[0074] 3.3.4 The hexadecimal array is converted using a hash formula to obtain a 32-bit hexadecimal array, namely the Secret Key function code.

[0075] The present application adds several bit-padded check binary numbers. On the one hand, a binary array with a length of 168 is formed by bit-padded to facilitate subsequent further encryption; on the other hand, it is convenient to check the second combination code and the fourth combination code.

[0076] The beneficial effects of this application include: 1) The pay-as-you-go product payment code PAYG-ID established by this application establishes a connection between product codes and sales areas, and encrypts and manages the codes, thereby achieving accurate management of products in the background, and the relevant ID is not easy to crack after encryption, and has the characteristics of convenient management and strong anti-tampering ability. It is applied to the field of offline installment payment, which is conducive to the promotion of offline installment payment methods;

[0077] 2) The pay-as-you-go product payment code PAYG-ID established in this application enables the product to support offline installment payment solutions, solves the sales problem of products (especially photovoltaic products) in low-income areas, and greatly improves the acceptability of the product audience;

[0078] 3) Using the pay-as-you-go product payment code PAYG-ID established in this application for installment payment transactions saves equipment costs (such as making special cards) compared to card-based installment payments, thereby reducing costs across the entire product industry chain and is more in line with the green and environmental protection requirements of today's society; and transactions using the pay-as-you-go product payment code PAYG-ID are more intelligent and convenient. DETAILED DESCRIPTION

[0079] The present application is described in detail below with reference to embodiments, but the present application is not limited to these embodiments.

[0080] Example

[0081] The PAYG-ID payment code for pay-as-you-go products in this application contains three functional blocks:

[0082] Q-ID function code: used for internal hierarchical management of different regions where different models of products are sold;

[0083] PAY-ID function code: a plain code printed on a carrier and attached to the device housing, or displayed on the device's UI display screen, which can be viewed by the user. After obtaining the product, the user can query product-related information based on the plain code, such as sending the plain code to the backend, which will provide the user with the available time of the product under the current bill, or the device usage time unlock code, etc.;

[0084] SecretKey function code (internal code, used for internal management).

[0085] The method for establishing the PAYG-ID payment code of the pay-as-you-go product comprises the following steps:

[0086] Step 1: Generate Q-ID function code

[0087] The Q-ID function code includes the device type, the product user's local location positioning code and the product code; the three are arranged in the order of installation to form the Q-ID function code.

[0088] Take an energy storage product as an example, the equipment type code is DT; its user is Burkina Faso in Africa, and the applicant classifies and sorts the countries and regions and obtains the country code 319; the product code is numbered from 0001 to 9999, so the Q-ID function code of the first product sold to the region is DT3190001.

[0089] Step 2: Generate PAY-ID function code

[0090] The PAY-ID function code is formed based on the Q-ID function code and is a set of serial number codes that implement a specific user and specific product model.

[0091] 2.1 Extract the location code and product code of the user's location from the Q-ID function code to form an initial code;

[0092] Specifically, if the Q-ID function code of the first product is DT3190001, the initial code is 3190001;

[0093] 2.2 The initial code is superimposed on the current Gregorian calendar date to form a final code;

[0094] Assuming that the current Gregorian calendar date is September 29, 2021, 210929 is extracted; the final code formed is 3400930.

[0095] 2.3 Add a code serial number and a serial number supplement code to the end of the final code.

[0096] 2.3.1 Add serial number

[0097] The serial number is a decimal number with a length of 3 (maximum number 999)

[0098] When the serial number is encoded, first determine whether the current final code is updated;

[0099] If the current final code has not been updated, the serial number is added to the previous serial number; for example, the first product serial number with the same final code is 001, the second product serial number is 00, and so on until 999.

[0100] If the current final code has been updated, the serial number will start counting again.

[0101] 2.3.2 Add serial number supplement number

[0102] The serial number supplementary code is a decimal number with a length of 2.

[0103] The criteria for the serial number supplement code are:

[0104] Extract the value of the last digit of the final code;

[0105] Determine the polling complement code interval according to the value of the last digit in accordance with the polling rule, and select the serial number supplement code within the polling complement code interval;

[0106] The polling complement code interval and polling rules include:

[0107] The polling rule of the first polling complement code interval is: if the sum of the two digits in the serial number complement code is 9, the length of the first polling complement code interval is 10, and the serial number complement codes in the interval are 09, 18, 27, 36, 45, 54, 63, 72, 81, 90;

[0108] The polling rule of the second polling complement code interval is: the superposition count of the two digits in the serial number complement code is 8, the length of the second polling complement code interval is 8, and the serial number complement codes in the interval are 08, 17, 26, 35, 53, 62, 71, 80;

[0109] The polling rule of the third polling complement code interval is: the superposition count of the two digits in the serial number complement code is 7, the length of the third polling complement code interval is 8, and the serial number complement codes in the interval are 07, 16, 25, 34, 43, 52, 61, 70;

[0110] The polling rule of the fourth polling complement code interval is: the superposition count of the two digits in the serial number complement code is 6, the length of the fourth polling complement code interval is 6, and the serial number complement codes in the interval are 06, 15, 24, 42, 51, 60;

[0111] The polling rule of the fifth polling complement code interval is: the superposition count of the two digits in the serial number complement code is 5, the length of the fifth polling complement code interval is 6, and the serial number complement codes in the interval are 05, 14, 23, 32, 41, 50;

[0112] The polling rule of the sixth polling complement code interval is: the superposition count of the two digits in the serial number complement code is 4, the length of the sixth polling complement code interval is 4, and the serial number complement codes in the interval are 04, 13, 31, 40;

[0113] The polling rule of the seventh polling complement code interval is: the superposition count of the two digits in the serial number complement code is 3, the length of the seventh polling complement code interval is 4, and the serial number complement codes in the interval are 03, 12, 21, 30;

[0114] The polling rule of the 8th polling complement code interval is: the superposition count of the two digits in the serial number complement code is 2, the length of the 8th polling complement code interval is 2, and the serial number complement codes in the interval are 02 and 20;

[0115] The polling rule of the 9th polling complement code interval is: the superposition count of the two digits in the serial number complement code is 1, the length of the 9th polling complement code interval is 2, and the serial number complement codes in the interval are 01 and 10.

[0116] The serial number supplementary code is selected in sequence according to the arrangement order of the serial number supplementary codes in the polling supplementary code interval;

[0117] If the Nth polling complement code interval is located according to the polling rule, and the number of serial number complement codes in this interval is less than the required number of serial number complement codes, then enter the N+1th polling complement code interval to select serial number complement codes in turn until all serial number complement codes are added.

[0118] For example: the value of the last digit of the final encoding is 9, and the first polling interval is located. There are a total of 52 serial numbers that need to be complemented, then 001 complements 09, 002 complements 18, 003 complements 27, …, 043 complements 03, 044 complements 12, 045 complements 21, 046 complements 30, 047 complements 02, …, 049 complements 01, 050 complements 10, (another round of loop starts over) 051 complements 09, 052 complements 18.

[0119] For the first product mentioned above, its serial number is 001, the serial number supplement code is 09, and its complete PAY-ID function code is 340093000109.

[0120] Step 3: Generate SecretKey function code

[0121] The SecretKey function code is used to implement the secret code compilation of the device. It is formed by combining the plaintext PAY-ID function code and the product's Q-ID function code.

[0122] 3.1 Formation of various combination factors

[0123] For Q-ID function code:

[0124] 1) Extract the first 3 digits of the Q-ID function code (i.e., the country code) and record it as Region, for example, 319;

[0125] 2) Use the English abbreviation of the region, RG, converted into ASCII code 8271;

[0126] 3) Connect the character string RG&Region to obtain the first combination code 8271319;

[0127] 4) Extract the last 4 digits of the Q-ID function code (ie, the product code), 0001, as the second combination code.

[0128] For PAY-ID function code:

[0129] Since the PAY-ID function code incorporates time, the extracted numbers and the English letters and symbols used are related to time.

[0130] 1) Extract the first 7 digits of the PAY-ID function code, i.e. 3400930, and record it as ID-TIME;

[0131] 2) Use the abbreviation ID-T of ID-TIME and convert it into ASCII code, where I is 73, D is 68, - is 45, T is 84, and the final ASCII code is 73684584;

[0132] 3) Connect the character strings ID-T & ID-TIME to obtain the third combination code 736845843400930;

[0133] 4) Extract the last 5 digits of the PAY-ID function code (ie, serial number + serial number supplement code), 00109, as the fourth combination code.

[0134] Select " / " as the combination symbol, which is converted into ASCII code 47.

[0135] 3.2 Combining to form a composite string

[0136] The combination logic is: first combination code & / & third combination code & / & second combination code & / & fourth combination code, that is, "string ID-T & ID-TIME connection & / & string RG & Region connection & / & product code & / & serial number and serial number supplement code", and the combined string 7368458434009304782713194700014700109 is obtained.

[0137] 3.3 Decompose the combined string into several segments of characters, convert them into binary values, and encrypt the special positions after decomposition to obtain a combined binary array

[0138] C1=MID(combination logic, 1(starting bit), 4(bit length)), converted to a fixed binary value; (for example: =7368, converted to a fixed binary number length: 1110011001000);

[0139] C2=MID(combination logic, 5 (starting bit), 4 (bit length), converted to a fixed binary value); (e.g.: =4584, converted to a fixed binary number length: 1000111101000);

[0140] C3=MID(combination logic, 9 (starting bit), 4 (bit length), converted to a fixed binary value); (e.g.: =3400, converted to a fixed binary number length: 0110101001000);

[0141] C4=MID(combination logic, 13(starting bit), 3(bit length), converted to a fixed binary value); (e.g.: =930, converted to a fixed binary length: 1110100010);

[0142] C5=MID(combination logic, 16 (starting bit), 2 (bit length), converted to a fixed binary value); (e.g.: =47, converted to a fixed binary length: 101111);

[0143] C6=MID(combination logic, 18 (starting bit), 4 (bit length), converted to a fixed binary value); (e.g.: =8271, converted to a fixed binary number length: 10000001001111);

[0144] C7=MID(combination logic, 22(starting bit), 4(bit length), converted to a fixed binary value); (e.g.: =319, converted to a fixed binary number length: 0100111111);

[0145] C8=MID(combination logic, 25(starting bit), 1(bit length), converted to a fixed binary value); (e.g.: =4, converted to a fixed binary length: 100);

[0146] C9=MID(combination logic, 26 (starting bit), 4 (bit length), converted to a fixed binary value); (for example: =700, converted to a fixed binary number length: 1010111100);

[0147] C10=C9 binary number bitwise inversion; (for example: 0101000011);

[0148] C11=MID(combination logic, 29 (starting bit), 4 (bit length), converted to a fixed binary value); (e.g.: =014, converted to a fixed binary number length: 0000001110);

[0149] C12=C11 binary number bitwise inversion; (for example: 1111110001);

[0150] C13 = MID (combination logic, 32 (starting bit), 4 (bit length), converted to a fixed binary value); (for example: = 7, converted to a fixed binary number length: 111);

[0151] C14=MID(combination logic, 33 (starting bit), 4 (bit length), converted to a fixed binary value); (for example: =001, converted to a fixed binary number length: 0000000001);

[0152] C15=C14 binary number bitwise inversion; (for example: 1111111110);

[0153] C16=MID(combination logic, 36 (starting bit), 4 (bit length), converted to a fixed binary value); (e.g.: =09, converted to a fixed binary number length: 0001001);

[0154] The binary number of C17=C16 is inverted bit by bit; (for example: 1110110).

[0155] 3.4 Adding a complement check binary number to the combined binary array

[0156] The complement check binary numbers are B1, B2, and B3, where B1=101, B2=010, and B3=110. The added logic is: C1&B1&C2&C3&C4&C5&C6&C7&C8&C9&C10&B3&C11&C12&C13&C14&C15&C16&B2&C17, and the final output length is 168 bits of binary array: 111001100100010110001111010000110101001000111010001010111110 00000100111101001111110100101011110001010100001111000000011101111110 0011110000000011111111110000010010101110110

[0158] 3.5 Convert the 168-bit binary array into a 42-bit hexadecimal array, and the result is: E6458F43523A2BE04F4FE578A1E03BF1E00FFC2576.

[0159] 3.6 The hexadecimal array is transformed using a hash formula to obtain a 32-bit fixed-length hexadecimal array, and the result is BAE0F275A2D28183724340DD0D0639B8, which is the Secret Key function code.

[0160] The above are only a few embodiments of the present application and do not constitute any form of limitation to the present application. Although the present application is disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technician familiar with the profession, without departing from the scope of the technical solution of the present application, using the technical content disclosed above to make slight changes or modifications are equivalent to equivalent implementation cases and fall within the scope of the technical solution.

Claims

1. A method for establishing a PAYG-ID payment code for a pay-as-you-go product, characterized in that: The pay-as-you-go product payment code PAYG-ID includes a Q-ID function code, a PAY-ID function code and a SecretKey function code; The Q-ID function code is used for internal hierarchical management of different regions where different models of products are sold; The PAY-ID function code is a product identification code that a user can directly view on the product packaging shell or the product UI interface, i.e., a plain code; a user can query product-related information through the plain code; The SecretKey function code is the internal management password of the product, i.e. the secret code; The method for establishing the PAYG-ID payment code of the pay-as-you-go product comprises at least the following steps: Step 1: Generate the Q-ID function code of the product according to the device type, the location code of the user's location and the product code; Step 2: Encrypt the Q-ID function code using an encryption strategy to generate a PAY-ID function code; Step 3: Combine the Q-ID function code and the PAY-ID function code to generate a Secret Key function code.

2. The method according to claim 1, characterized in that In step 1, the device type is coded using its corresponding capital letter abbreviation; The location code of the user's location is selected as the country code of the user's location.

3. The method according to claim 1, characterized in that In step 2, the Q-ID function code is encrypted using an encryption strategy, which at least includes: 2.1 Extract the location code and product code of the user's location from the Q-ID function code to form an initial code; 2.2 The initial code is superimposed on the current Gregorian calendar date to form a final code.

4. The method according to claim 3, characterized in that The step 2 also includes step 2.3: 2.3 Add a code serial number and / or a serial number supplement code to the end of the final code.

5. The method according to claim 4, characterized in that The criteria for the serial number coding are: Determine whether the current final code is updated; If the current final code has not been updated, the serial number is added to the previous serial number; If the current final code has been updated, the serial number will start counting again.

6. The method according to claim 4, characterized in that The serial number is a decimal number with a length of 3.

7. The method according to claim 4, characterized in that The criteria for the serial number supplement code are: Extract the value of the last digit of the final code; The polling complement code interval is determined according to the value of the last digit in accordance with the polling rule, and the serial number supplement code is selected within the polling complement code interval.

8. The method according to claim 4, characterized in that The serial number supplementary code is a decimal number with a length of 2.

9. The method according to claim 7, characterized in that: The polling complement code interval and polling rules include: The polling rule of the first polling complement code interval is: the sum of the digits in the serial number complement code is 9, and the first polling complement code interval is composed of the serial number complement codes whose sum of the digits is 9 arranged in order of size; The polling rule of the second polling complement code interval is: the sum of the digits in the serial number complement code is 8, and the second polling complement code interval is composed of the serial number complement codes whose sum of the digits is 8 arranged in order of size; The polling rule of the third polling complement code interval is: the sum of the digits in the serial number complement code is 7, and the third polling complement code interval is composed of the serial number complement codes whose sum of the digits is 7 arranged in order of size; The polling rule of the fourth polling complement code interval is: the sum of the digits in the serial number complement code is 6, and the fourth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 6 arranged in order of size; The polling rule of the fifth polling complement code interval is: the sum of the digits in the serial number complement code is 5, and the fifth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 5 arranged in order of size; The polling rule of the sixth polling complement code interval is: the sum of the digits in the serial number complement code is 4, and the sixth polling complement code interval is composed of the serial number complement codes whose sum of the digits is 4 arranged in order of size; The polling rule of the seventh polling complement code interval is: the sum of the digits in the serial number complement code is 3, and the seventh polling complement code interval is composed of the serial number complement codes whose sum of the digits is 3 arranged in order of size; The polling rule of the 8th polling complement code interval is: the sum of the digits in the serial number complement code is 2, and the 8th polling complement code interval is composed of the serial number complement codes whose sum of the digits is 2 arranged in order of size; The polling rule of the 9th polling complement code interval is: the superposition count of each digit in the serial number complement code is 1, and the 9th polling complement code interval is composed of the serial number complement codes in which the superposition count of each digit is 1, arranged in size.

10. The method according to claim 9, characterized in that The serial number supplementary code is selected in sequence according to the arrangement order of the serial number supplementary codes in the polling supplementary code interval; If the Nth polling complement code interval is located according to the polling rule, and the number of serial number complement codes in this interval is less than the required number of serial number complement codes, then enter the N+1th polling complement code interval to select serial number complement codes in turn until all serial number complement codes are added.

11. The method according to claim 10, characterized in that The step 3 comprises: 3.1 Generate a first combination code and a second combination code based on the Q-ID function code, and generate a third combination code and a fourth combination code based on the PAY-ID function code; The generation of the first combination code includes: Select a number of English letters, convert the English letters into ASCII codes, and obtain the number A1; Extract several consecutive digits of the Q-ID function code to obtain the number A2; Connect the number A1 and the number A2 to obtain a first combination code; The second combination code is composed of a number of consecutive digits in the Q-ID function code except the digit A2; The generation of the third combination code includes: Extract several consecutive digits of the PAY-ID function code to obtain the number P1; Select a number of English letters and / or symbols, convert the English letters and / or symbols into ASCII codes, and obtain a number P2; Connect the number P1 and the number P2 to obtain a third combination code; The fourth combination code is composed of a number of consecutive digits in the PAY-ID function code except the digit P1; 3.2 Connect the first combination code, the second combination code, the third combination code and the fourth combination code through the ASCII code of the connector " / " to obtain a combined character string; 3.3 Convert the combined string into a hexadecimal string to obtain the Secret Key function code.

12. The method according to claim 11, characterized in that Convert the combined string into a hexadecimal string, including: 3.3.1 Decompose the combined character string into several segments, convert each segment into a binary value, and obtain a combined binary array; If the combination code adjacent to the ASCII code of the connector " / " is a product code, a serial number or a serial number supplement code, the ASCII code of the connector " / " is split, and at least one number obtained by the split is combined with the adjacent combination code to form a decomposed character, and the decomposed character is converted into a binary value; then the binary value obtained by converting the decomposed character is bitwise inverted to obtain an inverted binary value; and the inverted binary value is placed after the binary value obtained by converting the decomposed character; 3.3.2 inserting a number of bit-filling check binary numbers into the combined binary array to obtain a final binary array; 3.3.3 Convert the final binary array into a hexadecimal array.

13. The method according to claim 12, characterized in that The step 3.3.2 includes: Define binary values ​​B1=101, B2=010, B3=110; Insert B1 after the binary value obtained by converting the first segment of decomposed characters; B2 and B3 are respectively inserted before the inverted binary value.

14. The method according to claim 12, characterized in that Step 3.3 also includes step 3.3.4: 3.3.4 The hexadecimal array is converted using a hash formula to obtain a 32-bit hexadecimal array, namely the SecretKey function code.

Citation Information

Patent Citations

  • Electric meter prepayment system based on two-dimensional code payment

    CN109658619A

  • Systems and methods for secure transaction management and electronic rights protection

    CN1601429A