Coding method, decoding method, coding device, decoding device and storage medium

Through the multi-level identification code encoding method, the combination and expression of the first and second types of identifiers is used to improve the anti-counterfeiting function of the QR code, solve the counterfeiting problems caused by the single QR code encoding method, and enhance the product Traceability and brand trust.

CN119227716APending Publication Date: 2024-12-31SHENZHENSHI YUZHAN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411274381.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing QR code encoding method is single and easy to be copied, resulting in a negative impact on product quality and lack of effective anti-counterfeiting functions.

Method used

Using a multi-level identification code encoding method, the complexity and diversity of the identification code are increased through the combination of the first and second class identifiers, and an identification code containing the first subclass identifier and the second subclass identifier are generated. , use different expression forms to identify information to improve the anti-counterfeiting function of the identification code.

Benefits of technology

It enhances the anti-counterfeiting function of the logo code, improves its characteristics and information capacity, effectively prevents the replication of counterfeit and inferior products, and enhances the traceability of the product and brand trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227716A_ABST
    Figure CN119227716A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a coding method and device, a decoding method and device and a storage medium. The method comprises the steps of obtaining to-be-coded information; encoding the to-be-encoded information to generate an identification code; the identification code comprises a first type of identifier and a second type of identifier; the first class identifier comprises at least one first sub-class identifier; the first subclass identifier at least comprises a first identifier and a second identifier, and the first subclass identifier is used for identifying first information through an identifier contained in the first subclass identifier; the second type identifier is used for identifying second information, and the first information is different from the second information. According to the coding method provided by the embodiment of the invention, the anti-counterfeiting function of the identification code can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and specifically to an encoding method, a decoding method, a device and a storage medium. Background Art

[0002] With the increasing competition in modern times, all enterprises are using various methods and means to improve product quality and production efficiency. Among them, using identification codes to identify product information or to locate problematic products or machines is an important means. At present, identification codes, as a data carrier with large information capacity and convenient application, have attracted widespread attention. For example, identification codes can be QR codes. QR code anti-counterfeiting verification is popular, simple, and convenient, and consumers do not need to bear any costs, which increases the anti-counterfeiting verification rate. Its traceability function makes consumers more assured, and they have a deeper understanding of the product and enhance their trust in the product brand.

[0003] However, the QR code encoding method is relatively simple and the QR code is easy to copy. If it is pasted on counterfeit and shoddy products, it will have a great negative impact on product quality. Summary of the invention

[0004] In view of this, the present application provides an encoding method, a decoding method, a device and a storage medium to help solve the problem of poor anti-counterfeiting function of identification codes in the prior art.

[0005] In a first aspect, an embodiment of the present application provides an encoding method, including:

[0006] Obtain information to be encoded;

[0007] The information to be encoded is encoded to generate an identification code; the identification code includes a first-category identifier and a second-category identifier; the first-category identifier includes at least one first-subcategory identifier; the first-subcategory identifier includes at least a first identifier and a second identifier, the first-subcategory identifier is used to identify the first information through the identifier it contains; the second-category identifier is used to identify the second information, and the first information is different from the second information.

[0008] In a possible implementation manner of the first aspect, the first subcategory identifier is further used to identify the third information through at least one representation form of the identifier contained therein.

[0009] In a possible implementation manner of the first aspect, for each first subclass identifier, the sum of the areas of each identifier included in the first subclass identifier is less than or equal to the area of ​​the first subclass identifier; and the size of the first subclass identifier is the same as that of the second class identifier.

[0010] In a possible implementation manner of the first aspect, a center point of each identifier included in the first subcategory identifier is located in a region range of the first subcategory identifier.

[0011] In a possible implementation manner of the first aspect, the first category identifier includes at least two first subcategory identifiers, and the representation forms of the identifiers included in the at least two first subcategory identifiers are not completely the same;

[0012] The representation form of the identifier contained in the first subcategory identifier includes at least one of the position relationship of the identifier, the size relationship of the identifier, and the shape of the identifier.

[0013] In a possible implementation of the first aspect, the first category identifier includes at least one group of first subcategory identifiers; each group of first subcategory identifiers includes n first subcategory identifiers, and the representation of the n first subcategory identifiers changes according to a first preset rule; n is an integer greater than 1.

[0014] In a possible implementation manner of the first aspect, the representation forms of the n first subclass identifiers are changed according to a first preset rule, including:

[0015] In the first direction, the areas of the first identifiers of the n first subcategory identifiers decrease in sequence according to a first preset change amount, and the areas of the second identifiers increase in sequence according to a second preset change amount.

[0016] In a possible implementation manner of the first aspect, the representation forms of the n first subcategory identifiers are changed according to a first preset rule, including:

[0017] In the first direction, the areas of the first identifiers of the first i first subclass identifiers among the n first subclass identifiers decrease in sequence according to the first preset change amount, and the areas of the second identifiers increase in sequence according to the second preset change amount; the areas of the first identifiers of the last ni first subclass identifiers increase in sequence according to the third preset change amount, and the areas of the second identifiers decrease in sequence according to the fourth preset change amount.

[0018] In a possible implementation manner of the first aspect, the first category identifier also includes a second subcategory identifier; the second subcategory identifier is used to identify the first information, and the second subcategory identifier is different from the first subcategory identifier.

[0019] In a possible implementation manner of the first aspect, encoding the information to be encoded to generate an identification code includes:

[0020] Determine the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier contained in the identification code based on the information to be encoded;

[0021] Based on the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier, the information to be encoded is encoded to generate the identification code.

[0022] In a possible implementation of the first aspect, the present invention further includes:

[0023] determining a target position of the first subclass identifier based on the position of the first subclass identifier;

[0024] The encoding process of the information to be encoded based on the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier to generate the identification code comprises:

[0025] According to a second preset rule, a first encoding is performed on the first subclass identifier at the target position; the second preset rule is used to identify the representation form of the first subclass identifier at the target position;

[0026] According to a first preset rule, performing a second encoding on the first subclass identifier at other positions; the first preset rule is used to identify the expression form of the first subclass identifier at the other positions;

[0027] According to a third preset rule, the second subclass identifier and the second class identifier are third-encoded based on the position of the second subclass identifier and the position of the second class identifier to generate the identification code; the third preset rule is used to identify the expression form of the second subclass identifier and the second class identifier;

[0028] The target position includes the starting position and / or the ending position of the first subcategory identifier.

[0029] In a possible implementation manner of the first aspect, the method further includes: if there are multiple identification codes, the expression forms at the target positions of the multiple identification codes change according to the second preset rule.

[0030] In a second aspect, an embodiment of the present application provides a decoding method, including:

[0031] Acquire an identification code; the identification code includes a first-category identifier and a second-category identifier; the first-category identifier includes at least one first-subcategory identifier; the first-subcategory identifier includes at least a first identifier and a second identifier, the first-subcategory identifier is used to identify first information through the identifier contained therein; the second-category identifier is used to identify second information, and the first information is different from the second information;

[0032] determining a type of the identification code based on the identification code;

[0033] Parsing the first type of identifier in the identification code into the first information, parsing the second type of identifier in the identification code into the second information, and obtaining identification information corresponding to the identification code;

[0034] Based on the type of the identification code and identification information corresponding to the identification code, the target content identified by the identification code is determined.

[0035] In a possible implementation manner of the second aspect, the method further includes:

[0036] identifying a first subcategory identifier contained in the identification code;

[0037] Based on at least one representation form of the identifier included in the first subcategory identifier, third information is obtained.

[0038] In a third aspect, an embodiment of the present application provides a coding device, comprising a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the coding device is triggered to execute any method described in the first aspect above.

