A method for generating PAYG-Token

By combining the pay-as-you-can-use system ID and user needs to generate PAYG-Tokens, the problem of difficult and duplicate password management in the existing technology is solved, and passwords that meet user needs are generated in real time are simplified, and management processes are prevented and malicious cracking is prevented.

CN114817902BActive Publication Date: 2025-07-08BOYANG ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210384050.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-07-08
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

In the existing PAYG system, password management is difficult, and there are problems of password duplication and management chaos, and user needs to be unable to generate pay-as-you-can-use passwords that meet usage requirements in real time.

Method used

By combining the product's pay-as-you-can-use system ID and user needs, PAYG-Token is generated, and characteristic numerical encryption is used to generate a password that meets user needs.

Benefits of technology

It realizes the real-time generation of passwords that meet usage requirements based on user needs, simplifies the management process of the manager and avoids duplication of passwords and malicious cracking.

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

Abstract

The present application discloses a method for generating PAYG-Token, which includes the following steps: setting various passwords involved in the pay-as-you-go system; extracting the pay-as-you-go system ID of the product and verifying whether the pay-as-you-go system ID is the corresponding ID of the product; if the verification passes, extracting the characteristic value in the pay-as-you-go system ID, generating a code according to the password input by the user and the preset password of the product, and performing encryption processing on the characteristic value to obtain PAYG-Token. The method for generating PAYG-Token in the present application, by combining the product code and the user's needs, can generate the pay-as-you-go password that meets the user's product usage requirements in real time according to the user's needs, facilitating the user's use of the product; at the same time, it is convenient for the management party to manage the PAYG-Token of the product, avoiding the chaos in the management of PAYG-Token and also avoiding the malicious cracking and use of the product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method for generating PAYG-Token, belonging to the technical field of offline installment payment. Background Art

[0002] With the development of digital technology, the sales models and business models in today's market have undergone great changes. It has gradually evolved from the previous face-to-face delivery of goods and payment between people to contactless self-service payment. For the sales of some large equipment products, it is usually common to pay a deposit in advance, and the user pays the balance after receiving the product. However, there are often cases where some users cannot pay the balance in a timely manner after receiving the product, or even deliberately default, which brings great troubles and economic losses to the manufacturer and the seller. Therefore, the sales method of PAYG (Pay As You Go) 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 payment within the specified time, the right to use will be lost, effectively protecting the rights and interests of the manufacturer or the seller.

[0003] During the product usage process, the user needs to request the PAYG system to generate a specific password (Token) according to the requirements in order to activate the product for continued use. Most of the existing passwords are randomly given manually by the product management party, which requires continuous recording of new passwords in the background and there are cases of duplicate passwords, increasing the management difficulty. Summary of the Invention

[0004] According to the present application, a method for generating PAYG-Token is provided. This method combines the pay-as-you-go system ID of the product and the user demand instruction to generate PAYG-Token, facilitating the management of passwords by the management party.

[0005] The method for generating PAYG-Token is characterized in that the method at least includes the following steps:

[0006] Set various passwords involved in the pay-as-you-go system;

[0007] Extract the pay-as-you-go system ID of the product and verify whether the pay-as-you-go system ID is the corresponding ID of the product;

[0008] If the verification passes, extract the characteristic value in the pay-as-you-go system ID, generate a code according to the password input by the user and the preset password of the product, and encrypt the characteristic value to obtain the PAYG-Token.

[0009] Regarding the selection of the characteristic value in the pay-as-you-go system ID, the present application has no specific requirements, and those skilled in the art can select it according to the ID corresponding to the product they design.

[0010] The user input password contains user requirements, such as increasing the usage time of the product or unlocking the permanent use of the product. Those skilled in the art can design the input content corresponding to different passwords according to their requirements or design requirements. For example, the factory reset password Factort_Reset Token is 000; the credit increase password Add Credit Token is 001; the credit setting password Set Credit Token is 010; the unlock password UnLock is 011, etc.

[0011] Optionally, the types of passwords input by the user include a credit increase password, a credit setting password, an unlock password, and a factory reset password;

[0012] The credit increase password is used to increase the usage time included in the credit increase password based on the current product time;

