CN114297985A - Method, device and storage medium for generating product information unordered codes - Google Patents

Method, device and storage medium for generating product information unordered codes Download PDF

Info

Publication number
CN114297985A
CN114297985A CN202111370043.5A CN202111370043A CN114297985A CN 114297985 A CN114297985 A CN 114297985A CN 202111370043 A CN202111370043 A CN 202111370043A CN 114297985 A CN114297985 A CN 114297985A
Authority
CN
China
Prior art keywords
code
code table
character
coded
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111370043.5A
Other languages
Chinese (zh)
Inventor
蒋艳凰
孙朝辉
万斌
赵丽霞
曾果
雷鹏
杨淼
刘蹦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Genetalks Bio Tech Changsha Co ltd
Original Assignee
Genetalks Bio Tech Changsha Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Genetalks Bio Tech Changsha Co ltd filed Critical Genetalks Bio Tech Changsha Co ltd
Priority to CN202111370043.5A priority Critical patent/CN114297985A/en
Publication of CN114297985A publication Critical patent/CN114297985A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention discloses a method, a device and a storage medium for generating a product information disordered code, wherein the method comprises the following steps: s01, inputting a numerical value to be coded, a coding character set for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer; s02, performing scrambling processing on the coded character set for more than two times, wherein one scrambling processing is performed by using the code table to control parameter values, and generating a code table after all scrambling processing is completed; and S03, coding the numerical value to be coded by using the code table to generate the final product information code. The invention can realize the disordered coding of the product information and has the advantages of simple realization method, low cost, high coding efficiency, difficult guess and solution, high safety and reliability and the like.

Description