[0039] In a fourth aspect, an embodiment of the present application provides a decoding device, comprising a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the decoding device is triggered to execute any method described in the second aspect above.

[0040] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect or any method described in the second aspect.

[0041] The scheme provided by the embodiment of the present application is adopted to obtain information to be encoded; the information to be encoded is encoded and processed to generate an identification code; wherein the identification code includes: a first-class identifier and a second-class identifier; the first-class identifier includes at least one first-subclass identifier; the first-subclass identifier includes a first identifier and a second identifier. The combination of the first identifier and the second identifier is used to identify the first information, and the first identifier and the second identifier are also used to identify the third information through at least one form of expression, and the third information identified by different forms of expression is different. The second-class identifier is used to identify the second information, and the first information is different from the second information. Thus, in the embodiment of the present application, the first information is identified by the first-class identifier in the identification code, and the third information is identified by the second-class identifier. In order to increase the complexity of the identification of the first information, the first information can be identified by the combination of the first identifier and the second identifier, and the forms of expression of the first identifier and the second identifier can be changed. That is, in the embodiment of the present application, the complexity of the identification code can be increased by increasing the complexity of the identification of the first information, thereby improving the characteristics of the identification code and enhancing the anti-counterfeiting function of the identification code. Moreover, by identifying the third information by the forms of expression of the first identifier and the second identifier, the diversity of the identification code identification information can be increased, and the anti-counterfeiting function of the identification code can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0043] Figure 1 A schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0044] Figure 2a An exemplary schematic diagram of an encoding method provided in an embodiment of the present application;

[0045] Figure 2b An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0046] Figure 3a An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0047] Figure 3b An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0048] Figure 4a An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0049] Figure 4b An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0050] Figure 5 An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0051] Figure 6 An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0052] Figure 7 (1) is an exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0053] Figure 7 (2) is an exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0054] Figure 8 (1) is an exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0055] Figure 8 (2) is an exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of another encoding method provided in an embodiment of the present application;

[0057] Fig.10 An exemplary schematic diagram of another encoding method provided in an embodiment of the present application;

[0058] Fig.11a A schematic diagram of a coding process of a coding method provided in an embodiment of the present application;

[0059] Fig.11b A schematic diagram of an encoding process of another encoding method provided in an embodiment of the present application;

[0060] Fig.12 A flowchart of a decoding method provided in an embodiment of the present application;

[0061] Fig.13a An exemplary schematic diagram of a decoding method provided in an embodiment of the present application;

[0062] Fig.13b An exemplary schematic diagram of another decoding method provided in an embodiment of the present application;

[0063] Fig.14 A flowchart of another decoding method provided in an embodiment of the present application;

[0064] Fig.15 A schematic diagram of the structure of an encoding device provided in an embodiment of the present application;

[0065] Fig.16 A schematic diagram of the structure of a decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0067] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0068] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0069] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0070] In the related art, an identification code is usually used to identify product information, or to locate a problem product or a problem machine. At present, due to the large amount of information contained in a QR code, a QR code is often used as an identification code. However, the QR code encoding method is relatively simple, and the QR code is easy to copy. If it is pasted on a counterfeit or inferior product, it will have a great negative impact on the product quality.

[0071] In view of the above problems, an embodiment of the present application provides a coding method, obtaining information to be coded; coding the information to be coded to generate an identification code; wherein the identification code includes: a first-class identifier and a second-class identifier; the first-class identifier includes at least one first sub-class identifier; the first sub-class identifier includes a first identifier and a second identifier. The combination of the first identifier and the second identifier is used to identify the first information, and the first identifier and the second identifier are also used to identify the third information through at least one form of expression, and the third information identified by different forms of expression is different. The second-class identifier is used to identify the second information, and the first information is different from the second information. Thus, in the embodiment of the present application, the first information is identified by the first-class identifier in the identification code, and the third information is identified by the second-class identifier. In order to increase the complexity of the first information identification, the first information can be identified by the combination of the first identifier and the second identifier, and the forms of expression of the first identifier and the second identifier can be changed. That is, in the embodiment of the present application, the complexity of the identification code can be increased by increasing the complexity of the first information identification, thereby improving the characteristics of the identification code and enhancing the anti-counterfeiting function of the identification code. Moreover, by identifying the third information by the forms of expression of the first identifier and the second identifier, the diversity of the identification information of the identification code can be increased, and the anti-counterfeiting function of the identification code can be further improved. The following is a detailed description.

[0072] See also Figure 1 , is a flow chart of an encoding method provided in an embodiment of the present application. Figure 1 As shown, the method includes:

[0073] Step S101: Obtain information to be encoded.

[0074] In the embodiment of the present application, if it is necessary to generate an identification code, it is necessary to obtain the information required to represent the identification code, that is, the information to be encoded. The encoding device can obtain the information to be encoded from a server, a storage device, or other devices. The encoding device can also receive the information to be encoded sent by the user. Alternatively, the encoding device can also obtain the information to be encoded from the cloud. Of course, the encoding device can also obtain the information to be encoded by other means, which is not limited by the embodiment of the present application.

[0075] In order to improve product quality and reduce defective rates, the product information produced can be marked during the product production process, and the marked product information can be used as information to be encoded. In some embodiments, the marked product information can be relevant information of the machine when the product is produced, so that when a defective product is found, the marked product information can be traced back to the problematic machine. That is, the marked product information is the traceability information of the product, and the traceability information of the product can be used as information to be encoded, so as to generate a traceability code based on the information to be encoded.

[0076] Alternatively, in other embodiments, the marked product information may be relevant information of the product, such as the origin and production batch of the product, so as to obtain the information of the product through the marked information. Of course, the information to be encoded may represent other information, which is not limited in the embodiments of the present application.

[0077] It should be noted that the information to be encoded can be pre-set according to actual needs, for example, it can include production time information, production equipment information, production location information, etc., and the embodiments of the present application are not limited to this.

[0078] Step S102: Encode the information to be encoded to generate an identification code.

[0079] Among them, the identification code includes a first-category identifier and a second-category identifier; the first-category identifier includes at least one first-subcategory identifier; the first-subcategory identifier includes at least a first identifier and a second identifier, the first-subcategory identifier is used to identify the first information, the second-category identifier is used to identify the second information, and the first information is different from the second information.

[0080] In the embodiment of the present application, after the encoding device obtains the information to be encoded, it can encode the information to be encoded using a preset encoding method to generate an identification code. When encoding the information to be encoded, the first type of identifier is used to identify the first information in the information to be encoded, and the second type of identifier is used to identify the second information in the information to be encoded.

[0081] In some embodiments, in order to facilitate encoding of the information to be encoded, the information to be encoded may be converted into data in a preset format, for example, into binary data. 1 in the binary data may be used as the first information, and 0 in the binary data may be used as the second information. Of course, data in other formats may also be used to identify the information to be encoded, such as octal data, decimal data, etc., which is not limited in the embodiments of the present application.

[0082] It should be understood that in some embodiments, 0 in binary data can also be used as the first information, and 1 in binary data can also be used as the second information, and the embodiments of the present application are not limited to this. For the convenience of description, the following is an example of taking 1 in binary data as the first information and 0 in binary data as the second information.

