Product serial number generation method and device, storage medium and electronic equipment

By calculating and searching the verification characters with the basic serial number and the basis number, and combining the basis data to generate verification characters, the problem of user inputting incorrect serial numbers in the existing technology is solved, and the correctness verification of the product serial number is achieved and traceability improvement.

CN119089894APending Publication Date: 2024-12-06TCL TECH ELECTRONICS (HUIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411098861.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively check and prevent users from entering incorrect product serial numbers, resulting in insufficient traceability.

Method used

By generating the basic serial number and calculating it with the predetermined number of the pre-calculated number, the verification characters are obtained, and the verification characters are searched in combination with the basic serial number, the verification characters are generated and combined with the basic serial number to form the product serial number to ensure its correctness. sex.

Benefits of technology

The correctness verification of the product serial number is realized, preventing users from entering incorrect serial number, and improving the traceability and accuracy of the serial number.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089894A_ABST
    Figure CN119089894A_ABST
Patent Text Reader

Abstract

The invention discloses a product serial number generation method and device, a storage medium and electronic equipment, and relates to the technical field of product serial numbers, and the method comprises the steps that a basic serial number is generated according to a serial number rule, and the basic serial number comprises at least one reference bit; calculating the at least one reference bit and a predetermined system number to obtain a reference value; calculating the reference value and the system number to obtain a check character position; and searching characters corresponding to the positions of the verification characters from the system data of the predetermined system to obtain the verification characters, the verification characters being used for being combined with the basic serial number to obtain a product serial number. According to the method, the product serial number for correctness verification can be generated, and a user is prevented from inputting a wrong product serial number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of product serial numbers, and in particular to a method, device, storage medium and electronic device for generating a product serial number. Background Art

[0002] At present, products on the market usually have independent serial numbers, which can include the serial numbers of product parts or the serial numbers of the entire product. The purpose of this is to facilitate product traceability.

[0003] Currently, product serial numbers are usually generated by customer-defined serial number rules. For example, for a 10-digit serial number, the customer specifies that the first and second digits are the year, the third and fourth digits are the month, the fifth and sixth digits are the date, and the eighth to tenth digits are the production serial number.

[0004] The serial numbers generated by the current method have a certain degree of traceability, but it is usually impossible to effectively verify whether the product serial number entered by the user is correct, and it is impossible to effectively prevent the user from entering an incorrect product serial number. Summary of the invention

[0005] The embodiment of the present application provides a product serial number generation solution, which can generate a product serial number that is correctness-checked to prevent users from entering an incorrect product serial number.

[0006] The embodiments of the present application provide the following technical solutions:

[0007] According to one embodiment of the present application, a method for generating a product serial number includes: generating a basic serial number according to a serial number rule, wherein the basic serial number includes at least one reference digit; calculating the at least one reference digit with a base number of a predetermined base to obtain a reference value; calculating the reference value with the base number to obtain a check character position; searching for a character corresponding to the check character position from base data of the predetermined base to obtain a check character, wherein the check character is used to be combined with the basic serial number to obtain a product serial number.

[0008] In some embodiments of the present application, calculating the at least one reference digit with a predetermined base number to obtain a reference value includes: iteratively summing the predetermined base number with the at least one reference digit, and iteratively adjusting according to the base number to obtain the reference value.

[0009] In some embodiments of the present application, the iterative summation of the base number based on the predetermined base and the at least one reference bit, and the iterative adjustment according to the base number to obtain the reference value includes: according to the formula T = (... ((((M + a n )||M *2)|| (M+1) +a (n-1) )|| M *2|| (M+1) +...+a1)|| M Iterative summation and adjustment are performed to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and a n Indicates the first reference bit of the at least one reference bit.

[0010] In some embodiments of the present application, calculating the reference value and the base number to obtain the check character position includes: calculating the check character position according to the formula (W+T)mod M=1mod M, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

[0011] In some embodiments of the present application, after generating the basic serial number according to the serial number rule, the method further includes: determining a variable in the basic serial number according to the serial number rule; and determining the variable in the basic serial number as the at least one reference bit.

[0012] According to one embodiment of the present application, a method for generating a product serial number includes: in response to an instruction to start a serial number generation interface, displaying a serial number generation page, wherein the serial number generation page includes a data input control and a generation trigger control; in response to triggering of the generation trigger control, according to any of the methods described in the foregoing items of the present application, using the data input in the data input control to generate and display the product serial number.

[0013] In some embodiments of the present application, the serial number generation page also includes a serial number quantity input control; the use of the data entered in the data input control to generate and display the product serial number includes: based on the target quantity entered in the serial number quantity input control, using the data entered in the data input control to generate and display a target number of the product serial numbers.

[0014] According to one embodiment of the present application, a device for generating a product serial number includes: a basic serial number generation module, which is used to generate a basic serial number according to a serial number rule, wherein the basic serial number includes at least one reference digit; a first calculation module, which is used to calculate the at least one reference digit with a base number of a predetermined base to obtain a reference value; a second calculation module, which is used to calculate the reference value with the base number to obtain a check character position; and a product serial number generation module, which is used to search for a character corresponding to the check character position from the base data of the predetermined base to obtain a check character, wherein the check character is used to be combined with the basic serial number to obtain a product serial number.

[0015] In some embodiments of the present application, the first calculation module is used to: iteratively sum the base number of the predetermined base and the at least one reference bit, and iteratively adjust according to the base number to obtain the reference value.

[0016] In some embodiments of the present application, the first calculation module is used to: according to the formula T = (... ((((M + a n )|| M *2)|| (M+1) +a (n-1) )|| M *2|| (M+1) +...+a1)|| M Iterative summation and adjustment are performed to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and a n Indicates the first reference bit of the at least one reference bit.

[0017] In some embodiments of the present application, the second calculation module is used to calculate the check character position according to the formula (W+T)mod M=1modM, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

[0018] In some embodiments of the present application, after the basic serial number is generated according to the serial number rule, the device also includes a reference module, which is used to: determine the variables in the basic serial number according to the serial number rule; and determine the variables in the basic serial number as the at least one reference bit.

[0019] According to one embodiment of the present application, a product serial number generating device includes: a page display module, which is used to display a serial number generation page in response to a serial number generation interface opening instruction, wherein the serial number generation page includes a data input control and a generation trigger control; a serial number generation display module, which is used to generate and display the product serial number using the data input in the data input control in response to the triggering of the generation trigger control according to the method described in any of the preceding items of the present application.

[0020] In some embodiments of the present application, the serial number generation page also includes a serial number quantity input control; the serial number generation and display module is used to: generate and display the target number of product serial numbers based on the target number entered in the serial number quantity input control and using the data entered in the data input control.

[0021] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer executes the method described in the embodiment of the present application.

[0022] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0023] According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0024] In an embodiment of the present application, a basic serial number is generated according to a serial number rule, wherein the basic serial number includes at least one reference digit; the at least one reference digit is calculated with a base number of a predetermined base to obtain a reference value; the reference value is calculated with the base number to obtain a check character position; a character corresponding to the check character position is searched from base data of the predetermined base to obtain a check character, and the check character is used to be combined with the basic serial number to obtain a product serial number.

[0025] In this way, after the basic serial number is generated according to the serial number rules, at least one reference position in the basic serial number is calculated with a predetermined base number to obtain a reference value; the reference value is calculated with the base number to obtain a check character position; then, the character corresponding to the check character position is searched from the predetermined base number data to obtain a check character, and the product serial number is obtained based on the combination of the check character and the basic serial number. The correctness of the product serial number can then be effectively verified with the help of the check character, thereby generating a product serial number that is verified for correctness, preventing users from entering incorrect product serial numbers. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A flow chart of a method for generating a product serial number according to an embodiment of the present application is shown.

[0028] Figure 2 A schematic diagram of check character calculation according to an embodiment of the present application is shown.

[0029] Figure 3 A 35-base data table according to an embodiment of the present application is shown.

[0030] Figure 4 A flow chart of a method for generating a product serial number according to another embodiment of the present application is shown.

[0031] Figure 5 A diagram of a product serial number generation interface according to an embodiment of the present application is shown.

[0032] Figure 6 A block diagram of a device for generating a product serial number according to an embodiment of the present application is shown.

[0033] Figure 7 A block diagram of a device for generating a product serial number according to an embodiment of the present application is shown.

[0034] Figure 8 A block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0036] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements in the method or apparatus including the element (such as a step in the method or a unit in the apparatus, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0037] For example, the product serial number generation method provided by the embodiment of the present disclosure includes a series of steps, but the product serial number generation method provided by the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the product serial number generation device provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to including the units explicitly recorded, and may also include units required to obtain relevant information or perform processing based on the information.

