Coupon code generation method, device and system and storage medium

By grouping and compressing UUIDs, random, length-controllable coupon codes are generated, which solves the problem that existing coupon codes are easily abused and improves user input efficiency and accuracy.

CN118734794APending Publication Date: 2024-10-01上海筱珈数据科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410747076.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing coupon codes are prone to malicious guessing and abuse in certain scenarios, and their long length makes it inconvenient for users to input, increases the risk of spelling errors and formatting errors, and affects the redemption success rate.

Method used

Generate random and controllable length coupon codes through grouping and compression based on Universal Unique Identification Code (UUID), use random numbers and timestamps to generate UUIDs, and compress character groups through the character dictionary library to form short and unique offers. Coupon code to avoid repeated codes and improve input efficiency.

Benefits of technology

It effectively prevents the coupon code from being maliciously guessed and abused, simplifies the user input process, and improves the efficiency and accuracy of using the coupon code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734794A_ABST
    Figure CN118734794A_ABST
Patent Text Reader

Abstract

The invention provides a coupon code generation method, device and system and a storage medium. The method comprises the following steps: generating a universal unique identification code based on a first character dictionary library; the first character dictionary database comprises random numbers and timestamps; when the total number of the first characters of the universal unique identification codes meets the grouping bit number, grouping the universal unique identification codes to form a plurality of character groups; compressing each character group into a coupon code character, so that the plurality of character groups are compressed into a plurality of coupon code characters; a coupon code is generated based on the plurality of coupon code characters. According to the method, the universal unique identification code is compressed, the length of the obtained coupon code is controllable, the coupon code is random and unique, the coupon code is prevented from being abused after being maliciously guessed, and the efficiency of inputting the coupon code is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of e-commerce, and in particular to a method, device, system and storage medium for generating a coupon code. Background Art

[0002] Currently, e-commerce platforms widely use coupons as a marketing tool to improve customer satisfaction and promote consumption. Currently, coupons mainly exist in the form of QR codes, barcodes, link codes, and automatically offset discount coupons. However, for some specific shopping scenarios, such as online shopping on the brand's official website, telephone product ordering, and self-service checkout machines in shopping malls, you need to manually enter the coupon code to redeem the discount. The currently generated coupon codes have the problem of high risk of abuse and too long coupon codes. When the coupon code has a regular pattern, it is easy to be maliciously guessed and abused to misuse other people's coupon codes; when the coupon code is too long, it is inconvenient for users to remember and enter. When manually entering the coupon code, spelling errors or format errors may occur, resulting in failure to successfully redeem the discount. Summary of the invention

[0003] The purpose of the present invention is to provide a method, device, system and storage medium for generating a coupon code, so as to achieve compression of a universal unique identification code, obtain a coupon code with controllable length, and make the coupon code random and unique, thereby avoiding abuse after malicious guessing and greatly improving the efficiency of inputting the coupon code.

[0004] The technical solution provided by the present invention is as follows:

[0005] The present invention provides a method for generating a coupon code, comprising:

[0006] A universal unique identification code is generated based on a first character dictionary library; the first character dictionary library includes a random number and a timestamp.

[0007] When the total number of first characters of the universal unique identifier meets the number of grouping digits, the universal unique identifier is grouped to form a plurality of character groups.

[0008] Each character group is compressed into a coupon code character, so that multiple character groups are compressed into multiple coupon code characters; and a coupon code is generated based on the multiple coupon code characters.

[0009] Furthermore, each group of characters is compressed into a coupon code character, including:

[0010] The total number of second characters in the second character dictionary library is obtained, and the second character dictionary library is used to generate the coupon code; the second character dictionary library includes English letters and numbers.

[0011] After the characters in each character group are converted into decimal numbers, a remainder is obtained by taking the modulo of the total number of the second characters based on the decimal number of each group.

[0012] Look up the character at the corresponding position of each remainder in the second character dictionary library and use it as a coupon code character.