[0013] The credit setting password is used to replace the current product time with the usage time included in the credit setting password;

[0014] The unlock password is used to unlock the product and no longer limit the user's usage time;

[0015] The factory reset password is used to format the used PAYG-Token records stored internally in the product.

[0016] Optionally, the password generation code preset for the product refers to the number of times of establishing PAYG-Token for the current request;

[0017] When the number of times of establishing PAYG-Token for the current request of the product exceeds the preset threshold, no more PAYG-Token will be generated;

[0018] The preset threshold refers to the total number of times the product can generate PAYG-Token.

[0019] Optionally, the encryption process includes:

[0020] Convert the characteristic value into a binary string of a specific length, denoted as string A;

[0021] Convert the password input by the user into a binary string, denoted as string B;

[0022] Generate a corresponding time code according to the type of the password input by the user, and convert the time code into a binary string of a specific length, denoted as string C;

[0023] Convert the password generation code into a binary string of a specific length, denoted as string D;

[0024] After logically integrating the string A, the string B, the string C, and the string D, convert them to decimal, and the PAYG-Token is obtained.

[0025] Optionally, the logical integration process includes:

[0026] Cut the string A into character segments of equal length, and each character segment is denoted as string a i , where i = i + 1;

[0027] Cut the string C into character segments of different lengths, and each character segment is denoted as string c i , where i = i + 1;

[0028] Cut the string D into character segments of different lengths, and each character segment is denoted as string d i , where i = i + 1;

[0029] Cross-integrate each of the strings a i , the string c i , the string d i , and the string B according to a set logic to form a logical string containing all characters.

[0030] Optionally, the length of the string A is 24 bits;

[0031] The length of the string C is 13 bits;

[0032] The length of the string D is 11 bits.

[0033] Optionally, in the cross-integration process, the initial string is string a i , and adjacent strings a i are separated by any one of the string c i , the string d i , and the string B, and the last string is string a i .

[0034] For example, suppose the length of the string A is 24 bits; the length of the string C is 13 bits; the length of the string D is 11 bits. Then the string A can be cut into 6 equal-length segments, namely a1, a2, a3, a4, a5, a6; the string C can be cut into a string c1 of length 6 and a string c2 of length 7; the string D can be cut into a string d1 of length 6 and a string d2 of length 5; then the integration logic can be:

[0035] a1&d1&a2&c1&a3&d2&a4&c2&a5&B&a6.

[0036] Optionally, the method further includes: before performing decimal conversion, performing padding verification on the logical string.

[0037] Optionally, the padding verification method is:

[0038] Count the number of 1s in the logical string and take the remainder of the set value. If the remainder value ≤ 1, assign it as 1; if the remainder value > 1, use the remainder value as the assignment.

[0039] Convert the assignment to binary to obtain a padding string.

[0040] Pad the padding string to the beginning or end of the logical string.

[0041] Specifically, the set value can be selected as a multiple of 2. Preferably, 4 is used.

[0042] Specifically, assume the number of 1s is m, the set value is q, and the padding assignment is x. Then when m:q ≤ 1, x = 1; when m:q > 1, x = x.

[0043] Optionally, if the first character of the logical string is 0, pad the padding string to the beginning of the logical string.

[0044] By adding several padding strings, on the one hand, padding facilitates subsequent further encryption; on the other hand, it is convenient to verify the logical string.

[0045] The beneficial effects that this application can produce include:

[0046] 1) The method for generating PAYG-Token in this application, by combining the product code and user requirements, can generate a pay-as-you-go password that meets the user's product usage requirements in real time according to the user's needs, facilitating the user's use of the product.

[0047] 2) Using the method of this application to generate PAYG-Token facilitates the management of PAYG-Token for the management party, avoids the chaos of PAYG-Token management, and also avoids the malicious cracking and use of the product. Specific Embodiments

[0048] The following describes this application in detail with reference to embodiments, but this application is not limited to these embodiments.

[0049] Embodiment

[0050] I. Set product-related variables

[0051] Set various passwords involved in the pay-as-you-go system:

[0052] 1. Credit increase password Add Credit Token: Increase the remaining usage time of the user. For example, if there are 10 hours left, enter Add Credit Token to include 30 hours, then the total remaining usage time of the system is 40 hours.