[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0039] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0040] Figure 1 A flowchart of a method for generating a product serial number according to an embodiment of the present application is schematically shown. The execution subject of the method for generating a product serial number can be any device or server with processing capabilities, such as a computer, a mobile phone, a smart watch, and a home appliance, and the server is a cloud server or a physical server. In a specific embodiment of the present application, the execution subject is specifically a device, and a generation interface can be provided in the device for the user to operate to generate a product serial number.

[0041] like Figure 1 As shown, the product serial number generating method may include steps S110 to S140.

[0042] Step S110, generating a basic sequence number according to a sequence number rule, wherein the basic sequence number includes at least one reference bit;

[0043] Step S120, calculating the at least one reference digit with a predetermined base number to obtain a reference value;

[0044] Step S130, calculating the reference value and the base number to obtain a check character position;

[0045] Step S140, searching the base data of the predetermined base for a character corresponding to the position of the check character to obtain a check character, wherein the check character is used to be combined with the basic serial number to obtain a product serial number.

[0046] The serial number rule is a rule for generating a basic serial number, which can be customized by the user according to actual needs. For example, a serial number rule is QAAABCDEEEEF, where, from left to right, Q is a fixed code; AAA is a product code; B is the year of production, 0 represents 2024, 1 represents 2025, and so on (without the letter I, in order to distinguish it from the number "1"); C is the month of production, 0 corresponds to January, 1 corresponds to February, and so on..., A corresponds to November, B corresponds to December; D is the day of the production month, 0 corresponds to the first day of the month, 1 corresponds to the second day of the month, and so on (without the letter I); EEEE is a product serial code, from 0001 to 9999, which is reset every day; F is a reserved character, which can be fixed to Z. The basic serial number generated according to the serial number rule is the conventional product serial number in the prior art, and there is no check character.