[0013] Furthermore, each group of characters is compressed into a coupon code character, including:

[0014] The characters at the preset fixed positions in each character group are extracted as the coupon code characters.

[0015] Furthermore, when the total number of first characters of the UUID does not meet the number of grouping bits, the UUID is padded with random numbers so that the number of characters of the UUID meets the number of grouping bits.

[0016] Furthermore, before grouping the universal unique identifier to form a plurality of character groups, the method further includes:

[0017] Identify the characters, identification bits, and the first character count of the characters in the universal unique identifier.

[0018] Combined with the number of characters in each character group and the number of digits of the coupon code, it is analyzed whether the total number of the first characters meets the number of digits for grouping.

[0019] Furthermore, after generating the coupon code based on the plurality of coupon code characters, the method further includes:

[0020] In the historical coupon code library, it is searched whether there is a historical coupon code that is the same as the coupon code; if there is a historical coupon code that is the same as the coupon code, the coupon code is regenerated.

[0021] The present invention also provides a terminal device, comprising:

[0022] The device is used for generating a coupon code, comprising a processor, and is used for calling instructions stored in a memory, and when the instructions are executed, the terminal device executes a method for generating a coupon code.

[0023] The present invention also provides a system for generating a coupon code, comprising:

[0024] The first terminal device includes a processor, which is used to call instructions stored in a memory. When the instructions are executed, the terminal device executes a method for generating a coupon code.

[0025] The second terminal device is connected to the first terminal device. When the first terminal device generates a coupon code, the coupon code is registered in the second terminal device. The second terminal device is also used to redeem the coupon code.

[0026] Furthermore, it also includes:

[0027] The mobile terminal sends a request instruction for applying for a coupon code to the first terminal device; the mobile terminal is also used to receive the coupon code generated by the first terminal device.

[0028] The present invention also provides a storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operation performed by the method for generating a coupon code.

[0029] By means of a coupon code generation method, device, system and storage medium provided by the present invention, compression of a universal unique identification code is achieved, the length of the obtained coupon code is controllable, the coupon code is random and unique, and abuse after malicious guessing is avoided, thereby greatly improving the efficiency of merchants inputting coupon codes. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The preferred implementation scheme will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above characteristics, technical features, advantages and implementation methods of a coupon code generation method, device, system and storage medium.

[0031] Figure 1 It is a structural schematic diagram of an embodiment of a coupon code generation system of the present invention;

[0032] Figure 2 is a flow chart of an embodiment of a method for generating a coupon code of the present invention;

[0033] Figure 3 is a flow chart of another embodiment of a method for generating a coupon code of the present invention;

[0034] Figure 4 is a flow chart of another embodiment of a method for generating a coupon code of the present invention;

[0035] Figure 5 It is a structural schematic diagram of an embodiment of a terminal device of the present invention. DETAILED DESCRIPTION

[0036] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0037] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections.

[0038] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0039] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0040] E-commerce coupon codes are a common promotional method in e-commerce. By providing specific codes, consumers can enjoy discounts or other benefits when purchasing goods. Existing coupon codes are in the form of character codes, QR codes, bar codes, link codes, automatic discount coupons, etc. By scanning the QR code or clicking the link, the discount information is automatically imported directly into the application system. This form of coupon code is more convenient and faster, reducing the steps of manual input by users.

[0041] For some specific merchants at present, such as online shopping on the brand's official website, telephone product ordering, and self-service checkout machines in shopping malls, the method of manually entering coupon codes is still preserved. In order to avoid malicious cracking of coupon codes, these coupon codes are usually codes composed of a string of characters, which can be a combination of numbers, letters and other characters. There are some problems with manually entering long coupon codes, including: time consumption, when users enter long coupon codes on mobile devices, they may feel inconvenient and time-consuming; cumbersome operations, too long coupon codes increase the cumbersomeness of the shopping process and lead to poor shopping experience for users.