[0083] In order to improve the anti-counterfeiting function of the identification code, the first information can be identified by a first-class identifier. Among them, the first-class identifier includes at least one first-subclass identifier, and the first-subclass identifier includes at least a first identifier and a second identifier. That is, at least part of the first information can be identified by at least a combination of the first identifier and the second identifier. That is, when the encoding device encodes the information to be encoded, the first information in the information to be encoded can be encoded by the first-class identifier. Among them, when the first information is encoded using the first-class identifier, at least part of the first information is encoded using the first-subclass identifier. That is, the first information is represented by the first-subclass identifier. In order to improve the anti-counterfeiting function of the information to be encoded, the first-subclass identifier includes at least a first identifier and a second identifier. In this way, the first information can be identified by the identifier contained in the first-subclass identifier. That is, the first information can be encoded by at least a combination of the first identifier and the second identifier, and the second information in the information to be encoded can be encoded by the second-class identifier.

[0084] It should be noted that the first subclass identifier may also include other identifiers. In this case, when the first subclass identifier encodes the first information, it is necessary to identify the first information through all identifiers contained in the first subclass identifier. That is, the first information is identified by a combination of the first identifier, the second identifier and the other identifiers. The embodiment of the present application does not limit the number of identifiers contained in the first subclass identifier. For the convenience of description, the following description is based on the example of the first subclass identifier containing the first identifier and the second identifier.

[0085] For example, suppose that Figure 2a As shown, the first identifier is a dot a with a radius of R1, the second identifier is a dot b with a radius of R2, and the second type of identifier is a square box c with a side length of R3. The information to be encoded can be converted into binary data. Assuming that the information to be encoded converted into binary data is 110110, the 1 in the information to be encoded is encoded using the first type of identifier. The 1 in the data to be encoded is encoded using a combination of the first identifier a and the second identifier b, and the second information in the information to be encoded, that is, 0, is encoded using the second type of identifier c to obtain the identification code d, as shown in FIG. Figure 2b shown.

[0086] In some embodiments, in order to increase the amount of information in the identification code, the first subcategory identifier is also used to identify the third information through at least one representation form of the identifier it contains.

[0087] In the embodiment of the present application, since the first subclass identifier includes at least the first identifier and the second identifier, it includes multiple identifiers. In this way, the identifier included in the first subclass identifier can not only identify the first information, but also identify the third information through at least one representation form among the multiple identifiers included. In some embodiments, different third information can be identified by different representation forms. In other embodiments, in order to improve the anti-counterfeiting function of the identification code, the third information can be identified by the first subclass identifier in multiple representation forms.

[0088] The representation form between the multiple identifiers may be a presentation mode between the multiple identifiers, for example, a relative position relationship, a size relationship, etc. between the multiple identifiers. In some embodiments, the representation form between the identifiers included in the first subcategory identifier includes at least one of a position relationship of the identifiers, a size relationship of the identifiers, and a shape of the identifiers.

[0089] In an embodiment of the present application, since the first subclass identifier includes at least the first identifier and the second identifier, the relative position relationship and / or size relationship and / or shape between the multiple identifiers in the first subclass identifier are different, and the expression form of the identifiers contained in the first subclass identifier is also different, that is, the expression form between the multiple identifiers can be adjusted by adjusting the position relationship and / or size relationship and / or shape between the identifiers contained in the first subclass identifier, and then the third information is identified by at least one expression form.

[0090] The representation form of the identifiers included in the first sub-category identifier and the third information of the corresponding identifier can be preset according to actual needs. For example, the identifiers included in the first sub-category identifier, the representation form of the identifier, and the third information required to be represented can be preset according to actual needs.

[0091] It should be noted that the representation form between the identifiers contained in the first subcategory identifier may also include other presentation methods, which is not limited in this embodiment of the present application.

[0092] As described in the above example, the representation form between the first identifier a and the second identifier b can be preset to identify the third information through the representation form of the first identifier a and the second identifier b. The representation form of the first identifier a and the second identifier b can be the relative position relationship and size relationship between the first identifier a and the second identifier b. For example, the representation form can be set such that the first identifier a is at the upper left of the second identifier b in the first direction, and the radius R1 of the first identifier a is greater than the radius R2 of the second identifier b. The third information can be identified through this representation form, such as Figure 3aAs shown. The representation form between the first identifier and the second identifier can also be changed by changing the relative position relationship or size relationship between the first identifier a and the second identifier b. For example, the representation form can be adjusted so that the first identifier a is set to the lower right of the second identifier b in the first direction, and the radius R1 of the first identifier a is greater than the radius R2 of the second identifier b, as shown in FIG. Figure 3b As shown. Other third information can be represented by the changed representation. Alternatively, one third information can be represented by the above two representations, etc. That is to say, in the embodiment of the present application, different third information can be identified by changing the representation of the identifier in the first subclass identifier, thereby increasing the amount of information in the identification code. The third information can also be identified by multiple representations between the identifiers in the first subclass identifier, thereby improving the anti-counterfeiting function of the identification code.

[0093] In some embodiments, the multiple identifiers included in the first subclass identifier may be in an asymmetric "entangled state". That is, the first subclass identifier includes multiple identifiers, and the relative position relationship and relative size of the multiple identifiers are associated. For example, the first subclass identifier includes a first identifier and a second identifier. Since the size of the first subclass identifier is determined, when the size of the first identifier is determined, the size of the second identifier can also be determined. In this way, when encoding the first information, at least two asymmetric "entangled state" identification codes can be used for encoding, thereby improving the anti-counterfeiting and confidentiality functions of the identification code.

[0094] That is to say, in the encoding method provided in the embodiment of the present application, for part of the first information, the first information is encoded by a first subcategory identifier, and the first subcategory identifier includes two asymmetric "entangled state" identifiers, and the size of the identifier in each path can be set according to a certain rule, and the center point position of each path can also be set according to a certain rule, so that the coding path can form a regular pattern, and the change rule of at least two paths in the first subcategory identifier is pre-set, that is, multi-layer coding change information can be added to the original coding identifier, so that the identification code obtains a special texture, which has extremely high confidentiality and anti-counterfeiting functions.

[0095] As a possible implementation, in order to facilitate the encoding process of the information to be encoded, for each first subclass identifier, the sum of the areas of each identifier included in the first subclass identifier is less than or equal to the area of ​​the first subclass identifier. The size of the first subclass identifier is the same as the size of the second class identifier.

[0096] In an embodiment of the present application, the first category identifier includes at least one first subcategory identifier, and the first subcategory identifier and the second category identifier respectively identify the first information and the second information in the information to be encoded. In order to facilitate encoding, the size of the first subcategory identifier is the same as the size of the second category identifier, so that the size of the identifier used to identify the first information in the generated identification code is the same as the size of the identifier used to identify the second information, so as to facilitate the subsequent parsing of the identification code. Since the first subcategory identifier includes at least the first identifier and the second identifier, the sum of the areas of all identifiers contained in the first subcategory identifier is less than or equal to the area of ​​the first subcategory identifier, that is, the size of each identifier contained in the first subcategory identifier is less than or equal to the size of the first subcategory identifier, and the sum of the sizes of all identifiers in the first subcategory identifier is less than or equal to the size of the first subcategory identifier.

[0097] In some embodiments, a center point of each identifier included in the first subcategory identifier is located in the area range of the first subcategory identifier.

[0098] That is, in order to more accurately encode the first information, and to correctly parse the first information identified by the first subclass identifier when the identification code is subsequently parsed, the center point of each identifier included in the first subclass identifier should be within the area of ​​the first subclass identifier, that is, the center point of each identifier included in the first subclass identifier is gathered within the area of ​​the first subclass identifier to avoid the identifiers included in the first subclass identifier being too dispersed. In some embodiments, each identifier included in the first subclass identifier is located within the area of ​​the first subclass identifier.