Method, device and storage medium for generating product information unordered codes
Technical Field
The present invention relates to the field of product coding technologies, and in particular, to a method, an apparatus, and a storage medium for generating a product information unordered code.
Background
Before the product is put into use, various product information such as production date, production batch, product codes and other various related information need to be identified, and a user can conveniently inquire various information of the product. Product information usually adopts a coding mode to represent various information, and product information codes can be used for representing product information and verifying the legal identity of a user. If the product provider provides the product code to the user, the user obtains the corresponding product service according to the product code, and the service provider verifies the validity of the user according to the product code, so that the product code needs to have the characteristic of being difficult to disassemble so as to ensure the safety and reliability of use. At present, product coding usually adopts simple pure digital representation or a simple sequential coding mode, namely product information is coded in sequence, the pure digital or sequential coding mode is simple and is very easy to guess, for example, continuous pure digital numbering is usually one more mantissa, and other numbers can be easily guessed through adjacent digital numbering, so the traditional coding mode is not suitable for occasions with higher requirements on the safety and reliability of product coding.
For example, in the field of gene detection, detection reagents, sampling instructions and information cards need to be packaged into sampling boxes, the detection reagents are of various types, each type can be applied to different detection items, and a customer needs to select and confirm which detection item is selected and confirmed by a user at a terminal. The general procedure for gene detection is thus generally: after a user freely selects a detection item, the user can obtain a user sampling box with user information, and the user returns a sample to the detection mechanism after sampling the sample; the verification code which is registered for the first time is used at the user terminal, the user information is registered by binding the sampling box codes, and the registered user can check the detection report on line. The reliability of the encoding of the sample box, which is used as key information for verifying whether the registrant is a legal user, plays a particularly important role in the whole detection process.
For the above-mentioned coding of the sample box, the conventional method is to directly use the pure digital sequential coding of 6 bits, but the pure digital coding is too simple and is easy to guess, and the coding is continuously generated to further increase the possibility of guessing the coding, for example, the continuous coding of the sample box is usually to increase one in mantissa delivery, and the other numbers of the sample box can be guessed through the numbers of the adjacent sample boxes, so that the cases of malicious binding registration, code number complement occupation, etc. frequently occur, and the legal normal user cannot normally successfully register.
In order to solve the problem that the pure digital sequence coding method is too simple, a practitioner proposes to adopt a random out-of-order code generation method to improve the complexity of coding, but the random out-of-order code generation method is easy to generate repeated conflicts, so that the coding needs to be stored each time, the generated coding needs to be compared with the existing coding after each generation to confirm whether the coding exists, a large number of comparison and confirmation operations need to be performed, the actual generation efficiency is very low, meanwhile, the coding needs to be verified again before use to ensure that the coding does not have repetition, the actual use efficiency is also low, and the actual detection operation is not convenient. Therefore, it is desirable to provide a product information encoding method that can achieve both the security and the efficiency.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the technical problems in the prior art, the invention provides the method, the device and the storage medium for generating the product information disordered code, which have the advantages of simple implementation method, low cost, high coding efficiency, difficult guessing and high safety and reliability, and can efficiently realize the disordered code of the product information.
In order to solve the technical problems, the technical scheme provided by the invention is as follows:
a method of generating a product information chaotic code, the steps comprising:
s01, inputting a numerical value to be coded, a coding character set for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer;
s02, performing scrambling processing on the code character set for more than two times, wherein one scrambling processing is performed by using the code table to control parameter values, and generating a code table after all scrambling processing is completed;
and S03, coding the numerical value to be coded by using the code table to generate the final product information code.
Further, the step of step S02 includes:
s201, performing initial scrambling processing on the coded character set according to a preset rule to obtain an initial scrambled sequence;
and S202, controlling the sequence after the initial scrambling processing obtained in the step S201 by using the code table control parameter value to perform scrambling processing again, and generating and obtaining the code table.
Further, the encoding character set includes two or more character string types, and the step S201 includes: and grouping different character string types in the code character set, turning over character strings of the specified group after grouping, then prepositioning, postpositing character strings of other groups, and performing scrambling processing according to a preset rule to obtain the initial scrambled sequence.
Further, in step S201, the grouped even-numbered character strings are reversed and then placed in front, and the odd-numbered character strings are placed in back, so as to disorder the sequence of the character strings.
Further, the step S202 includes: and taking one target character from the initial sequence after the scrambling processing each time, circularly reading one digit in the code table control parameter value, calculating an insertion index value of the target character inserted into the character position in the initial sequence after the scrambling processing according to the read digit, and inserting the target character into the corresponding position in the initial sequence after the scrambling processing according to the insertion index value.
Further, the insertion index value is obtained by multiplying a value read from the code table control parameter value by the product of the number of cycles and then performing a modulo operation with the character string length of the code table.
Further, the step S03 specifically performs compression encoding on the to-be-encoded numerical value by using the code table, including: and counting the length L of the character string of the code table, dividing the numerical value to be coded by the length L of the character string from the high order, taking the returned quotient as a reading index value, inquiring corresponding characters from the code table according to the reading index value to be used as codes until the quotient returns zero, and generating and obtaining the final product information code.
An apparatus for generating a product information chaotic code, comprising:
the input module is used for inputting a numerical value to be coded, a coding character set used for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer;
the code table generating module is used for performing scrambling processing on the code character set more than twice, wherein one scrambling processing is controlled by using the code table control parameter value, and a code table is generated after all scrambling processing is completed;
and the coding module is used for coding the numerical value to be coded by using the code table to generate the final product information code.
A computer apparatus comprising a processor and a memory, the memory being arranged to store a computer program, the processor being arranged to execute the computer program, and the processor being arranged to execute the computer program to perform the method as described above.
A computer-readable storage medium having stored thereon a computer program which, when executed, implements the method as described above.
Compared with the prior art, the invention has the advantages that:
1. the invention can realize the unordered and unordered coding of the product information by firstly adopting more than two times of scrambling processing to the coded character set and then coding the numerical value to be coded by using the code table to generate the product information code.
2. When the code table is generated, the code character set is firstly subjected to primary scrambling processing once to form a sequence after the primary scrambling processing, then the scrambling processing is carried out again under the control of the code table control parameter values, and the difficulty of guessing and decoding of the code table can be greatly improved by combining the two scrambling processing, so that the codes generated based on the code table are disordered and cannot be guessed and the safety and reliability of the code use are greatly improved.
3. The invention further uses the code table to compress and encode the product information character sequence to be encoded, determines a read index value by combining division operation, inquires corresponding characters from the code table according to the read index value to be used as codes, generates and obtains final product information codes, and compresses and encodes by combining the code table, thereby reducing the number of coded bits, ensuring that the codes are not easy to guess and solve, and reducing the number of coded characters.
Drawings
Fig. 1 is a schematic flow chart of an implementation of the method for generating a product information unordered code according to the embodiment.
Fig. 2 is a detailed flowchart diagram illustrating implementation of the unordered encoding of the product information according to the embodiment.
FIG. 3 is a flow chart illustrating the generation of a product information unordered code according to an embodiment of the present invention.
FIG. 4 is a schematic diagram of the first scrambling process in an embodiment of the present invention.
FIG. 5 is a schematic diagram of a second scrambling process in an exemplary embodiment of the invention.
Fig. 6 is a schematic structural diagram of the apparatus for generating a product information unordered code according to the present embodiment.
Detailed Description
The invention is further described below with reference to the drawings and specific preferred embodiments of the description, without thereby limiting the scope of protection of the invention.
As shown in fig. 1, the steps of the method for generating the product information unordered code of the present embodiment include:
s01, inputting a numerical value to be coded, a coded character set for generating a code table and a code table control parameter value, wherein the numerical value to be coded is a decimal integer;
s02, performing scrambling processing on the coded character set for more than two times, wherein the scrambling processing for one time is controlled by using a code table control parameter value, and generating a code table after all scrambling processing is completed;
and S03, coding the numerical value to be coded by using a code table to generate a final product information code.
In the embodiment, the code table is generated by firstly adopting more than two times of scrambling processing on the code character set, then the code table is used for coding the numerical value to be coded to generate the product information code, the disordered and disordered coding of the product information can be realized, because the code table is subjected to more than two times of scrambling processing, the character strings in the code table are not normally ordered but arranged in a disordered manner, therefore, the code generated based on the code table is high in coding efficiency and difficult to guess and decode, meanwhile, the decoding can be conveniently realized based on the code table, namely, the original data can be restored by decoding, so that the code can be conveniently and quickly verified to be legally effective after being decoded, and the safety and reliability of the code use are ensured.
The integer used by the computer is a decimal number, and the encoding for converting the integer into the character string is to express a numerical value by taking the length of a character set as a binary system, for example, the character set with 0-9 and a-z has the length of 36, the character set with 0-9a-z can be used for expressing a 36-binary system number, and the encoding is to convert the decimal number into the 36-binary system, and the more characters are, the larger the expressible binary system is. In 36 character set coding, when coding sequentially, 0 is coded as 0, 9 is coded as 9, 10 is coded as a, 11 corresponds to b, and so on, 35 is expressed as z, and values within 36 are corresponding to the character sets of 0-9 a-z. The disorder coding is to disorder the corresponding order, so that the coded character set is a corresponding relation that the numerical values and the characters are not in order in disorder ordering. The disorder character set formed by the code character set is a code table used in coding and is used as a corresponding relation between numerical values and characters.
In the embodiment, the code table is generated by scrambling the sequence of the coded character set, the disordered coding can be realized based on the disordered code table, the same code table can be obtained by inputting the same parameters, and the same coded value can be obtained by using the same code table to code the integer, so that the generated code can be conveniently decoded. For product information including time, batch, vendor number and the like, the method is used for coding according to the method, the disordered coding can be realized based on the disordered code table, and if the time, batch, vendor number and other information can be quickly restored based on the code table and the coding rule, different types of data can be conveniently separated, such as time, batch and number are sequentially output.
The encoding character set in the present embodiment includes two or more types of character strings, such as numbers, letters, and the like, that is, the encoding character set is formed by mixing two or more types of character strings, such as numbers, letters, and the like. In this embodiment, step S01 inputs a value to be encoded (integer), an encoding character set, and a code table control parameter value according to actual requirements, where the code table control parameter value is used to control generation of a subsequent code table. To ensure consistency, the input code character set may be sorted first, for example, by placing the number sequence representing time at the head and the letter sequence representing code at the tail according to a uniform rule, and if there is other information, the other information may be arranged in order. The sorting order of the input encoding character set can be determined according to actual requirements, and if the characters need to be placed at the head and the characters need to be placed at the tail, the sorting order can be configured according to requirements.
The step S02 in this embodiment includes:
s201, performing initial scrambling processing on the coded character set according to a preset rule to obtain an initial scrambled sequence;
and S202, controlling the sequence after the initial scrambling processing obtained in the step S201 by using a code table control parameter value to perform scrambling processing again, and generating a code table.
When the code table is generated, the initial scrambling processing is firstly carried out for one time to form the sequence after the initial scrambling processing, then the scrambling processing is carried out again under the control of the code table control parameter values, the difficulty of guessing and decoding of the code table can be greatly improved by combining two different scrambling processing operations, the codes generated finally based on the code table are disordered and cannot be guessed and the safety and the reliability of code use are greatly improved.
Step S201 of this embodiment specifically includes: grouping different character string types in the code character set, turning character strings of a designated group after grouping and then prepositioning the character strings, postpositing character strings of other groups and scrambling the character strings according to a preset rule to obtain an initial scrambled sequence. For a coded character set formed by mixing different character string types, if a traditional random out-of-order coding mode is directly adopted, the original sequence is difficult to accurately restore subsequently, the coded character set is grouped according to the character string types and then subjected to scrambling according to the grouping, each type of character string is taken as one group, if the sequence sequentially comprises a date formed by a number string and a number formed by a letter string, the number string is taken as one group and the letter string is taken as one group, then the character string in each group is subjected to scrambling by taking the group as a unit, the character string in part of the group is overturned and then preposed, and the character string in part of the group is subjected to scrambling and then postpositioned, so that the character sequence can be scrambled by using different character types effectively.
Specifically, even groups of grouped character strings can be reversed and then preposed, and odd groups of character strings can be postpositioned and the sequence of the character strings can be disordered. Of course, the odd-numbered character strings and the even-numbered character strings may be reversed and scrambled, and the specific scrambling mode for each group may be configured according to actual requirements. The grouping mode can also be configured according to actual requirements, for example, grouping is performed by adopting the length input by the user in a customized manner.
The simple scrambling sequence processing of the input sequence is still easy to guess, and in this embodiment, after the initial scrambling processing operation is performed on the encoded character set, the code table is further used to control the parameter values to perform the scrambling processing again, so that the finally formed code can truly realize disorder and is not easy to guess. In this embodiment, the step S202 specifically includes: and taking one target character from the sequence after the initial scrambling processing each time, circularly reading one digit in a code table control parameter value, calculating an insertion index value of the target character inserted into the character position in the sequence after the initial scrambling processing according to the read digit, and inserting the target character into the corresponding position in the sequence after the initial scrambling processing according to the insertion index value. The insertion index value is obtained by multiplying a value read from a code table control parameter value by the product of the number of cycles and then performing a modulo operation with the character string length of the code table. After the processing, each character in the sequence after the initial scrambling processing can be reinserted to form a disordered code table.
In a specific application embodiment, a code table control parameter value is set as a mask value, a code table character string length is used as a circulation condition, a single character is taken from the tail of a character string (after initial scrambling processing), a one-digit number is read from the mask value, the product of the read one-digit value and the circulation number (the number of circulation) is multiplied, then the product and the character string length are modulo, and a modulus value is used as an insertion index value for inserting the character back into the character string (after initial scrambling processing). The above-mentioned, through getting the module with the length of the character string, can guarantee the index value will not be greater than the length of the character string. The whole cycle number is the product of the length of the character string and the mask digit number.
The code table generation of the embodiment is obtained by two times of scrambling, and can actually be obtained by more than three times of scrambling according to actual requirements, each time of scrambling can adopt different modes, the last time of scrambling is to control the parameter value to generate the final code table by using the code table, and the execution sequence of each time of scrambling and scrambling can be configured according to the actual requirements.
In this embodiment, the step S03 specifically performs compression encoding on the to-be-encoded numerical value by using a code table, including: counting the length L of the character string of the code table, dividing the numerical value to be coded by the length L of the character string from the high order, taking the returned quotient as a reading index value, inquiring the corresponding character from the code table according to the reading index value as a code until the quotient returns zero, and generating and obtaining the final product information code. By carrying out compression encoding in combination with the code table, the number of coded bits can be reduced, and the encoding length can be reduced while ensuring that the encoding is not easy to guess.
In a specific application embodiment, when encoding is performed by using a code table as shown in fig. 2, the character string length L (code table) is counted, the character string length L is divided by the encoding numerical value N from a high order, a division operation combining the operation results of a divisor and a remainder is adopted, the character string length L is used as a divisor, the encoding numerical value is used as a dividend, a quotient and a remainder are returned, then the above evaluation steps are repeated until the quotient returns to zero, each quotient pair is used as a reading index value after the calculation is completed, and the code table is searched and converted into a corresponding character string by reading the index value, so that the final product information encoding is obtained.
If the numerical value to be coded is a long integer, a discontinuous number and letter mixed code can be formed through the coding mode of the embodiment, so that the ordered product numbers of the integers are converted into unordered product information numbers, the generated numbers are mixed character strings formed by various character types, the expression range of each bit can reach more than 60 bits, the code length can be shortened compared with a pure number mode, meanwhile, the codes generated by two continuous numbers are completely different, other numbers cannot be guessed through one number, the numbers are disordered through the codes, and the numbers are not easy to guess.
The method of the present invention is further described below by way of example of implementing chaotic encoding of cartridge information in the field of gene testing in specific application embodiments.
As shown in fig. 3, the detailed implementation flow of generating the out-of-order encoding of the sample box in the present embodiment is as follows:
step 1: inputting a character set to be coded of the information of the sampling box and inputting a code table control parameter value mask for controlling the generation of the code table.
The specific input character set is: importing a character set: 0123456789A B C D E F G H I J K L M NO P Q R S T U V W X Y Z.
Mask is specifically an integer of 10, and in this embodiment, 739 is specifically taken.
Step 2: code table generation
Step 2.1: first scrambling
As shown in fig. 4, firstly, the character sets to be encoded are grouped according to the input length, that is:
a first set of strings: 0123456789A B
A second set of strings: c D E F G H I J K L M N
Third group character string: OpQRSmUWXYZ
Then, the even character strings are reversed and preposed, and the odd group is postpositioned and disordered:
if the second group of character strings is an even number, the character strings are turned into NMLKJIHG F E D C, and the first group of character strings is arranged in front, and the disordered characters are finally generated as follows:
N M L K J I H G F E D C 0 1 2 3 4 5 6 7 8 9 A B O P Q R S T U V W X Y Z
step 2.2: performing a second scrambling process based on the mask value
Reading each digit in a cycle as an index of the position of the inserted character, specifically taking the length of the character string as a cycle condition, taking a single character from the tail of the character string each time, reading a digit from a mask value, taking a modulus of the product of the read digit multiplied by the cycle number and the length of the character string, and taking a modulus as an index value for inserting the character back into the character string, wherein the number of the whole cycle is the product of the length of the character string and the number of the mask digit.
As shown in fig. 5, first, the last character ' Z ' of the character string is taken, the mask value takes the first digit 7, and Z ' is inserted into the position with the character string index value of 7, as shown in (a) of fig. 5; then reading the character 'Y' at the end of the character string, reading the mask with the second digit of 3, and inserting the 'Y' into the position with the index value of 3 of the corresponding character string, as shown in (b) in FIG. 5; then, the character 'X' is read from the end of the character string, the second bit number of the mask is 9, and the 'X' is inserted into the position of the corresponding character string index value of 9, as shown in (c) of FIG. 5; when the second pass is executed circularly, the character 'W' is read at the end of the character string, the mask value takes the first digit of 7, 7 times the number of cycles 2 equals to 14, the index of the 'W' character string inserted back into the character string changes from 7 to 14, the 'W' character string is inserted back into the position of the character string 14, the same operation is executed later until the characters are listed completely, and a final code table is generated, as shown in (d) in FIG. 5.
And step 3: encoding using code tables
Counting the length L of the character string of the code table, dividing the numerical value to be coded into the length L of the character string from the high order integer to obtain the integral multiple of the length of the character string, namely, taking the length of the code table as a divisor, taking the coded value as a dividend, returning a quotient and a remainder, repeatedly using the quotient integer divided length L of the character string, taking the remainder pair obtained in each integer division process as a reading index value, inquiring corresponding characters in the code table according to the reading index value, and finally coding the original digital bar code to be coded into the character string with mixed numbers and letters.
The invention can be applied to product information coding in the gene detection field and can also be applied to other occasions requiring coding which is not easy to guess.
As shown in fig. 6, the apparatus for generating a product information unordered code of the present embodiment includes:
the input module is used for inputting a numerical value to be coded, a coding character set used for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer;
the code table generating module is used for performing scrambling processing on the code character set more than twice, wherein the scrambling processing is performed by using code table control parameter value control, and a code table is generated after all scrambling processing is completed;
and the coding module is used for coding the numerical value to be coded by using the code table to generate the final product information code.
The code table generating module in this embodiment includes:
the initial scrambling processing unit is used for performing initial scrambling processing on the coded character set according to a preset rule to obtain an initial scrambling processed sequence;
and the secondary scrambling processing unit is used for controlling the primary scrambled sequence obtained by the primary scrambling processing unit to be scrambled again by using the code table control parameter value to generate and obtain the code table.
In this embodiment, the initial scrambling processing unit specifically groups different character string types in the encoded character set, turns over and then precedes the character strings of the designated group after grouping, and succeeds and scrambles the character strings of the other groups according to a preset rule to obtain an initial sequence after scrambling. Specifically, even-numbered character strings after grouping are reversed and then are arranged in front, and odd-numbered character strings are arranged in back and the sequence of the character strings is disordered.
In this embodiment, the secondary scrambling processing unit specifically takes one target character from the sequence after the initial scrambling processing each time, circularly reads a single digit in the control parameter value of the code table, calculates an insertion index value of the target character inserted into a character position in the sequence after the initial scrambling processing according to the read digit, and inserts the target character into a corresponding position in the sequence after the initial scrambling processing according to the insertion index value. The insertion index value is obtained by multiplying the value read from the code table control parameter value by the number of cycles, and then performing a modulo operation with the character string length of the code table.
In this embodiment, the compression encoding of the encoded character set by the encoding module using the code table specifically includes: counting the length L of the character string of the code table, dividing the numerical value to be coded by the length L of the character string from the high order, taking the returned quotient as a reading index value, inquiring the corresponding character from the code table according to the reading index value as a code until the quotient returns zero, and generating and obtaining the final product information code.
The device for generating the product information disordered code in this embodiment corresponds to the method for generating the product information disordered code, and is not described herein again.
The computer apparatus of this embodiment includes a processor and a memory, where the memory is used for storing a computer program, the processor is used for executing the computer program, and the processor is used for executing the computer program to perform the above method.
The present embodiment provides a computer-readable storage medium storing a computer program, which when executed implements the method described above.
Those skilled in the art will appreciate that the above description of a computer apparatus is by way of example only and is not intended to be limiting of computer apparatus, and that the apparatus may include more or less components than those described, or some of the components may be combined, or different components may be included, such as input output devices, network access devices, buses, etc. The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
The modules/units integrated by the computer device may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program to instruct related hardware to complete, and the computer program may be stored in a computer readable storage medium, and when being executed by a processor, the computer program may implement the steps of the foregoing various embodiments of the template tagging-based distributed crawler method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, electrical signals, software distribution media, and the like.
The foregoing is considered as illustrative of the preferred embodiments of the invention and is not to be construed as limiting the invention in any way. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical spirit of the present invention should fall within the protection scope of the technical scheme of the present invention, unless the technical spirit of the present invention departs from the content of the technical scheme of the present invention.