[0042] Therefore, the present invention discloses a method for generating a coupon code, wherein the generated coupon code is random, unique and has a controllable length, which greatly reduces the time for inputting the coupon code.

[0043] The following is a description with reference to the accompanying drawings:

[0044] In one embodiment of the present invention, Figure 1 As shown, a coupon code generation system 100 includes:

[0045] The first terminal device 110 is used to generate a coupon code, such as a background server, which is used to execute a method for generating a coupon code. When the coupon code generation instruction is executed, the generated coupon code is transmitted to the second terminal device 120; the second terminal device 120 is used to register the coupon code, such as an e-commerce server, which is used to receive the coupon code sent by the first terminal device 110 and register the coupon code in the second terminal device 120; the second terminal device 120 is also used to redeem the coupon code. When the first terminal device 110 generates a coupon code, it can actively generate the coupon code and then issue it to the mobile terminal (i.e., the consumer terminal). When the first terminal device 110 passively generates a coupon code, the system also includes a mobile terminal 130, which is used to apply for a coupon code. The mobile terminal can send a request instruction for applying for a coupon code to the first terminal device 110; the mobile terminal is also used to receive the coupon code generated by the first terminal device 110.

[0046] Specifically, the mobile terminal 130 has installed thereon an application program for applying for coupons and a coupon APP. The user can click on the icon of the coupon APP to start entering the operation interface of the coupon APP. The coupon code can be sent to the mobile terminal 530 after the mobile terminal 130 applies to the first terminal device 110, or the first terminal device 110 can automatically apply and distribute the coupon code to the mobile terminal 130.

[0047] If the first terminal device 110 automatically applies for a coupon code, the coupon code is directly generated by using the coupon code generation method, and the generated coupon code is registered to the second terminal device 120. After the registration is successful, the result is fed back to the first terminal device 110. Finally, the first terminal device 110 determines whether the coupon code sending conditions are met and sends the coupon code to the mobile terminal 130. The mobile terminal 130 enjoys discounts or fee reductions by using the coupon code. After the coupon code is used, the second terminal device 120 cancels the used coupon code.

[0048] If the mobile terminal 130 sends a request instruction to apply for a coupon code to the first terminal device 110, the first terminal device 110 first verifies the application of the mobile terminal 130 to identify whether the user meets the conditions for applying for a coupon. If the application is not applicable, the failure reason is returned to the mobile terminal 130. The specific failure reason may be that the coupon code has been applied for or other application conditions are not met; if the verification application is passed, the first terminal device 110 generates a coupon code by using the coupon code generation method, and registers the generated coupon code to the second terminal device 120. After the registration is successful, the result is fed back to the first terminal device 110. The first terminal device 110 sends the coupon code to the mobile terminal 130, and the mobile terminal 130 enjoys discounts or fee reductions by using the coupon code. After the coupon code is used, the second terminal device 120 cancels the used coupon code.

[0049] In the prior art, coupon code generation is the core link of coupon issuance. Randomly generated coupon codes need to consume a lot of system resources for duplicate checking; coupon codes generated by the global unique code snowflake algorithm are too long and in a self-increasing order, which is not convenient for users to input; coupon codes based on user IDs or containing discount information are convenient for background management, but have a high risk of being abused by malicious guesses. In this embodiment, coupon codes are generated based on UUID codes, and the coupon codes are divided into different groups, each group takes a specific character, and the length of the coupon codes formed by the combination of specific characters in each group is controllable. The coupon codes are random and unique, which avoids abuse after malicious guesses, and greatly improves the efficiency of merchants entering coupon codes.

[0050] The method for generating a coupon code is described below with reference to the accompanying drawings.

[0051] Please refer to Figure 2 , which shows a flow chart of a method for generating a coupon code provided in some embodiments of the present disclosure. The method is executed by a terminal device or a first terminal device (ie, a backend server), and includes at least the following steps:

[0052] S100 generates a universal unique identification code based on a first character dictionary library, where the first character dictionary library includes a random number and a timestamp.