[0053] Function definition:

[0054] ①In UnLock mode, enter Add Credit Token, and the system does not respond;

[0055] ②In other modes, use normally;

[0056] ③ Each time the device adds a Credit Token, it cannot be reused

[0057] For example, set the credit increase password Add Credit Token to 001.

[0058] 2. Set Credit Token: Set the remaining usage time of the user. For example, if there are 10 hours left, enter Set Credit Token to include 30 hours, then the total remaining usage time of the system is 30 hours.

[0059] Function definition:

[0060] ①In UnLock mode, enter the Set Credit Token command code and the system can exit UnLock mode;

[0061] ②In other modes, use normally;

[0062] ③ The device cannot reuse the Set Credit Token each time;

[0063] ④ Each time you enter the Set Credit Token command code, all PAYG-Tokens generated before entering the command will become invalid.

[0064] For example, set the credit setting password Set Credit Token to 010.

[0065] 3. Unlock Token: Release the user usage restrictions. For example, if there are 10 hours left, enter Unlock Token, and the system will be unblocked and unrestricted.

[0066] Function definition:

[0067] ①In UnLock mode, enter the UnLock Token, and the system will not respond;

[0068] ② The UnLock Token of the device cannot be reused each time.

[0069] For example, set the unlock password UnLock to 011.

[0070] 4. Factory Reset Token: Initialize the user's historical records, clear the remaining usage time of the user and the Token input storage records;

[0071] Function definition:

[0072] ① It can be used in any mode;

[0073] ② The Factort_Reset Token of the device cannot be reused each time.

[0074] For example, set the Factory Reset Token to 000.

[0075] Time setting Set Times: Set the time information included in the Token. The unit of time information can be hours, days, etc., and its input threshold can be set. For example, the maximum cannot exceed 8000 hours.

[0076] Password generation setting Set Credit Count: Record the serial number generated by the PAYG-Token and the number of generations, and set the number of generations of the PAYG-Token of the product. For example, the maximum number of password generations corresponding to each product ID is 2000.

[0077] Second, extract the pay-as-you-go system ID of the product and verify whether the pay-as-you-go system ID is the corresponding ID of the product

[0078] In the embodiments of the present application, the pay-as-you-go system ID (PAYG-ID) designed by the applicant himself is used for illustration.

[0079] The PAYG-ID designed by the applicant himself includes 3 functional blocks:

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

[0081] PAY-ID function code: The clear code pasted on the device shell or displayed on the UI display screen of the device. Users can view it. After obtaining the product, users can query product-related information according to the clear code. For example, send the clear code to the background, and the background provides the available time under the current bill of the product or the device usage time unlock code, etc. according to the clear code;

[0082] Secret Key function code (internal password for internal management).

[0083] The method for establishing the PAYG-ID comprises the following steps:

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

[0085] 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.

[0086] 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.

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

[0088] 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.

[0089] 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;

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

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

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

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

[0094] 2.3.1 Add serial number

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

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

[0097] 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.

[0098] If the current final code has been updated, the serial number starts counting from the beginning again.

[0099] 2.3.2 Adding a supplementary number to the serial number

[0100] The supplementary code of the serial number is a two-digit decimal number.

[0101] The criteria for the supplementary code of the serial number are as follows:

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

[0103] Determine the polling supplementary code range according to the value of the last digit according to the polling rule, and select the supplementary code of the serial number within the polling supplementary code range;

[0104] The polling supplementary code range and polling rule include:

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

[0106] The polling rule for the second polling supplementary code range is: if the sum of the two digits in the supplementary code of the serial number is 8, the length of the second polling supplementary code range is 8, and the supplementary codes of the serial number within the range are 08, 17, 26, 35, 53, 62, 71, 80;

[0107] The polling rule for the third polling supplementary code range is: if the sum of the two digits in the supplementary code of the serial number is 7, the length of the third polling supplementary code range is 8, and the supplementary codes of the serial number within the range are 07, 16, 25, 34, 43, 52, 61, 70;