[0099] As shown in the above example, it is assumed that the first subclass identifier and the second class identifier can be a rectangular frame of R3*R3, the first subclass identifier contains the first identifier and the second identifier, the first identifier can be a circular identifier with a radius of R1, and the second identifier can be a circular identifier with a radius of R2. The size of the first identifier and the second identifier are both smaller than or equal to the size of the first subclass identifier, and the sum of the areas of the first identifier and the second identifier is smaller than or equal to the area of ​​the first subclass identifier, that is, the sum of the radius R1 and the radius R2 is smaller than half of the diagonal of the rectangular frame. In order to improve the encoding accuracy of the first information, the center points of the first identifier and the second identifier are both located within the area of ​​the rectangular frame. For a clearer representation, the first subclass identifier can be represented in a coordinate system. Assume that the coordinates of the four vertices of the first subclass identifier are (0,0), (0, R3), (R3,0), (R3, R3); the center point of the first identifier is (x1, y1,), and the center point of the second identifier is (x2, y2), then the values ​​of x1 and x2 are both between 0 and a, and the values ​​of y1 and y2 are both between 0 and a. That is, the center point of the first identifier and the center point of the second identifier are always located within the area constructed by (0,0), (0,a), (a,0), (a,a), such as Figure 4a Shown and Figure 4b As shown. Among them, Figure 4a and Figure 4b The first identifier and the second identifier in the first sub-category identifier are two different representation forms. In this way, the representation forms of the first identifier and the second identifier in the first sub-category identifier can represent the third information to increase the information capacity of the identification code. The representation forms of the first identifier and the second identifier in the first sub-category identifier can be adjusted by adjusting the relative position relationship, size relationship, and shape of the first identifier and the second identifier.

[0100] As a possible implementation manner, the first category identifier includes at least two first subcategory identifiers, and the identifiers included in the at least two first subcategory identifiers have different representation forms.

[0101] That is, in order to improve the anti-counterfeiting function of the identification code, the first category identifier includes at least two first subcategory identifiers, and the identifiers contained in the at least two first subcategory identifiers have different expressions. In this way, in the identification code generated by the first category identifier encoding, the expression form of the identifier used to identify the first information can be at least two, that is, there are changes in the identifier used to identify the first information in the identification code, which increases the complexity and specificity of the generated identification code, thereby improving the anti-counterfeiting function of the identification code. In other words, the anti-counterfeiting function of the identification code can be improved by including at least two first subcategory identifiers with different expressions between the identifiers. In some embodiments, the third information can also be represented by the expression form of the identifier, and the complexity of the third information represented by at least two first subcategory identifiers with different identifier expressions is higher, which can improve the anti-counterfeiting function of the identification code while increasing the information capacity of the identification code.

[0102] As a possible implementation manner, the first category identifier includes at least one group of first subcategory identifiers; each group of first subcategory identifiers includes n first subcategory identifiers, and the representation forms of the n first subcategory identifiers vary according to a first preset rule.

[0103] Here, n is an integer greater than 1.

[0104] In the embodiment of the present application, in order to further improve the anti-counterfeiting function of the identification code, the expression form of the first subclass identifier can be variable. That is, the first class identifier includes at least one group of first subclass identifiers, each group of first subclass identifiers includes n first subclass identifiers, and the expression form of the n first subclass identifiers can be changed according to the first preset rule. In other words, at least part of the first information in the information to be encoded can be encoded by at least one group of first subclass identifiers. The expression form of the n first subclass identifiers contained in each group of first subclass identifiers changes according to the first preset rule.

[0105] The first preset rule may be a preset rule of change in the representation forms of the n first subcategory identifiers, and may be preset by the user according to actual needs.

[0106] It should be understood that the representation form of the first sub-category identifier refers to the representation form of the identifier included in the first sub-category identifier, for example, the representation form of the first identifier and the second identifier.

[0107] In some embodiments, the expression forms of the n first subclass identifiers change according to a first preset rule, including: in a first direction, the areas of the first identifiers of the n first subclass identifiers decrease in sequence according to a first preset change amount, and the areas of the second identifiers increase in sequence according to a second preset change amount.

[0108] That is, since the expression form of the first subcategory identifier includes at least one of the positional relationship of the identifiers, the size relationship of the identifiers, and the shape of the identifiers. The expression form of the first subcategory identifier can be changed by adjusting at least one of the positional relationship of the identifiers contained in the first subcategory identifier, the size relationship of the identifiers contained in the first subcategory identifier, and the shape of the identifiers contained in the first subcategory identifier. When the expression form of the first subcategory identifier includes the size relationship of the identifiers, the expression form of the n first subcategory identifiers can be changed according to the first preset rule in a first direction, and the area of ​​the first identifiers of the n first subcategory identifiers decreases successively according to a first preset change amount, and the area of ​​the second identifier increases successively according to a second preset change amount. That is, in each group of first subcategory identifiers, the area of ​​the first identifier of the n first subcategory identifiers gradually decreases, and the area of ​​the second identifier gradually increases, such as Figure 5 shown.

[0109] The first preset variation and the second preset variation are preset according to actual needs. For ease of implementation, the first preset variation and the second preset variation may be the same.

[0110] In some embodiments, if the first category identifier includes at least two groups of first subcategory identifiers, in two adjacent groups of first subcategory identifiers, the first identifier with the smallest area in the former group of first subcategory identifiers is adjacent to the first identifier with the largest area in the latter group.

[0111] That is, the first category identifier includes at least two groups of first subcategory identifiers, and the at least two groups of first subcategory identifiers can be arranged in sequence, and the areas of the first identifiers of the n first subcategory identifiers in each group of first subcategory identifiers are sequentially reduced according to the first preset change amount, and the areas of the second identifiers are sequentially increased according to the second preset change amount. In this way, in two adjacent groups of first subcategory identifiers, the first identifier with the smallest area in the first group of first subcategory identifiers is adjacent to the first identifier with the largest area in the second group.

[0112] In other embodiments, the expression form of the n first subclass identifiers changes according to a first preset rule including: in a first direction, the areas of the first identifiers of the first i first subclass identifiers among the n first subclass identifiers decrease successively according to a first preset change amount, and the areas of the second identifiers increase successively according to a second preset change amount; the areas of the first identifiers of the last ni first subclass identifiers increase successively according to a third preset change amount, and the areas of the second identifiers decrease successively according to a fourth preset change amount.

[0113] That is, when the expression form of the first sub-category identifier includes the size relationship of the identifiers, the expression forms of the n first sub-category identifiers may change according to the first preset rule, and may also be in the first direction, the areas of the first identifiers of the first i first sub-category identifiers among the n first sub-category identifiers gradually decrease according to the first preset change amount, the areas of the second identifiers of the first i first sub-category identifiers gradually increase according to the second preset change amount, the areas of the first identifiers of the last ni first sub-category identifiers gradually increase according to the third preset change amount, and the areas of the second identifiers gradually decrease according to the fourth preset change amount. That is, the first identifiers among the n first sub-category identifiers change according to the rule of first decreasing and then increasing, and the second identifiers change according to the rule of first increasing and then decreasing, such as Figure 6 shown.

[0114] It should be noted that, when the expression form of the first subcategory identifier includes the size relationship of the identifiers, the expression form of the n first subcategory identifiers may change according to the first preset rule or may be other changing rules. For example, the area of ​​the first identifier among the n first subcategory identifiers decreases successively according to the first preset change amount, and the area of ​​the second identifier remains unchanged; or, the area of ​​the first identifier among the n first subcategory identifiers increases successively according to the second preset change amount, and the area of ​​the second identifier remains unchanged, etc. The embodiment of the present application does not limit the expression form of the n first subcategory identifiers.