[0053] S200: When the total number of first characters of the UUID satisfies the number of grouping digits, the UUID is grouped to form a plurality of character groups.

[0054] S300 compresses each character group into a coupon code character, so that multiple character groups are compressed into multiple coupon code characters, and a coupon code is generated based on the multiple coupon code characters.

[0055] Specifically, when the terminal device or the first terminal device (i.e., the background server) receives a request instruction for applying for a coupon from the mobile terminal, it first verifies the application to identify whether the user can apply for the coupon. If not, the reason for failure is returned to the user; if the application is allowed, a universal unique identification code is generated based on the first character dictionary library.

[0056] The universal unique identifier can be a UUID. The generation method of UUID generally includes time-based UUID, random number-based UUID, and namespace-based UUID, on this basis, a unique identifier can be quickly generated. In this embodiment, a specific timestamp, node identifier, and random number combination are used to generate the UUID, which ensures the randomness of the UUID and has a low repeatability under a certain order of magnitude. The UUID consists of 32 hexadecimal characters separated by 4 dashes to form an 8-4-4-4-12 layout, for example: 123e4567-e89b-12d3-a456-426614174000 is a universal unique identifier generated based on the UUID.

[0057] The number of grouping bits can be the length of the coupon code. When the total number of valid characters of the universal unique identifier is divisible by the number of grouping bits (coupon code length), the universal unique identifier is grouped to form multiple character groups. For example, in this embodiment, when the number of grouping bits is the coupon code length, when the required coupon code length is 8, the number of grouping bits can be 8.

[0058] Finally, each group of multi-bit character strings is compressed into a coupon code character, and multiple groups of character strings are compressed into multiple coupon code characters, and a coupon code is generated based on multiple coupon code characters. The way of combining coupon code characters to form a coupon code is not limited to positive order, reverse order, and cross combination. The length of the generated coupon code is controllable, and there is no continuity or characteristic that can be guessed or predicted.

[0059] In this embodiment, based on the uniqueness of the characters generated by UUID, the universal unique identification code is segmented, compressed, and combined to generate a unique, random, length-controllable, and fast coupon code, which greatly improves the efficiency of users in inputting coupon codes and prevents the coupon codes from being maliciously predicted and abused.

[0060] Please refer to Figure 3 , when the universal unique identifier is grouped to form multiple character groups, the grouping process of the universal unique identifier is described, such as Figure 3 As shown, S200 may include:

[0061] S210 identifies the characters, the identification bit, and the total number of the first characters of the characters in the universal unique identifier.

[0062] S220 combines the number of characters in the first character group and the number of digits of the coupon code to analyze whether the total number of first characters meets the number of digits for grouping.

[0063] S230: When the total number of first characters of the UUID does not meet the number of grouping digits, the UUID is padded with random numbers so that the number of characters of the UUID meets the number of grouping digits.

[0064] Specifically, in this embodiment, the universal unique identifier automatically generated based on UUID is 36 bits, which contains 4 dash identification bits, and 32 valid characters remain after removing the identification bits. The universal unique identifier is analyzed based on the valid characters of the universal unique identifier and the number of digits of the coupon code to see whether it meets the number of grouping digits. If the total number of the first characters meets the number of grouping digits, the universal unique identifier is divided into multiple groups of characters; if it does not meet the number of grouping digits, the universal unique identifier needs to be padded to be divisible by the number of digits of the coupon code, or the redundant characters need to be removed. The number of characters in each group of characters after grouping is not limited.

[0065] Assuming that the coupon code to be generated is 8 bits long and the number of bits for grouping is 8, the universal unique identification code is: 123e4567-e89b-e89b-a456-426614174000. After removing the 4 separators, the 32-bit valid characters are divided into 8 groups, and each group of 4 bits can be obtained ['123e','4567','e89b','e89b','a456','4266','1417','4000']. If the coupon code to be generated is 10 digits long, and the number of digits for grouping is 10, the 32-bit valid characters cannot be divided by 10. If the number of digits for grouping is not met, two digits can be removed from the 32-bit valid characters to form 10 groups of 3-digit strings ['123','e45','67e','89b','e89','ba4','564','266','141','740']; or the 32-bit valid characters can be automatically filled in until 40 valid characters are divisible by 10.