[0047] Some or all characters may be selected from the basic serial number as at least one reference digit. For example, 10 variables AAABCDEEEE in “QAAABCDEEEEF” may be selected as a reference digit respectively.

[0048] Calculate at least one reference digit with a predetermined base number to obtain a reference value, wherein the predetermined base is, for example, decimal or 35-base. In one example, the predetermined base is a user-defined 35-base, and the corresponding base number is 35. Calculate at least one reference digit with the base number 35 to obtain a reference value.

[0049] Further, the reference value and the base number are calculated to obtain a check character position, which is a position in the base data of the predetermined base. Then, the character corresponding to the check character position is searched from the base data of the predetermined base as the obtained check character. For example, the check character position obtained by calculating the reference value 26 and the base number 35 is 10, and the character at the 10th position can be searched from the base data of the 35 base as the check character.

[0050] Combining the check character with the basic serial number can obtain a product serial number with the check character, which can effectively verify the correctness of the product serial number with the help of the generation rule of the check character.

[0051] In this way, after the basic serial number is generated according to the serial number rules, at least one reference position in the basic serial number is calculated with a predetermined base number to obtain a reference value; the reference value is calculated with the base number to obtain a check character position; then, the character corresponding to the check character position is searched from the predetermined base number data to obtain a check character, and the product serial number is obtained based on the combination of the check character and the basic serial number. The correctness of the product serial number can then be effectively verified with the help of the check character, thereby generating a product serial number that is verified for correctness, preventing users from entering incorrect product serial numbers.