[0108] The polling rule for the fourth polling supplementary code range is: if the sum of the two digits in the supplementary code of the serial number is 6, the length of the fourth polling supplementary code range is 6, and the supplementary codes of the serial number within the range are 06, 15, 24, 42, 51, 60;

[0109] The polling rule for the fifth polling supplementary code range is: if the sum of the two digits in the supplementary code of the serial number is 5, the length of the fifth polling supplementary code range is 6, and the supplementary codes of the serial number within the range are 05, 14, 23, 32, 41, 50;

[0110] The polling rule for the sixth polling supplementary code range is: if the sum of the two digits in the supplementary code of the serial number is 4, the length of the sixth polling supplementary code range is 4, and the supplementary codes of the serial number within the range are 04, 13, 31, 40;

[0111] The polling rule for the 7th polling complement code interval is: the sum of the two digits in the serial number complement code is 3. The length of the 7th polling complement code interval is 4, and the serial number complement codes within the interval are 03, 12, 21, 30;

[0112] The polling rule for the 8th polling complement code interval is: the sum 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 within the interval are 02, 20;

[0113] The polling rule for the 9th polling complement code interval is: the sum 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 within the interval are 01, 10.

[0114] The selection of the serial number complement code is made sequentially according to the arrangement order of the serial number complement codes within the polling complement code interval;

[0115] 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 + 1)th polling complement code interval to sequentially select the serial number complement codes until all the serial number complement codes are added.

[0116] For example: the value of the last digit of the final code is 9, located in the 1st polling interval, and there are a total of 52 serial numbers that need complement codes. Then 001 is complemented with 09, 002 with 18, 003 with 27,..., 043 with 03, 044 with 12, 045 with 21, 046 with 30, 047 with 02,..., 049 with 01, 050 with 10, (start a new cycle) 051 with 09, 052 with 18.

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

[0118] Step 3, Generate the Secret Key function code

[0119] The Secret Key function code is used to implement the encryption of the device's password. It is formed by combining the clear PAY-ID function code and the Q-ID function code of the product.

[0120] 3.1 Form each combination factor

[0121] For the Q-ID function code:

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

[0123] 2) Use the English abbreviation RG of the region, and its ASCII code is 8271;

[0124] 3) Connect the string RG&Region to get the first combined code 8271319;

[0125] 4) Extract the last 4 digits of the Q-ID function code (i.e., the product code), 0001, as the second combined code.

[0126] For the PAY-ID function code:

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

[0128] 1) Extract the first 7 digits of the PAY-ID function code, i.e., 3400930, denoted as ID-TIME;

[0129] 2) Use the abbreviation ID-T of ID-TIME, and convert it to ASCII code. Among them, I is 73, D is 68, - is 45, and T is 84. The final ASCII code is 73684584;

[0130] 3) Connect the string ID-T&ID-TIME to get the third combined code 736845843400930;

[0131] 4) Extract the last 5 digits of the PAY-ID function code (i.e., the serial number + the serial number supplement code), 00109, as the fourth combined code.

[0132] The combination symbol is selected as " / ", and its ASCII code is 47.

[0133] 3.2 Combine to form a combined string

[0134] The combination logic is: the first combined code & / & the third combined code & / & the second combined code & / & the fourth combined code, that is, "the string ID-T&ID-TIME connection & / & the string RG&Region connection & / & the product code & / & the serial number and the serial number supplement code", to obtain the combined string 736845843400930478271319470001 47 00109.

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

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

[0137] C2 = MID(Combined Logic, 5 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 4584, convert to fixed binary number length: 1000111101000);

[0138] C3 = MID(Combined Logic, 9 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 3400, convert to fixed binary number length: 0110101001000);

[0139] C4 = MID(Combined Logic, 13 (starting bit), 3 (bit length), convert to fixed binary value); (For example: = 930, convert to fixed binary number length: 1110100010);

[0140] C5 = MID(Combined Logic, 16 (starting bit), 2 (bit length), convert to fixed binary value); (For example: = 47, convert to fixed binary number length: 101111);

[0141] C6 = MID(Combined Logic, 18 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 8271, convert to fixed binary number length: 10000001001111);

[0142] C7 = MID(Combined Logic, 22 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 319, convert to fixed binary number length: 0100111111);