[0066] In the process of compressing character groups into coupon code characters, there are two main compression methods. Now we will explain one of the compression methods. Please refer to Figure 4 , which is a flow chart of compressing a character group into coupon code characters provided in some embodiments of the present disclosure. Figure 4 As shown, the above step S300 may include:

[0067] S310 obtains the total number of second characters in the second character dictionary library, where the second character dictionary library is used to generate coupon codes, and the second character dictionary library includes English letters and numbers.

[0068] S320 converts the characters in each character group into decimal numbers, and then obtains a remainder by taking the modulus of the total number of second characters based on the decimal number of each group.

[0069] S330 searches the second character dictionary for the character at the corresponding position of each remainder and uses it as a coupon code character.

[0070] Specifically, in this embodiment, a group of 62 different characters consisting of uppercase and lowercase letters and 0-9 numbers is used as the second dictionary library, and the second dictionary library is ['a', 'b', 'c', 'd', 'e', ​​'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A' ,'B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'], the total number of second characters in the second dictionary is 62. The characters in the second dictionary are not limited to uppercase and lowercase letters and numbers, and some special characters can also be used.

[0071] The universal unique identifier generated based on UUID is a hexadecimal number. Each group of strings needs to be converted into a decimal number. Take the modulus of the total number of second characters 62 for each group of converted decimal numbers, and take the modulus of the total number of characters in the dictionary based on the decimal number of each group to get a remainder. For example, convert the above string ['123e','4567','e89b','e89b','a456','4266','1417','4000'] into a decimal number [4670,17767,59548,59548,42070,16998,5137,16384], and take the modulus of the total number of second characters 62 to get the remainder [46,55,52,52,44,42,51,60].

[0072] Find the characters at the corresponding positions of each remainder in the second character dictionary and use them as coupon code characters. For example, find the characters at the corresponding positions of the remainders [46,55,52,52,44,42,51,60] in the second character dictionary. The corresponding characters of each string are [U,3,0,0,S,Q,Z,8], and these characters are used as coupon code characters.

[0073] Compress each group of multi-bit character strings into one coupon code character, compress multiple groups of character strings into multiple coupon code characters, and generate a coupon code based on multiple coupon code characters. The way of combining coupon code characters to form a coupon code is not limited to positive order, reverse order, and cross combination. The length of the generated coupon code is controllable, and there is no continuity or characteristic that can be guessed or predicted. For example, the coupon code generated by connecting the compressed characters in positive order is: U300SQZ8; the coupon code generated by connecting in reverse order is: 8ZS003U. The coupon code generated by this method is not easy to predict and has a moderate length, which can be convenient for users to input and remember.

[0074] In this embodiment, based on the uniqueness of the characters generated by UUID, the universal unique identification code is segmented, compressed, and combined to generate a unique, random, length-controllable, and fast coupon code, which greatly improves the efficiency of users in inputting coupon codes and prevents the coupon codes from being maliciously predicted and abused.

[0075] In the process of compressing character groups into coupon code characters, another compression method is now described. The above step S300 may include: extracting characters at preset fixed positions in each character group as coupon code characters.

[0076] Specifically, after the universal unique identification code is divided into multiple groups, the characters at preset fixed positions in the multiple character groups are extracted. In this embodiment, the characters at the fixed positions of each group are mainly used. The extracted characters can be the first position of each group, other fixed positions of each group, or other extraction methods, such as taking the first position of the first group, the second position of the second group, and so on. For example, the character string ['123e','4567','e89b','e89b','a456','4266','1417','4000'] is extracted from the first position of each group to obtain the characters [1,4,e,e,a,4,1,4].