[0115] In other embodiments, when the representation of the first subclass identifier includes the positional relationship of the identifiers, the representation of the n first subclass identifiers can be set by setting the relative positional relationship between the first identifier and the second identifier in the n first subclass identifiers. For example, the representation of the n first subclass identifiers can be changed according to the first preset rule so that among the n first subclass identifiers, the relative position between the first identifier and the second identifier in the first k first subclass identifiers is that in the first direction, the first identifier is located to the upper left of the second identifier, and the relative position between the first identifier and the second identifier in the last nk first subclass identifiers is that in the first direction, the first identifier is located to the lower right of the second identifier, such as Figure 7 As shown in (1). Alternatively, the representation of the n first subclass identifiers can also be changed according to the first preset rule. Among the n first subclass identifiers, the relative position between the first identifier and the second identifier in the first k first subclass identifiers is that in the second direction, the first k first identifiers are located above the second identifier, and the relative position between the first identifier and the second identifier in the last nk first subclass identifiers is that in the second direction, the first identifier is located below the second identifier, as shown in FIG. Figure 7 As shown in (2), the first direction and the second direction are perpendicular to each other.

[0116] It should be understood that when the expression form of the first subcategory identifier includes the positional relationship of the identifiers, the expression form of the n first subcategory identifiers may change according to the first preset rule or may be other changing rules. For example, among the n first subcategory identifiers, the relative position between the first identifier and the second identifier in the first k first subcategory identifiers is that the first k first identifiers are located above the second identifier in the second direction, and the relative position between the first identifier and the second identifier in the last nk first subcategory identifiers is that the last nk first identifiers are located on the left side of the second identifier in the first direction. Of course, there may be other possible positional relationships. The embodiment of the present application does not limit the expression form of the n first subcategory identifiers.

[0117] In some other embodiments, when the representation form of the first subclass identifier includes the shape of the identifier, the representation form of the n first subclass identifiers can be set by setting the shapes of the first identifier and the second identifier in the n first subclass identifiers. For example, the representation form of the n first subclass identifiers can be changed according to the first preset rule so that among the n first subclass identifiers, the shapes of the first identifier and the second identifier in the first k first subclass identifiers are a circle and a triangle, and the shapes of the first identifier and the second identifier in the last nk first subclass identifiers are a triangle and a circle, such as Figure 8 Alternatively, the representation of the n first subclass identifiers may be changed according to the first preset rule, and the shapes of the first identifier and the second identifier in the first k first subclass identifiers may be a circle and a circle, and the shapes of the first identifier in the last nk first subclass identifiers may be a triangle and a triangle, as shown in FIG. Figure 8 As shown in (2).

[0118] It should be understood that when the expression form of the first subcategory identifier includes the shape of the identifier, the expression form of the n first subcategory identifiers may change according to the first preset rule or may have other changing rules. For example, among the n first subcategory identifiers, the shapes of the first identifier and the second identifier in the first k first subcategory identifiers are that the first identifier is a triangle and the second identifier is a square, and the shapes of the first identifier and the second identifier in the last nk first subcategory identifiers are that the first identifier is a square and the second identifier is a circle, etc. Of course, there may be other possible shapes, and the embodiment of the present application does not limit the expression form of the n first subcategory identifiers.

[0119] In some embodiments, the first category identifier also includes a second subcategory identifier.

[0120] The second subclass identifier is used to identify the first information, and the second subclass identifier is different from the first subclass identifier.

[0121] That is, in the embodiment of the present application, the first information in the information to be encoded can be encoded entirely using the first subclass identifier, or only part of the first information can be encoded using the first subclass identifier, and the other part of the first information can be encoded using the second subclass identifier. In other words, for the first information in the information to be encoded, part of it can be encoded using the first subclass identifier, and part of it can be encoded using the second subclass identifier. In this way, the encoding complexity of the information to be encoded can be increased, thereby improving the anti-counterfeiting function of the information to be encoded.

[0122] It should be understood that the encoding method of the encoding device can be preset, and when encoding the first information, the first information part encoded by the first identifier and the second identifier can also be preset according to actual needs. For example, 50% of the first information in the information to be encoded can be encoded in the form of a combination of the first identifier and the second identifier. Of course, other methods can also be used, and the embodiments of the present application are not limited to this.

[0123] As a possible implementation, Fig. 9 As shown, step S102 performs encoding processing on the information to be encoded, and generates an identification code including:

[0124] Step S1021: Determine the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier contained in the identification code based on the information to be encoded.

[0125] Step S1022: Based on the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier, encode the information to be encoded to generate an identification code.

[0126] That is, after obtaining the information to be encoded, the first subclass identifier, the second subclass identifier and the second class identifier can be used to encode the information to be encoded. That is, part of the first information in the information to be encoded is encoded using the first subclass identifier, part of the first information is encoded using the second subclass identifier, and the second information is encoded using the second class identifier. At this time, in the information to be encoded, the position of the first information encoded using the first subclass identifier, the position of the first information encoded using the second subclass identifier, and the position of the second information are determined. In some embodiments, the information to be encoded can be converted into data information in binary format, and the position of the 1 that needs to be encoded using the first subclass identifier, the position of the 1 that is encoded using the second subclass identifier, and the position of the 0 that is encoded using the second class identifier can be determined in the binary number. After determining the positions of the first subclass identifier, the second subclass identifier and the second class identifier in the information to be encoded, the information to be encoded can be subjected to corresponding encoding processing to obtain an identification code.

[0127] For example, the information to be encoded is converted into binary data, and the binary number is 110110111011110011111. Assuming that in 110110111011110011111, in order from low to high, the first 8 1s are encoded using the first subclass identifier, the remaining 1s are encoded using the second subclass identifier, and the 0s are encoded using the second class identifier. In this way, the starting position and the ending position of the first subclass identifier, the starting position and the receiving position of the second subclass identifier, and the starting position and the ending position of the second class identifier contained in the identification code of the information to be encoded are determined. Based on the starting position and the ending position of the first subclass identifier, the starting position and the receiving position of the second subclass identifier, and the starting position and the ending position of the second class identifier contained in the identification code of the information to be encoded, the information to be encoded is encoded to obtain an identification code, such as Fig.10 As shown. Among them, the first subclass identifier can be preset to include a first identifier and a second identifier, and every 4 first subclass identifiers form a group, that is, each group of first subclass identifiers contains 4 first subclass identifiers, and the first identifier and the second identifier in each group of 4 first subclass identifiers are expressed in the form of a first identifier and a second identifier in a first direction. The area of ​​the first identifier decreases in sequence according to a first preset change amount, and the area of ​​the second identifier increases in sequence according to a second preset change amount. Moreover, the first identifier and the second identifier are both circular, and the first identifier is located at the upper left of the second identifier. When encoding the information to be encoded, it is encoded in the order of low to high bits of the information to be encoded, and the generated identification code can refer to Fig.10 shown.

[0128] In some embodiments, the user can set the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier based on the information to be encoded, and the encoding device can obtain the information of the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier according to the user's setting. In other embodiments, the encoding device can determine the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier according to the preset setting rules based on the acquired information to be encoded. For example, according to the preset setting rules, the first 50% of the first information in the information to be encoded can be encoded using the first subclass identifier, the second 50% of the first information can be encoded using the second subclass identifier, and the second information can be encoded using the second class identifier. Of course, the preset setting rules can also be other rules for determining the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier, and the embodiments of the present application are not limited to this.

[0129] It should be understood that the encoding device can also determine the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier in other ways, and the embodiment of the present application is not limited to this.

[0130] As a possible implementation, the above method further includes:

[0131] Step S1023: Determine the target position of the first subclass identifier based on the position of the first subclass identifier.