[0143] C8 = MID(Combined Logic, 25 (starting bit), 1 (bit length), convert to fixed binary value); (For example: = 4, convert to fixed binary number length: 100);

[0144] C9 = MID(Combined Logic, 26 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 700, convert to fixed binary number length: 1010111100);

[0145] C10 = Bitwise inversion of the binary number of C9; (For example: 0101000011);

[0146] C11 = MID(Combined Logic, 29 (starting bit), 4 (bit length), convert to fixed binary value); (For example: = 014, convert to fixed binary number length: 0000001110);

[0147] The binary number of C12 = C11 is bitwise inverted; (for example: 1111110001);

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

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

[0150] C15 = The binary number of C14 is bitwise inverted; (for example: 1111111110);

[0151] C16 = MID(combinatorial logic, 36 (starting bit), 4 (bit length), converted to a fixed binary value); (for example: = 09, converted to a fixed binary number length: 0001001);

[0152] C17 = The binary number of C16 is bitwise inverted; (for example: 1110110).

[0153] 3.4 Adding padding check binary numbers to the combined binary array

[0154] The padding check binary numbers are B1, B2, B3 respectively, where B1 = 101, B2 = 010, B3 = 110.

[0155] The adding logic is: C1 & B1 & C2 & C3 & C4 & C5 & C6 & C7 & C8 & C9 & C10 & B3 & C11 & C12 & C13 & C14 & C15 & C16 & B2 & C17, obtaining a final output binary array with a length of 168 bits: 111001100100010110001111010000110101001000111010001010111110000001001111010011111110010101111000101000011110000000111011111100011110000000001111111111000010010101110110

[0157] 3.5 Converting the 168 - bit binary array to a 42 - bit hexadecimal array, the result is: E6458F43523A2BE04F4FE578A1E03BF1E00FFC2576.

[0158] 3.6 Transform the hexadecimal array 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.

[0159] When the user has a need, the user sends the Q-ID and PAY-ID of the product to the background. The background uses the Secret Key function code of the product to verify whether the received Q-ID and PAY-ID are the Q-ID and PAY-ID corresponding to the product. After passing the verification, the PAYG-Token can be generated according to the need.

[0160] III. Generate PAYG-Token

[0161] 1. Retain and store the string with a total length of 6 digits starting from the 13th digit of the above Secret Key string as the feature value MID(Secret Key,13,6);

[0162] For example: The value of BAE0F275A2D28183724340DD0D0639B8 is: 818372.

[0163] 2. Convert the intercepted 6-digit string into a 24-bit binary string;

[0164] For example: 818372 is converted to 100000011000001101110010.

[0165] 3. Sequentially truncate the 24-bit binary string into 6 equal-length segments, and name them Secret-1, Secret-2, Secret-3, Secret-4, Secret-5, and Secret-6 respectively;

[0166] For example: Secret-1 = 1000, Secret-2 = 0001, Secret-3 = 1000, Secret-4 = 0011, Secret-5 = 0111, Secret-6 = 0010.

[0167] 4. Generate a corresponding time code according to the user input password type and the required usage time, and convert the time code into a binary string; then truncate the binary string into character segments of different lengths. For example:

[0168] If Token Type = Factort_Rst and the time value is set to 0, it is converted into a 13-bit binary string;

[0169] If Token Type = UnLock, set the time value to 8000 and convert it to a 13-bit binary string;

[0170] If Token Type = Add Credit Token or Set Credit Token, set the time value according to the actual set value and convert it to a 13-bit binary string

[0171] For example: the input password is Add Credit Token, and the required additional usage time is 20 hours. The converted binary string is 0000000010100.

[0172] Intercept the above 13-bit binary string into two binary strings of 6-bit length and 7-bit length, and name them Set Time6 (the first 6 bits, 000000) and Set Time7 (the last 7 bits, 0010100) respectively.

[0173] 5. Convert the password setting times code into a binary string, and then intercept the binary string into character segments of different lengths. For example:

[0174] This is the 33rd time to generate a PAYG-Token, then 33 is converted to an 11-bit binary string 00000100001;