[0077] Each group of multi-bit character strings is compressed into a coupon code character, and multiple groups of character strings are compressed into multiple coupon code characters, and a coupon code is generated based on multiple coupon code characters. The way of combining coupon code characters to form a coupon code is not limited to positive order, reverse order, and cross combination. The length of the generated coupon code is controllable, and there is no continuity or characteristic that can be guessed or predicted.

[0078] After the character group is compressed into coupon code characters, a coupon code is generated based on multiple coupon code characters. The above step S300 also includes: searching in the historical coupon code library whether there is a historical coupon code that is the same as the coupon code; if there is a historical coupon code that is the same as the coupon code, regenerating the coupon code.

[0079] Specifically, after compression, the coupon code may still be repeated. The historical coupon code database can be used to check for duplicates to find out whether there are duplicates. If there are duplicates, a new coupon code can be regenerated.

[0080] In this embodiment, based on the uniqueness of the characters generated by UUID, the universal unique identification code is segmented, compressed, and combined to generate a unique, random, length-controllable, and fast coupon code, which greatly improves the efficiency of users in inputting coupon codes and prevents the coupon codes from being maliciously predicted and abused.

[0081] One embodiment of the present invention, as Figure 5 As shown, a terminal device 500 includes a processor 510 and a memory 520, wherein the memory 520 is used to store a computer program 521; the processor 510 is used to execute the computer program 521 stored in the memory 520 to implement the method for generating a coupon code in the above corresponding method embodiment.

[0082] The terminal device 500 may be a desktop computer, a notebook, a PDA, a tablet computer, a mobile phone, a human-computer interaction screen, etc. The terminal device 500 may include, but is not limited to, a processor 510 and a memory 520. Those skilled in the art will appreciate that Figure 5 It is only an example of the smart terminal device 500 and does not constitute a limitation on the terminal device 500. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the smart watch 500 may also include an input / output interface, a display device, a network access device, a communication bus, a communication interface, etc. The communication interface and the communication bus may also include an input / output interface, wherein the processor 510, the memory 520, the input / output interface and the communication interface communicate with each other through the communication bus. The memory 520 stores a computer program 521, and the processor 510 is used to execute the computer program 521 stored in the memory 520 to implement the method for generating a coupon code in the above-mentioned corresponding method embodiment.

[0083] The processor 510 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0084] The memory 520 may be an internal storage unit of the terminal device 500, such as a hard disk or memory of a smart device. The memory may also be an external storage device of the smart device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the smart device. Furthermore, the memory 520 may include both an internal storage unit of the smart device terminal 500 and an external storage device. The memory 520 is used to store the computer program 521 and other programs and data required by the smart terminal device 500. The memory may also be used to temporarily store data that has been output or is to be output.

[0085] The communication bus is a circuit that connects the elements described and realizes transmission between these elements. For example, the processor 510 receives commands from other elements through the communication bus, decrypts the received commands, and performs calculations or data processing according to the decrypted commands. The memory 520 may include program modules, such as kernels, middleware, application programming interfaces (APIs) and applications. The program modules may be composed of software, firmware or hardware, or at least two of them. The input / output interface forwards commands or data input by the user through the input / output interface (such as sensors, keyboards, touch screens). The communication interface connects the intelligent terminal device 500 with other network devices, user devices, and networks. For example, the communication interface can be connected to the network by wire or wireless to connect to other external network devices or user devices. Wireless communication may include at least one of the following: wireless fidelity (WiFi), Bluetooth (BT), near field communication technology (NFC), global satellite positioning system (GPS) and cellular communication, etc. Wired communication may include at least one of the following: Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), RS-232, etc. The network may be a telecommunication network and a communication network. The communication network may be a computer network, the Internet, the Internet of Things, or a telephone network. The terminal device 500 may be connected to the network via a communication interface, and the protocol used by the terminal device 500 and other network devices to communicate may be supported by at least one of an application, an application programming interface (API), a middleware, a kernel, and a communication interface.