[0132] At this time, the above step S1022 performs encoding processing on the information to be encoded based on the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier, and generates an identification code including:

[0133] According to the second preset rule, the first subclass identifier at the target position is first encoded; according to the first preset rule, the first subclass identifier at other positions is second encoded; according to the third preset rule, the second subclass identifier and the second class identifier are third encoded based on the position of the second subclass identifier and the position of the second class identifier to generate an identification code.

[0134] The second preset rule is used to identify the representation of the first subclass identifier at the target location. The first preset rule is used to identify the representation of the first subclass identifier at other locations. The third preset rule is used to identify the representation of the second subclass identifier and the second class identifier.

[0135] In an embodiment of the present application, in order to improve the anti-counterfeiting function of the identification code, the first sub-identifier at the target position can be set to comply with the second preset rule. For example, the first sub-class identifier at the target position can be set to the first sub-class identifier of the target expression form. Based on this, the target position of the first sub-class identifier can be determined in the position of the first sub-class identifier. That is, the target position of the first sub-class identifier can be determined at the position where the first sub-class identifier needs to be encoded. In some embodiments, the target position includes the starting position and / or the ending position of the first sub-class identifier. That is, in some embodiments, the starting position and / or the ending position of the first sub-class identifier in the identification code can be used as the target position. After determining the target position of the first sub-class identifier, when the information to be encoded is encoded, the first sub-class identifier can be first encoded according to the second preset rule at the target position, and the first sub-class identifier can be second encoded according to the first preset rule at other positions of the first sub-class identifier, and the second class identifier and the second sub-class identifier can be third encoded according to the third preset rule at the position of the second class identifier and the second sub-class identifier to generate the identification code. In this way, in the generated identification code, since the expression form of the identifier included in the first subclass identifier at the target position conforms to the second preset rule, the expression form of the identifier included in the first subclass identifier at other positions conforms to the first preset rule, and the expression forms of the second class identifier and the second subclass identifier conform to the third preset rule. That is, the anti-counterfeiting function of the identification code can be improved by setting the expression form of the first subclass identifier, the expression form of the second class identifier and the second subclass identifier in the identification code.

[0136] In some embodiments, at the position of the first subclass identifier, the determined target position of the first subclass identifier may be one or more. When there are multiple target positions of the determined first subclass identifier, the expression form of the first subclass identifier at the multiple target positions may be variable, that is, the second preset rule may pre-set the variation rule of the expression form of the first subclass identifier at the multiple target positions. At this time, the expression form of the first subclass identifier at the multiple target positions changes according to the second preset rule. For details, please refer to the process of the expression form of the n first subclass identifiers changing according to the first preset rule, which will not be repeated here.

[0137] In other embodiments, if there are multiple identification codes, the representation forms of the target positions of the multiple identification codes change according to a second preset rule.

[0138] That is, the second preset rule can also record the changing rules of the expression forms of the first sub-category identifiers at the target positions among the multiple identification codes. In this way, the expression forms of the first sub-category identifiers at the target positions among the multiple identification codes are changed according to the second preset rule, that is, the expression forms of the first sub-category identifiers at the target positions of different identification codes are different, thereby improving the uniqueness and specificity of the identification codes and further improving the anti-counterfeiting function of the identification codes.

[0139] In some embodiments, the encoding device includes a controller, a laser, an electric beam expander, an electric total reflector, a beam combiner and a galvanometer. In an embodiment of the present application, when encoding the information to be encoded, it is necessary to determine the position where the first subclass identifier needs to be encoded, the position where the second subclass identifier needs to be encoded and the position where the second class identifier needs to be encoded, that is, determine the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier. In this way, when encoding the position of the first subclass identifier, the controller can control the laser emitter 1 and the laser 1 emitter 2 to emit laser 2. The laser 1 emitted by the laser emitter 1 can be transmitted to the electric beam expander 1, and the laser 2 emitted by the laser emitter 2 can be transmitted to the electric beam expander 2. The controller can set the swing position of the motor 1 in the electric beam expander 1 according to the size of the first identifier to control the electric beam expander 1 to adjust the focal size of the light spot in the laser 1 through the swing of the motor 1, so that the focal size of the light spot in the laser 1 after adjustment is consistent with the size of the first identifier. Similarly, the controller can set the swing position of the motor 2 in the electric beam expander 2 according to the size of the second identifier to control the electric beam expander 2 to adjust the focal size of the spot in the laser 2 through the swing of the motor 2, so that the focal size of the spot in the laser 2 after adjustment matches the size of the second identifier. The laser 1 adjusted by the electric beam expander 1 is transmitted to the electric total reflector 1, and the controller can set the swing position of the motor in the electric total reflector 1 according to the position of the first identifier to control the electric total reflector 1 to adjust the position of the spot in the laser 1 through the swing of the motor in the electric total reflector 1, so that the position of the spot in the laser 1 after adjustment matches the position of the first identifier. The laser 2 adjusted by the electric beam expander 2 is transmitted to the electric total reflector 2, and the controller can set the swing position of the motor in the electric total reflector 2 according to the position of the first identifier to control the electric total reflector 2 to adjust the position of the spot in the laser 2 through the swing of the motor in the electric total reflector 2, so that the position of the spot in the laser 1 after adjustment matches the position of the first identifier. Laser 1 adjusted by electric total reflector 1 and laser 2 adjusted by electric total reflector 2 are both transmitted to the beam combiner, which combines laser 1 and laser 2 into one laser and transmits the combined laser to the galvanometer. The controller can adjust the parameters in the galvanometer, so that the laser can form different laser points on the surface of the material under the action of the galvanometer and focusing mirror, and obtain the first identifier and the second identifier to form a first sub-category identifier, such as Fig.11a shown.

[0140] When encoding the position of the second subclass identifier, the controller can control the laser 3 to emit a laser. In this way, the laser 3 emitted by the laser 3 can be transmitted to the electric beam expander 3. The controller can set the swing position of the motor 3 in the electric beam expander 3 according to the size of the second subclass identifier to control the adjustment of the focal size of the spot in the laser 3 of the electric beam expander 3 through the swing of the motor 3, so that the focal size of the spot in the laser 3 after adjustment is consistent with the size of the second subclass identifier. The laser 3 adjusted by the electric beam expander 3 is transmitted to the electric total reflector 3. The controller can set the swing position of the motor in the electric total reflector 3 according to the position of the second subclass identifier to control the adjustment of the spot position in the laser 3 by the electric total reflector 3 through the swing of the motor in the electric total reflector 3, so that the spot position in the laser 3 after adjustment is consistent with the position of the second subclass identifier. The laser 3 adjusted by the electric total reflector 3 is transmitted to the galvanometer. The controller can adjust the parameters in the galvanometer, so that the laser 3 can form different laser spots on the surface of the material under the action of the galvanometer and the focusing mirror to obtain the second subclass identifier, such as Fig.11b shown.

[0141] In some embodiments, in order to reduce the difficulty of encoding, when forming laser spots on the information to be encoded, only the first information therein may be formed with laser spots.

[0142] The encoding device can use a combination of a motor and an optical lens to control the size and relative position of the laser spot, and then use the regular changes in the spot size and the regular changes in the relative positions of at least two spots to peel off the paint or oxide layer or regional color changes on the surface of the product, thereby realizing the multiple anti-counterfeiting functions of the identification code. In some embodiments, the encoding method of the embodiment of the present application can be applied to the marking of shipping codes of electronic components, marking of FPC circuit boards, and marking of process codes.