Claims (10)

1. A method of generating a product information unordered code, comprising the steps of:
s01, inputting a numerical value to be coded, a coding character set for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer;
s02, performing scrambling processing on the code character set for more than two times, wherein one scrambling processing is performed by using the code table to control parameter values, and generating a code table after all scrambling processing is completed;
and S03, coding the numerical value to be coded by using the code table to generate a final product information code.
2. The method for generating a product information unordered code according to claim 1, wherein the step of step S02 includes:
s201, performing initial scrambling processing on the coded character set according to a preset rule to obtain an initial scrambled sequence;
and S202, controlling the sequence after the initial scrambling processing obtained in the step S201 by using the code table control parameter value to perform scrambling processing again, and generating and obtaining the code table.
3. The method for generating the unordered code of product information according to claim 2, wherein the code character set includes more than two character string types, and the step S201 includes: and grouping different character string types in the code character set, turning over character strings of the specified group after grouping, then prepositioning, postpositing character strings of other groups, and performing scrambling processing according to a preset rule to obtain the initial scrambled sequence.
4. The method according to claim 3, wherein in step S201, even groups of grouped character strings are reversed and then placed in front, odd groups of character strings are placed in back, and the sequence of character strings is scrambled.
5. The method for generating a product information unordered code according to claim 2, wherein the step S202 comprises: and taking one target character from the initial sequence after the scrambling processing each time, circularly reading one digit in the code table control parameter value, calculating an insertion index value of the target character inserted into the character position in the initial sequence after the scrambling processing according to the read digit, and inserting the target character into the corresponding position in the initial sequence after the scrambling processing according to the insertion index value.
6. The method of claim 5, wherein the insertion index value is obtained by multiplying a value read from the code table control parameter value by the number of cycles and then modulo the length of the string of the code table.
7. The method for generating the product information unordered code according to any one of claims 1 to 6, wherein the step S03 specifically comprises performing compression coding on the numerical value to be coded by using the code table, and comprises the following steps: and counting the length L of the character string of the code table, dividing the numerical value to be coded by the length L of the character string from the high order, taking the returned quotient as a reading index value, inquiring corresponding characters from the code table according to the reading index value to be used as codes until the quotient returns zero, and generating and obtaining the final product information code.
8. An apparatus for generating a product information chaotic code, comprising:
the input module is used for inputting a numerical value to be coded, a coding character set used for generating a code table and a code table control parameter value, wherein the numerical value to be coded is an integer;
the code table generating module is used for performing scrambling processing on the code character set more than twice, wherein one scrambling processing is controlled by using the code table control parameter value, and a code table is generated after all scrambling processing is completed;
and the coding module is used for coding the numerical value to be coded by using the code table to generate the final product information code.
9. A computer arrangement comprising a processor and a memory, the memory being adapted to store a computer program, the processor being adapted to execute the computer program, wherein the processor is adapted to execute the computer program to perform the method according to any of claims 1-7.
10. A computer-readable storage medium storing a computer program, wherein the computer program when executed implements the method of any one of claims 1 to 7.
CN202111370043.5A 2021-11-18 2021-11-18 Method, device and storage medium for generating product information unordered codes Pending CN114297985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111370043.5A CN114297985A (en) 2021-11-18 2021-11-18 Method, device and storage medium for generating product information unordered codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111370043.5A CN114297985A (en) 2021-11-18 2021-11-18 Method, device and storage medium for generating product information unordered codes