[0086] One embodiment of the present invention is a storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed by the corresponding embodiment of the above-mentioned implementation method for generating a coupon code. For example, the storage medium can be a read-only memory (ROM), a random access memory (RAM), a read-only compact disk (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0087] They can be implemented with program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0088] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0089] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed with hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0090] In the embodiments provided in the present application, it should be understood that the disclosed devices / smart watches and methods can be implemented in other ways. For example, the device / smart watch embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0091] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0092] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0093] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by sending instructions to related hardware through a computer program 521. The computer program 521 can be stored in a storage medium. When the computer program 521 is executed by a processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program 521 can be in the form of source code, object code, executable file or some intermediate form. The storage medium may include: any entity or device capable of carrying the computer program 521, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0094] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A method for generating a coupon code, characterized in that: include: Generate a universal unique identification code based on a first character dictionary library; the first character dictionary library includes a random number and a timestamp; When the total number of first characters of the universal unique identifier meets the number of grouping bits, grouping the universal unique identifier to form multiple character groups; Each group of characters is compressed into a coupon code character, so that the multiple groups of characters are compressed into multiple coupon code characters; and a coupon code is generated based on the multiple coupon code characters.

2. The method for generating a coupon code according to claim 1, characterized in that: The step of compressing each character group into a coupon code character includes: Obtaining the total number of second characters in a second character dictionary library, where the second character dictionary library is used to generate a coupon code; the second character dictionary library includes English letters and numbers; After converting the characters in each character group into decimal numbers, taking the remainder of the total number of the second characters based on the decimal number of each group; The character at the corresponding position of each remainder is searched in the second character dictionary library and used as a coupon code character.

3. The method for generating a coupon code according to claim 1, characterized in that: The step of compressing each character group into a coupon code character includes: The characters at the preset fixed positions in each character group are extracted as the coupon code characters.

4. The method for generating a coupon code according to claim 1, characterized in that: include: When the total number of first characters of the universal unique identifier does not meet the number of grouping bits, the universal unique identifier is padded with random numbers so that the number of characters of the universal unique identifier meets the number of grouping bits.

5. The method for generating a coupon code according to claim 4, characterized in that: Before the universal unique identification code is grouped to form a plurality of character groups, the method further includes: Identify the characters, the identification bits, and the first character total of the characters in the universal unique identifier; Combined with the number of characters in the first character group and the number of digits of the coupon code, it is analyzed whether the total number of the first characters meets the number of digits for grouping.

6. The method for generating a coupon code according to claim 1, characterized in that: After generating the coupon code based on the plurality of coupon code characters, the method further includes: In the historical coupon code library, it is searched whether there is a historical coupon code that is the same as the coupon code; if there is a historical coupon code that is the same as the coupon code, the coupon code is regenerated.

7. A terminal device, characterized in that: Used to generate a coupon code, comprising a processor, used to call instructions stored in a memory, when the instructions are executed, the terminal device executes the method for generating a coupon code according to any one of claims 1-6.

8. A system for generating a coupon code, characterized in that: include: A first terminal device, comprising a processor, configured to call instructions stored in a memory, wherein when the instructions are executed, the terminal device executes the method for generating a coupon code according to any one of claims 1 to 6; The second terminal device is connected to the first terminal device. When the first terminal device generates the coupon code, the coupon code is registered in the second terminal device. The second terminal device is also used to redeem the coupon code.

9. The coupon code generation system according to claim 8, characterized in that: Also includes: A mobile terminal, wherein the mobile terminal sends a request instruction for applying for the coupon code to the first terminal device; the mobile terminal is also used to receive the coupon code generated by the first terminal device.

10. A storage medium, characterized in that: The storage medium stores at least one instruction, which is loaded and executed by the processor to implement the operation performed by the coupon code generation method according to any one of claims 1 to 6.