[0143] In this way, in the identification code of the embodiment of the present application, the first information is identified by the first type of identifier, and the third information is identified by the second type of identifier. In order to increase the complexity of the identification of the first information, the first information can be identified by a combination of the first identifier and the second identifier, and the expression form of the first identifier and the second identifier can be changed. That is, by using at least two "entangled" first identifiers and second identifiers to increase the complexity of the first information identification, the complexity of the identification code can be increased, thereby improving the characteristics of the identification code and enhancing the anti-counterfeiting function of the identification code. In addition, by identifying the third information in the expression form of the first identifier and the second identifier, the diversity of the identification code identification information can be increased, further improving the anti-counterfeiting function of the identification code. That is to say, for part of the first information, the first information is encoded by a first subcategory identifier, which includes two asymmetric "entangled state" identifiers, and the size of the identifier in each path can be set according to a certain rule, and the center point position of each path can also be set according to a certain rule, so that the coding path can form a regular pattern, and the change rule of at least two paths in the first subcategory identifier is pre-set, that is, multi-layer coding change information can be added to the original coding identifier, so that the identification code obtains a special texture, which has extremely high confidentiality and anti-counterfeiting functions.

[0144] refer to Fig.12 , is a flowchart of a decoding method provided in an embodiment of the present application. Fig.12 As shown, the method includes:

[0145] Step S1201: Obtain an identification code.

[0146] Among them, the identification code includes a first-category identifier and a second-category identifier; the first-category identifier includes at least one first-subcategory identifier; the first-subcategory identifier includes at least a first identifier and a second identifier, and the first-subcategory identifier is used to identify the first information through the identifier it contains; the second-category identifier is used to identify the second information, and the first information is different from the second information.

[0147] In an embodiment of the present application, after encoding the information to be encoded by the encoding method described in the above embodiment, an identification code is obtained, in which the first information is encoded by the first type of identifier, and the second information is encoded by the second type of identifier. Among them, the first type of identifier includes a first sub-class identifier, and the first sub-class identifier includes at least a first identifier and a second identifier, so that for at least part of the first information, the first information can be encoded by at least the first identifier and the second identifier. When it is necessary to decode the identification code, the identification code can be obtained first.

[0148] Step S1202: Determine the type of the identification code based on the identification code.

[0149] In the embodiment of the present application, since there are many types of identification codes, the information represented in different types of identification codes is also different. After obtaining the identification code, the decoding device needs to determine the type of the identification code. The decoding device can determine the type of the identification code based on the size and shape of the identification code. For example, the size and shape of the one-dimensional code and the two-dimensional code are different, and the decoding device can determine the type of the identification code based on the size, shape and other information of the obtained identification code.

[0150] Step S1203: Parse the first type of identifier in the identification code into first information, and parse the second type of identifier in the identification code into second information, to obtain identification information corresponding to the identification code.

[0151] In the embodiment of the present application, after obtaining the identification code, the decoding device can parse the identification code, identify the first type of identifier in the identification code and parse it into the first information, and identify the second type of identifier and parse it into the second information. The decoding device can scan the identification code, identify the first subclass identifier in the identification code, for example, parse the first identifier and the second identifier of the "entangled state", and parse the first identifier and the second identifier of the "entangled state" into the first information. In this way, the identification information corresponding to the identification code can be obtained through the parsed first information and second information.

[0152] In some embodiments, the identification code is used to identify a binary number. For example, the first information may be 1 in a binary number, and the second information may be 0 in a binary number. At this time, the decoding device may decode the 1 and 0 in the identification code by parsing the identification code, thereby obtaining the identification information corresponding to the identification code.

[0153] In some embodiments, the size and format of different types of identification codes are fixed. For example, the two-dimensional code can be a 4*4 size identification code. When encoding the identification code, usually only the first information therein is identified, and the second information is not identified. For example, reference FIG. 13 shows a generated 4*4 two-dimensional code. The two-dimensional code contains only the first information identified, such as the formation of a laser point. At this time, the decoding device can scan the position containing the laser point in the identification code, decode the position as the first information, and decode the position not containing the laser point as the second information. In order to more accurately parse the two-dimensional code, the size of each first-class identification code and the size of the second-class identification code can be pre-set in the decoding device, so that the decoding device can identify each first-class identification code at the position containing the laser point according to the size of the first-class identification code in the identification code, and identify each second-class identifier at the position not containing the laser point according to the size of the second-class identification code.

[0154] In order to more accurately identify the first information and the second information, when decoding the identification code, the decoding device may first convert the first subclass identification code contained in the identification code into the second subclass identification code, and then identify the information of the converted identification code to obtain the identification information. Fig.13a The decoding device obtains the identification code shown in Fig.13a After the identification code is shown, you can Fig.13a In the identification code shown, the first sub-category identifiers included in the identification code are determined according to the size of the first category identifier. Fig.13a The first subclass identifier shown includes a first identifier and a second identifier, and both the first identifier and the second identifier are represented by dots. After the decoding device determines each first subclass identifier, the first subclass identifier can be converted into a second subclass identifier. The decoding device can decode the second subclass identifier in the converted identifier into first information, and determine each second class identifier in the part not including the laser dot according to the size of the second class identifier, and decode each second class identifier into second information. Assuming that the first information is used to represent 1 and the second information is used to represent 0, the following can be obtained: Fig.13a Identification information in.

[0155] As a possible implementation, at least one representation form of the identifier included in the first type of identifier in the identification code can represent the third information. Fig.14 As shown, the above method also includes:

[0156] Step S1204: Identify the first subcategory identifier contained in the identification code.

[0157] Step S1205: Obtain third information based on at least one representation form of the identifier included in the first subclass identifier.

[0158] That is, during the encoding process, the third information can be encoded by at least one representation form of the identifier included in the first subclass identifier. At this time, the decoding device needs to parse out the third information when decoding the identification code. The decoding device can identify the first subclass identifier in the identification code, and thus can determine the third information according to the representation form of the identifier included in the first subclass identifier.

[0159] For example, the first subclass identifier includes a first identifier and a second identifier. The decoding device can identify the first subclass identifier contained in the identification code, and determine the third information corresponding to the identification code according to the expression form between the first identifier and the second identifier contained in each first subclass identifier, that is, parse out the third information.

[0160] As a possible implementation manner, the representation form of the identifiers included in the first subcategory identifiers includes at least one of a positional relationship of the identifiers, a size relationship of the identifiers, and a shape of the identifiers.

[0161] That is, when the representation form of the identifiers included in the first subclass identifier includes the positional relationship between the identifiers, the decoding device can decode the third information according to the positional relationship between the identifiers included in the first subclass identifier.

[0162] When the representation form of the identifiers included in the first subclass identifier includes the size relationship of the identifiers, the decoding device may decode the third information according to the size relationship between the identifiers included in the first subclass identifier.

[0163] When the representation form of the identifier included in the first subclass identifier includes the shape of the identifier, the decoding device may decode the third information according to the shape of the identifier included in the first subclass identifier.

[0164] As shown in the example above, Fig.13a After the first sub-category identifier in the identification code is determined, the third information corresponding to the identification code can be determined according to the size relationship and relative position relationship between the first identifier and the second identifier included in the first sub-category identification code, for example, Fig.13a Taking the first sub-category identification code in the example, the first sub-category identification code is parsed to obtain the size relationship and relative position relationship between the first identifier and the second identifier contained therein, such as Fig.13b shown.