[0052] Described below Figure 1 When generating a product serial number under the embodiment, further optional specific embodiments are provided under each step performed.

[0053] In one embodiment, the calculation of the at least one reference digit and a predetermined base number to obtain a reference value includes: iteratively summing the predetermined base number and the at least one reference digit, and iteratively adjusting according to the base number to obtain the reference value.

[0054] Iteratively summing a predetermined base number with at least one reference digit, and iteratively adjusting according to the base number, to obtain a reference value, which can be associated with each reference digit and under the constraint of the base number, based on the reference value, the check character position of the check character can be effectively calculated from the predetermined base base data.

[0055] Further, the iterative summing of the base number based on the predetermined base and the at least one reference bit, and iteratively adjusting according to the base number to obtain the reference value may include:

[0056] According to the formula T=(...((((M+a n )|| M *2)|| (M+1) +a (n-1) )||M *2|| (M+1) +...+a1)|| M Iterative summation and adjustment are performed to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and a n Indicates the first reference bit of the at least one reference bit.

[0057] See also Figure 2 In one embodiment of the present application, the predetermined base is a user-defined base 35 (which can ensure that the generated serial number has sufficient digital and character information), and the base number M corresponding to the base 35 is 35. Taking the basic serial number "M0000400001Z" as an example, at least one reference digit is "0000400001", according to the formula T=(...((((M+a n )|| M *2)|| (M+1) +a (n-1) )|| M *2|| (M+1) +...+a1)|| M The process of iterative summing and adjustment may include the following: Figure 2 In the steps 1 to 10 shown, the reference bit 26 is obtained in step 11.

[0058] Specifically, step 1, P j =M=35,a n-j+i =0, j=1, i=1, P j +a n-j+i =M+a n =S j =35, then, based on the base number M, adjust (M+a n )|| M =S i || 35 =35; then, (M+a n )|| M *2=S i || 35 *2=P j+i =70, then, based on the base number M, adjust ((M+a n )|| M *2)|| (M+1) =P j+i || 36 =34. Based on the "adjusted next calculation product P" obtained in step 1 j+i || 36 " will be used as the initial product P for the next step 2 jSince at least one reference bit is "0000400001", each reference bit is used as Figure 2 The next string a n-j+i ", taking step 1 as an example, iterative summation and adjustment are performed in sequence, and the final reference bit can be obtained as 26.

[0059] Further, the “adjusted value (ie (***)||)” is adjusted according to the base number M. M or (***)|| (M+1) The value in the brackets)”, each step specifically includes: the first step of adjustment and the second step of adjustment, in which M is used as the anchor value to adjust the adjusted value, and in the second step of adjustment, M+1 is used as the anchor value to adjust the adjusted value. If the adjusted value is less than or equal to the anchor value, the adjusted value is used as the adjusted value; if the adjusted value is greater than the anchor value, the value obtained by subtracting the anchor value from the adjusted value is used as the adjusted value. For example, Figure 2 In step 9, in the first adjustment of step 9, the adjusted value S i =24 is less than the anchor value 35, so the adjusted value S i || 35 =24; in the second adjustment of step 9, the adjusted value P j+i =48 is greater than the anchor value 36, so the adjusted value P j+i || 36 =48-36=12.

[0060] Further, in one embodiment, the calculating the reference value and the base number to obtain the check character position includes: calculating the check character position according to the formula (W+T)mod M=1mod M, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

[0061] According to the formula (W+T)mod M=1mod M, the reference value W+check character position T is congruent with 1MOD M. Figure 2 , if the reference value W is 26 and the base number M is 35, 1mod 35=1, (26+T)mod35 is also equal to 1, so 26+T=36, and the check character position T is 10. Further, if Figure 3 In the 35-base data table shown, when the check character position T is 10, the character at the 10th position is 9. At this time, the check character is 9.

[0062] Furthermore, in some embodiments, after generating the basic serial number according to the serial number rule, the method further includes: determining a variable in the basic serial number according to the serial number rule; and determining the variable in the basic serial number as the at least one reference bit.

[0063] For example, in the serial number rule QAAABCDEEEEF, where Q and F are fixed values, the variables in the basic serial number under this rule are the values ​​of the positions "AAABCDEEEE". By determining the variables in the basic serial number as at least one reference bit, the check character can be verified based only on the variables, reducing the amount of calculation while ensuring the validity of the check character.

[0064] Furthermore, Figure 4 The flowchart of a method for generating a product serial number according to an embodiment of the present application is schematically shown. The execution subject of the method for generating a product serial number can be any device with processing capabilities, such as a computer, a mobile phone, a smart watch, and a home appliance. The device as the execution subject can display a serial number generation interface for the user to operate and generate a product serial number.

[0065] like Figure 4 As shown, the product serial number generating method may include steps S210 to S220.

[0066] Step S210, in response to the serial number generation interface opening instruction, display the serial number generation page, the serial number generation page including a data input control and a generation trigger control; step S220, in response to the triggering of the generation trigger control, according to the method described in any of the preceding items of the present application, use the data entered in the data input control to generate and display the product serial number.

[0067] The serial number generation interface start instruction is an instruction for triggering the display of the serial number generation page. The user can trigger the generation of the serial number generation interface start instruction by voice control or screen touch. The device displays the serial number generation page in response to the serial number generation interface start instruction. The user can input the required data through the data input control, and trigger the generation of the trigger control by clicking or pressing, so that the device can generate and display the product serial number using the data input in the data input control according to any of the methods described in the preceding paragraphs of the present application.

[0068] In one scenario, the serial number generation page is as follows Figure 5In the interface shown, the data input control includes input boxes corresponding to "M", "Product Code", "Year", "Month", "Day", "Starting Serial Number" and "Z", etc., and the corresponding data can be entered in the input boxes. The generation trigger control is a button of "Generate SN". When the user clicks the "Generate SN" device, the device can generate and display the product serial number using the data entered in the data input control according to the method described in any of the preceding items of this application. For example, the product serial number such as "M0010550001ZY" is displayed in the display area, where the last character Y is the check character (i.e., the check code).

[0069] Furthermore, in one embodiment, the serial number generation page also includes a serial number quantity input control; the use of the data entered in the data input control to generate and display the product serial number may include: based on the target quantity entered in the serial number quantity input control, using the data entered in the data input control to generate and display a target number of the product serial numbers.

[0070] For example, Figure 5 As shown, the serial number generation page also includes an input box corresponding to the "product quantity" for the serial number quantity input control. The target quantity can be entered through the input box corresponding to the "product quantity". If the target quantity is 50, 50 product serial numbers can be generated, wherein "digits 8 to 11" in these 50 product serial numbers progress from the starting serial number 0001 to 0050 in sequence, thereby enabling batch generation of product serial numbers containing check characters.

[0071] In order to facilitate better implementation of the product serial number generation method provided in the embodiment of the present application, the embodiment of the present application also provides a product serial number generation device based on the above product serial number generation method. The meanings of the terms are the same as those in the above product serial number generation method, and the specific implementation details can refer to the description in the method embodiment. Figure 6 A block diagram of a device for generating a product serial number according to an embodiment of the present application is shown.

[0072] like Figure 6 As shown, the product serial number generating device 300 may include: a basic serial number generating module 310 can be used to generate a basic serial number according to a serial number rule, and the basic serial number includes at least one reference digit; a first calculation module 320 can be used to calculate the at least one reference digit with a predetermined base number to obtain a reference value; a second calculation module 330 can be used to calculate the reference value with the base number to obtain a check character position; a product serial number generating module 340 can be used to search for a character corresponding to the check character position from the predetermined base data to obtain a check character, and the check character is used to be combined with the basic serial number to obtain a product serial number.

[0073] In some embodiments of the present application, the first calculation module is used to: iteratively sum the base number of the predetermined base and the at least one reference bit, and iteratively adjust according to the base number to obtain the reference value.

[0074] In some embodiments of the present application, the first calculation module is used to: iteratively sum and adjust according to the formula T = (...((((M+an)||M*2)||(M+1)+a(n-1))||M*2||(M+1)+...+a1)||M to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and an represents the first reference bit among the at least one reference bit.

[0075] In some embodiments of the present application, the second calculation module is used to calculate the check character position according to the formula (W+T)mod M=1modM, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

[0076] In some embodiments of the present application, after the basic serial number is generated according to the serial number rule, the device also includes a reference module, which is used to: determine the variables in the basic serial number according to the serial number rule; and determine the variables in the basic serial number as the at least one reference bit.

[0077] Figure 7 A block diagram of a device for generating a product serial number according to an embodiment of the present application is shown.

[0078] like Figure 7 As shown, the product serial number generating device 400 may include: a page display module 410 can be used to respond to the serial number generation interface opening instruction to display the serial number generation page, and the serial number generation page includes a data input control and a generation trigger control; the serial number generation display module 420 can be used to respond to the triggering of the generation trigger control, according to any of the methods described in the foregoing items of the present application, using the data input in the data input control to generate and display the product serial number.

[0079] In some embodiments of the present application, the serial number generation page also includes a serial number quantity input control; the serial number generation and display module is used to: generate and display the target number of product serial numbers based on the target number entered in the serial number quantity input control and using the data entered in the data input control.

[0080] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0081] In addition, the present application also provides an electronic device, such as Figure 8 As shown, Figure 8 A block diagram of an electronic device according to an embodiment of the present application is shown, specifically:

[0082] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 8 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0083] in:

[0084] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0085] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0086] The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0087] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0088] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 will run the computer programs stored in the memory 502, thereby realizing various functions in the aforementioned embodiments of the present application.

[0089] For example, the processor 501 may execute the following steps:

[0090] Generate a basic serial number according to a serial number rule, wherein the basic serial number includes at least one reference digit; calculate the at least one reference digit with a base number of a predetermined base to obtain a reference value; calculate the reference value with the base number to obtain a check character position; search for a character corresponding to the check character position from base data of the predetermined base to obtain a check character, wherein the check character is used to be combined with the basic serial number to obtain a product serial number.

[0091] In some embodiments of the present application, calculating the at least one reference digit with a predetermined base number to obtain a reference value includes: iteratively summing the predetermined base number with the at least one reference digit, and iteratively adjusting according to the base number to obtain the reference value.

[0092] In some embodiments of the present application, the iterative summation of the base number based on the predetermined base and the at least one reference bit, and the iterative adjustment according to the base number to obtain the reference value includes: according to the formula T = (... ((((M + a n )|| M *2)|| (M+1) +a (n-1) )|| M *2|| (M+1) +...+a1)|| M Iterative summation and adjustment are performed to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and a n Indicates the first reference bit of the at least one reference bit.

[0093] In some embodiments of the present application, calculating the reference value and the base number to obtain the check character position includes: calculating the check character position according to the formula (W+T)mod M=1mod M, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

[0094] In some embodiments of the present application, after generating the basic serial number according to the serial number rule, the method further includes: determining a variable in the basic serial number according to the serial number rule; and determining the variable in the basic serial number as the at least one reference bit.

[0095] For another example, the processor 501 may execute the following steps:

[0096] In response to an instruction to open a serial number generation interface, a serial number generation page is displayed, wherein the serial number generation page includes a data input control and a generation trigger control; in response to triggering of the generation trigger control, according to the method described in any of the preceding items of the present application, the product serial number is generated and displayed using the data entered in the data input control.

[0097] In some embodiments of the present application, the serial number generation page also includes a serial number quantity input control; the use of the data entered in the data input control to generate and display the product serial number includes: based on the target quantity entered in the serial number quantity input control, using the data entered in the data input control to generate and display a target number of the product serial numbers.

[0098] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0099] To this end, an embodiment of the present application further provides a storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application.