[0175] Intercept the 11-bit binary string into two binary strings of 6-bit length and 5-bit length, and name them Set Count6 (the first 6 bits, 000001) and Set Count5 (the last 5 bits, 00001) respectively.

[0176] 6. Integrate according to the following logic

[0177] Logical equation: Secret-6 & SetCount5 & Secret-5 & SetTime6 & Secret-4 & SetCount6 & Secret-3 & SetTime7 & Secret-2 & Token Type & Secret-1;

[0178] The obtained logical string is:

[0179] 001000001011100000000110000011000001010000010101000.

[0180] 7. Pad the above logical string:

[0181] There are 14 '1's in the statistical logic string. Taking the remainder of 14 divided by 4 gives a remainder of 2. Therefore, assign 1, convert 1 to binary to obtain the padded string as 10;

[0182] Pad the padded string to the logic string to obtain the final string as:

[0183] 10001000001011100000000110000011000001010000010101000.

[0184] 8. Convert the above string to decimal, which is 4,791,397,607,579,816, and this is the PAYG-Token used for the user's product this time.

[0185] The above are only several embodiments of the present application and do not impose any form of limitation on the present application. Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art, without departing from the technical solution of the present application, making some changes or modifications using the disclosed technical content is equivalent to equivalent implementation cases and all fall within the scope of the technical solution.

Claims

1. A method for generating PAYG-Token, characterized in that, The method at least includes the following steps: Set various passwords involved in the pay-as-you-go system; Extract the pay-as-you-go system ID of the product, and verify whether the pay-as-you-go system ID is the corresponding ID of the product; If the verification passes, extract the characteristic value in the pay-as-you-go system ID, generate a code according to the password input by the user and the preset password of the product, and encrypt the characteristic value to obtain the PAYG-Token; The encryption process includes: Convert the characteristic value into a binary string of a specific length, denoted as string A; Convert the password input by the user into a binary string, denoted as string B; Generate a corresponding time code according to the type of the password input by the user, and convert the time code into a binary string of a specific length, denoted as string C; Convert the password generation code into a binary string of a specific length, denoted as string D; After logically integrating the string A, the string B, the string C, and the string D, convert them into decimal, and the PAYG-Token is obtained; The logical integration process includes: The string A is truncated into character segments of equal length, and each character segment is denoted as string a i , where i = i + 1; The string C is truncated into character segments of different lengths, and each character segment is denoted as the string c i , where i = i + 1; The string D is truncated into character segments of different lengths, and each character segment is denoted as string d i , where i = i + 1; Integrate each of the said strings a i with the said string c i with the said string d i and the said string B according to a set logic to form a logical string containing all characters.

2. The method according to claim 1, wherein The types of passwords input by the user include credit increase password, credit setting password, unlock password, and factory reset password; The credit increase password is used to increase the usage time included in the credit increase password based on the current product time; The credit setting password is used to replace the current product time with the usage time included in the credit setting password; The unlock password is used to unlock the product and no longer limit the user's usage time; The factory reset password is used to format the used PAYG-Token records stored in the product's internal storage; 3. The method according to claim 1, wherein The preset password generation code of the product refers to the number of times of establishing the PAYG-Token for the current request; When the number of times of establishing the PAYG-Token for the current request of the product exceeds the preset threshold, no PAYG-Token is generated anymore; The preset threshold refers to the total number of PAYG-Tokens that the product can generate; 4. The method according to claim 1, wherein The length of the string A is 24 bits; The length of the string C is 13 bits; The length of the string D is 11 bits; 5. The method according to claim 1, wherein During the cross-integration process, the initial string is string a i , adjacent string a i is separated by any one of string c i , the said string d i , and the said string B, and the last string is string a i .

6. The method according to claim 1, wherein The method further includes: before performing the decimal conversion, perform padding verification on the logical string; 7. The method according to claim 6, wherein The padding verification method is: Count the number of 1s in the logical string and take the remainder of the set value. If the remainder value ≤ 1, assign it as 1; If the remainder value > 1, use the remainder value as the assignment; Convert the assignment into binary to obtain a padding string; Pad the padding string to the beginning or end of the logical string; 8. The method according to claim 7, characterized in that If the first character of the logical string is 0, pad the padding string to the beginning of the logical string;