[0165] It should be understood that the third information represented by the representation form between the identifiers contained in the first subclass identifier can be preset. For example, the representation forms between the identifiers contained in the first subclass identifier corresponding to the third information a and the third information b can be preset as representation forms a and b, respectively. In this way, when the third information a needs to be encoded in the encoding device, the representation form between the identifiers contained in the first subclass identifier can be set according to the representation form a, and when the third information b needs to be encoded in the encoding device, the representation form between the identifiers contained in the first subclass identifier can be set according to the representation form b. In this way, in the decoding device, by parsing the representation form between the identifiers contained in the first subclass identifier, when the representation form between the identifiers contained in the first subclass identifier is parsed as the representation form a, it can be determined that the representation form between the identifiers contained in the first subclass identifier of this part is used to represent the third information a. When the representation form between the identifiers contained in the first subclass identifier is parsed as the representation form b, it can be determined that the representation form between the identifiers contained in the first subclass identifier of this part is used to represent the third information b.

[0166] Corresponding to the above embodiments, the present application also provides an encoding device. Fig.15 A schematic diagram of the structure of a coding device provided in an embodiment of the present invention, the coding device 1500 may include: a processor 1501, a memory 1502 and a communication unit 1503. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the coding device shown in the figure does not constitute a limitation on the embodiment of the present invention. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0167] The communication unit 1503 is used to establish a communication channel so that the encoding device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0168] The processor 1501 is the control center of the encoding device. It uses various interfaces and lines to connect various parts of the entire encoding device. It runs or executes software programs, instructions, and / or modules stored in the memory 1502, and calls data stored in the memory to perform various functions of the encoding device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 1501 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0169] The memory 1502 is used to store the execution instructions of the processor 1501. The memory 1502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0170] When the execution instructions in the memory 1502 are executed by the processor 1501, the encoding device 1500 is enabled to execute part or all of the steps in the illustrated embodiment corresponding to the encoding method.

[0171] Corresponding to the above embodiment, the present application also provides a decoding device. Fig.16A schematic diagram of the structure of a decoding device provided in an embodiment of the present invention, the decoding device 1600 may include: a processor 1601, a memory 1602 and a communication unit 1603. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the decoding device shown in the figure does not constitute a limitation on the embodiment of the present invention, it can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine certain components, or arrange components differently.

[0172] The communication unit 1603 is used to establish a communication channel so that the decoding device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0173] The processor 1601 is the control center of the decoding device. It uses various interfaces and lines to connect various parts of the entire decoding device. It runs or executes software programs, instructions, and / or modules stored in the memory 1602, and calls data stored in the memory to perform various functions of the decoding device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 1601 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0174] The memory 1602 is used to store the execution instructions of the processor 1601. The memory 1602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0175] When the execution instructions in the memory 1602 are executed by the processor 1601 , the decoding device 1600 can perform part or all of the steps in the embodiment shown in the above decoding method.

[0176] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the encoding method or decoding method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0177] In a specific implementation, the present invention further provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps in each embodiment of the simulation scene generation method provided by the present invention.

[0178] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.

[0179] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A coding method, characterized in that: include: Obtain information to be encoded; Encoding the information to be encoded to generate an identification code; The identification code includes a first-category identifier and a second-category identifier; the first-category identifier includes at least one first-subcategory identifier; the first-subcategory identifier includes at least a first identifier and a second identifier, the first-subcategory identifier is used to identify the first information through the identifier it contains; the second-category identifier is used to identify the second information, and the first information is different from the second information.

2. The method according to claim 1, characterized in that: The first subcategory identifier is further used to identify the third information through at least one representation form of the identifier contained therein.

3. The method according to claim 1, characterized in that For each first subclass identifier, the sum of the areas of each identifier contained in the first subclass identifier is less than or equal to the area of ​​the first subclass identifier; and the size of the first subclass identifier is the same as that of the second class identifier.

4. The method according to claim 1, characterized in that: The center point of each identifier included in the first sub-category identifier is located in the area range of the first sub-category identifier.

5. The method according to claim 1, characterized in that: The first category identifier includes at least two first subcategory identifiers, and the identifiers included in the at least two first subcategory identifiers are not completely identical in expression form; The representation form of the identifier contained in the first subcategory identifier includes at least one of the position relationship of the identifier, the size relationship of the identifier, and the shape of the identifier.

6. The method according to claim 5, characterized in that The first category identifier includes at least one group of first subcategory identifiers; each group of first subcategory identifiers includes n first subcategory identifiers, and the representation forms of the n first subcategory identifiers vary according to a first preset rule; n is an integer greater than 1.

7. The method according to claim 6, characterized in that The representation forms of the n first subclass identifiers change according to the first preset rule, including: In the first direction, the areas of the first identifiers of the n first subcategory identifiers decrease in sequence according to a first preset change amount, and the areas of the second identifiers increase in sequence according to a second preset change amount.

8. The method according to claim 6, characterized in that The representation forms of the n first subclass identifiers change according to the first preset rule, including: In the first direction, the areas of the first identifiers of the first i first subclass identifiers among the n first subclass identifiers decrease in sequence according to the first preset change amount, and the areas of the second identifiers increase in sequence according to the second preset change amount; the areas of the first identifiers of the last ni first subclass identifiers increase in sequence according to the third preset change amount, and the areas of the second identifiers decrease in sequence according to the fourth preset change amount.

9. The method according to claim 1, characterized in that: The first category identifier also includes a second subcategory identifier; the second subcategory identifier is used to identify the first information, and the second subcategory identifier is different from the first subcategory identifier.

10. The method according to claim 9, characterized in that The encoding process of the information to be encoded to generate an identification code comprises: Determine the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier contained in the identification code based on the information to be encoded; Based on the position of the first subclass identifier, the position of the second subclass identifier and the position of the second class identifier, the information to be encoded is encoded to generate the identification code.

11. The method according to claim 10, characterized in that Also includes: determining a target position of the first subclass identifier based on the position of the first subclass identifier; The encoding process of the information to be encoded based on the position of the first subclass identifier, the position of the second subclass identifier, and the position of the second class identifier to generate the identification code comprises: According to a second preset rule, a first encoding is performed on the first subclass identifier at the target position; the second preset rule is used to identify the representation form of the first subclass identifier at the target position; According to a first preset rule, performing a second encoding on the first subclass identifier at other positions; the first preset rule is used to identify the expression form of the first subclass identifier at the other positions; According to a third preset rule, the second subclass identifier and the second class identifier are third-encoded based on the position of the second subclass identifier and the position of the second class identifier to generate the identification code; the third preset rule is used to identify the expression form of the second subclass identifier and the second class identifier; The target position includes a starting position and / or an ending position of the first subcategory identifier.

12. The method according to claim 11, characterized in that Also includes: If there are multiple identification codes, the expression forms at the target positions of the multiple identification codes change according to the second preset rule.

13. A decoding method, characterized in that: include: Get the identification code; The identification code includes a first-class identifier and a second-class identifier; the first-class identifier includes at least one first-subclass identifier; the first-subclass identifier includes at least a first identifier and a second identifier, the first-subclass identifier is used to identify the first information through the identifier contained therein; the second-class identifier is used to identify the second information, and the first information is different from the second information; determining a type of the identification code based on the identification code; Parsing the first type of identifier in the identification code into the first information, parsing the second type of identifier in the identification code into the second information, and obtaining identification information corresponding to the identification code; Based on the type of the identification code and identification information corresponding to the identification code, the target content identified by the identification code is determined.

14. The method according to claim 13, characterized in that The method further comprises: identifying a first subcategory identifier contained in the identification code; Based on at least one representation form of the identifier included in the first subcategory identifier, third information is obtained.

15. A coding device, characterized in that: The invention comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the encoding device is caused to perform the method according to any one of claims 1 to 12.

16. A decoding device, characterized in that: The invention comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the decoding device is caused to perform the method of claim 13 or 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method of any one of claims 1 to 12, or execute the method of claim 13 or 14.