[0100] The storage medium may be a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0101] Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0102] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0103] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A method for generating a product serial number, characterized in that: include: Generate a basic sequence number according to a sequence number rule, wherein the basic sequence number includes at least one reference bit; Calculating the at least one reference bit with a number in a predetermined base to obtain a reference value; Calculate the reference value and the base number to obtain a check character position; The character corresponding to the position of the check character is searched from the base data of the predetermined base to obtain the check character, and the check character is used to be combined with the basic serial number to obtain the product serial number.

2. The method for generating a product serial number according to claim 1, characterized in that: The step of calculating the at least one reference bit with a predetermined base number to obtain a reference value comprises: The reference value is obtained by iteratively summing a base number based on the predetermined base and the at least one reference bit, and iteratively adjusting according to the base number.

3. The method for generating a product serial number according to claim 2, characterized in that: The iterative summing of the base number based on the predetermined base and the at least one reference bit, and iteratively adjusting according to the base number to obtain the reference value includes: According to the formula T=(...((((M+a n )|| M *2)|| (M+1) +a (n-1) )|| M *2|| (M+1) +...+a1)|| M Iterative summation and adjustment are performed to obtain the reference value, wherein T is the reference value, M is the base number, || represents adjustment, n represents the total number of the at least one reference bit, and a n Indicates the first reference bit of the at least one reference bit.

4. The method for generating a product serial number according to any one of claims 1 to 3, characterized in that: The step of calculating the reference value and the base number to obtain a check character position includes: The check character position is calculated according to the formula (W+T)mod M=1mod M, wherein T refers to the check character position, W refers to the reference value, mod refers to the modulo operation, and M refers to the base number.

5. The method for generating a product serial number according to any one of claims 1 to 3, characterized in that: After generating the basic sequence number according to the sequence number rule, the method further includes: According to the sequence number rule, determining the variables in the basic sequence number; A variable in the basic sequence number is determined as the at least one reference bit.

6. A method for generating a product serial number, characterized in that: include: In response to a serial number generation interface opening instruction, a serial number generation page is displayed, wherein the serial number generation page includes a data input control and a generation trigger control; In response to the triggering of the generation trigger control, according to the method according to any one of claims 1 to 5, the product serial number is generated and displayed using the data input in the data input control.

7. The method for generating a product serial number according to claim 6, characterized in that: The serial number generation page also includes a serial number quantity input control; the use of the data input in the data input control to generate and display the product serial number includes: According to the target quantity inputted in the serial number quantity input control, the target quantity of the product serial numbers is generated and displayed using the data inputted in the data input control.

8. A device for generating a product serial number, characterized in that: include: A basic sequence number generating module, used to generate a basic sequence number according to a sequence number rule, wherein the basic sequence number includes at least one reference bit; A first calculation module, configured to calculate the at least one reference bit and a number in a predetermined base to obtain a reference value; A second calculation module, used for calculating the reference value and the base number to obtain a check character position; The product serial number generating module is used to search the character corresponding to the check character position from the base data of the predetermined base to obtain the check character, and the check character is used to combine with the basic serial number to obtain the product serial number.

9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 7.