Publications (1)

Publication Number Publication Date
CN114297985A true CN114297985A (en) 2022-04-08

Family

ID=80966206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111370043.5A Pending CN114297985A (en) 2021-11-18 2021-11-18 Method, device and storage medium for generating product information unordered codes

Country Status (1)

Country Link
CN (1) CN114297985A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686759A (en) * 2023-01-04 2023-02-03 恒丰银行股份有限公司 Method and system for calculating unique identification code of virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686759A (en) * 2023-01-04 2023-02-03 恒丰银行股份有限公司 Method and system for calculating unique identification code of virtual machine
CN115686759B (en) * 2023-01-04 2023-04-07 恒丰银行股份有限公司 Method and system for calculating unique identification code of virtual machine

Similar Documents

Publication Publication Date Title
DK2122527T3 (en) Autentificeringsanordning and procedure
CN108989287B (en) Encryption method, device, terminal equipment and storage medium
CN110489466B (en) Method and device for generating invitation code, terminal equipment and storage medium
Goldie et al. Communication theory
JPS6228895B2 (en)
US9886597B2 (en) Method for encoding data on a chip card by means of constant-weight codes
CN109493054B (en) Multi-chain information management method, device, storage medium and block chain identity analyzer
CN107534549B (en) Readable storage medium, method and system for encrypting data stream block
US10043036B1 (en) Systems and methods for tokenization to support pseudononymization of sensitive data
CN114297985A (en) Method, device and storage medium for generating product information unordered codes
AU2021216571A1 (en) Generating emoji sequence identifications to identify wallet addresses for blockchain wallets
JP5656593B2 (en) Apparatus and method for decoding encoded data
US20150304103A1 (en) Method of generating unique and hardly predictable numbers of coupons
JPS60502080A (en) Facsimile machine for run length coding
CN110554878A (en) data conversion method, game data processing method and device and server
CN110532290B (en) Information verification device, method and storage medium based on block chain
CN117708847A (en) 3C product leasing platform data processing method based on data compression and encryption
CN113095042B (en) Character string encryption method, system, device and storage medium
CN111639475B (en) Product code generation method and device and electronic equipment
CN112688696B (en) Method, apparatus, device and storage medium for finite field coding and decoding
CN110942127B (en) Method, system and storage medium for encrypting reagent two-dimensional code information of medical instrument
CN114943205A (en) Method, system, storage medium and electronic equipment for generating identity recognition code UUID
JP6273224B2 (en) ENCRYPTION SYSTEM, ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD
CN114626338A (en) Character encoding method, character decoding method, character encoding system, character decoding system, character encoding device, character decoding device, and storage medium
CN115510811A (en) Character string encoding and decoding methods, encoding device and decoding device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination