Code reading method, coding method and code reading device
By using the first graphic identification and dot matrix module arranged in sequence in the encoding technology, the problem of low security performance of information encoding in the existing encoding technology is solved, and anti-counterfeiting performance with large encoding capacity and high concealment is achieved.
Patent Information
- Application Number
- CN202111565764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-12-20
AI Technical Summary
In the existing encoding technology, the security performance of information encoding is low, the QR code is easily copied and counterfeited, and the watermark is easily erased under the existing technology conditions, which is not conducive to the anti-counterfeiting protection and security of multimedia materials.
By setting a first graphical identifier arranged in sequence, each first graphical identifier corresponds to an encoded value, a dot matrix module is generated, and a color feature is set for it, and it is superimposed on the object to be encoded to form a target object carrying the encoded information.
The dot matrix module has a large encoding capacity, is not easy to imitate, and has high concealment, which can greatly improve the anti-counterfeiting and security performance of the coded information of the object to be identified.
Smart Images

Figure CN114398920B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a code reading method, a coding method and a code reading device. Background Art
[0002] In the process of information technology development, information coding is widely used in various product materials. Through the coding of information, people can obtain, interact with, and disseminate information about products. The current coding technology is basically implemented through barcodes or QR codes. By pre-storing information in specific barcodes or QR codes, and then adding the coding pattern to the product or multimedia materials, the coded scanning is performed through a smart phone or a specific device to obtain the coded stored information.
[0003] In addition, the existing coding technology is also used in the anti-counterfeiting of multimedia materials. The information stored in the specific coding pattern is used for anti-counterfeiting identification to confirm that the source of the data is authentic and reliable and has independent copyright. Similarly, adding watermarks to multimedia materials can also achieve anti-counterfeiting functions.
[0004] The coding patterns obtained by the existing coding technology, such as QR codes, are easy to be copied and counterfeited, and the watermarks are easy to be erased under the existing technical conditions, which is not conducive to the anti-counterfeiting protection and security of multimedia data. Summary of the invention
[0005] The present application provides a code reading method, a coding method and a code reading device to solve the technical problem of low information coding security performance in the existing information coding technology.
[0006] In a first aspect, a method for reading a code is provided, the method comprising:
[0007] Acquire an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value;
[0008] Identifying the dot matrix module from the object to be identified according to the color feature of the object to be identified;
[0009] Determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark;
[0010] The coding information of the object to be identified is determined according to the coding values corresponding to the first graphical identifiers.
[0011] In a second aspect, a coding method is provided, the method comprising:
[0012] Acquire an object to be encoded and encoding information set for the object to be encoded, wherein the encoding information includes encoding values arranged in sequence;
[0013] Determine the first graphical identifier corresponding to each coding value according to the order of the coding values in the coding information, so as to obtain the first graphical identifiers arranged in order corresponding to the coding information;
[0014] Generating a dot matrix module according to the first graphical identifiers arranged in sequence;
[0015] After setting the color feature for the dot matrix module, the dot matrix module is superimposed on the object to be encoded to obtain a target object carrying the encoding information.
[0016] In a third aspect, a code reading device is provided, the device comprising:
[0017] An acquisition module, used for acquiring an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value;
[0018] A search module, used for identifying the dot matrix module from the object to be identified according to the color feature of the object to be identified;
[0019] A first determination module, configured to determine a code value corresponding to each first graphical mark in the dot matrix module according to a shape feature of each first graphical mark;
[0020] The second determination module is used to determine the coding information of the object to be identified according to the coding values corresponding to the first graphical identifiers.
[0021] In a fourth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0022] Acquire an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value;
[0023] Identifying the dot matrix module from the object to be identified according to the color feature of the object to be identified;
[0024] Determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark;
[0025] The coding information of the object to be identified is determined according to the coding values corresponding to the first graphical identifiers.
[0026] In a fifth aspect, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0027] Acquire an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value;
[0028] Identifying the dot matrix module from the object to be identified according to the color feature of the object to be identified;
[0029] Determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark;
[0030] The coding information of the object to be identified is determined according to the coding values corresponding to the first graphical identifiers.
[0031] The present application can achieve the following beneficial effects: by setting sequentially arranged first graphic logos, and one first graphic logo corresponds to one coding value, the dot matrix module can have the characteristics of large coding capacity and not easy to imitate, and the micro-dot matrix structure has the characteristics of high concealment; by obtaining the object to be identified that carries the coding information, the dot matrix module can be identified; through the color characteristics of the object to be identified, the dot matrix module can be quickly and accurately identified from the object to be identified; because one first graphic logo corresponds to one coding value, the coding value corresponding to each first graphic logo can be accurately and efficiently determined through the shape characteristics of each first graphic logo, thereby accurately determining the coding information of the object to be identified. The coding reading method proposed in the present application can accurately identify the dot matrix module set in the present application, and can greatly improve the anti-counterfeiting performance and security performance of the coding information of the object to be identified. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of the structure of a dot matrix module provided in an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the correspondence between a coding value and a graphical identifier provided in an embodiment of the present application;
[0035] Figure 4A schematic diagram of the correspondence between a coding value and a graphical identifier provided in an embodiment of the present application;
[0036] Figure 5 A multimedia material carrying a dot matrix module provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of a flow chart of a code reading method provided in an embodiment of the present application;
[0038] Figure 7a is a schematic diagram of an inclination angle of a graphical mark in a dot matrix module relative to a horizontal direction in one embodiment;
[0039] Figure 7b is a schematic diagram of a rotated dot matrix module in one embodiment;
[0040] Figure 8 A schematic diagram of the structure of a code reading device provided in an embodiment of the present application;
[0041] Fig. 9 A schematic diagram of the structure of an encoding device provided in an embodiment of the present application;
[0042] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0044] The technical solution of the present application is applicable to various scenarios of coding identification. Specifically, the technical solution of the present application is applicable to scanning the coding pattern carried by the object to be identified through the mobile terminal in the scenario of coding identification, so as to obtain, interact, and disseminate the information of the object to be identified. In practical applications, the coding pattern can be a QR code, etc., and the object to be identified can be multimedia materials such as pictures, videos, paper documents, or other specific items such as cups, boxes, and equipment that can be printed and fixed with coding patterns. Exemplarily, the coding pattern on the shoe box is scanned by the mobile terminal to obtain the coding information indicated by the coding pattern, and the information corresponding to the shoe box (shoes) is read from the storage device according to the coding information, so that the user can perform anti-counterfeiting identification according to the read information to avoid buying counterfeit and shoddy products. It can be understood that when identifying the coding pattern, it is not limited to the mobile terminal, and the user can identify the coding pattern through any coding pattern recognition device with the function of scanning and identifying the coding pattern.
[0045] In order to facilitate understanding of the technical solution in this application, the dot matrix module in this application is first introduced. Figure 1As shown, the dot matrix module of the present application is a tiny dot matrix module of a specific size graphic. The coding pattern is the dot matrix module in this scheme. Take the dot matrix module whose vector size can be 5mm*5mm as an example. The dot matrix module consists of 36 graphical logos in 6 rows and 6 columns, the three graphical logos at the head are the starting position logos, the three graphical logos at the tail are the ending position logos, and the remaining multiple graphical logos arranged in sequence are multiple coding logos. Among them, the starting position logo is used to indicate the starting position of the multiple coding logos in the dot matrix module; the ending position logo is used to indicate the ending position of the multiple coding logos in the dot matrix module; the graphical logo has a corresponding shape feature, and the shape feature is used to indicate the specific graphic of the graphical logo. For example, if the shape feature of a graphical logo is a circle, it indicates that the graphical logo is a circle, and if the shape feature of a graphical logo is a square, it indicates that the graphical logo is a square. It can be understood that the number of starting position logos and ending position logos can be changed according to user needs.
[0046] In this application, if Figure 1 As shown in the figure, each coding mark corresponds to a binary value, for example, a circle represents 0 and a square represents 1. The graphic marks on the dot matrix module follow the order from left to right and from top to bottom. Excluding the 3 starting position marks at the head and the 3 ending position marks at the tail, we can get a 30-digit binary coding data string. Therefore, the capacity of this coding method can reach 2 30 , that is 1073741824 times.
[0047] In the present application, the color of each graphical mark in the dot matrix module has the same RGB value, and the center distances between adjacent graphical marks are the same. At the same time, each coded mark corresponds to a binary value.
[0048] In one embodiment, Figure 2 As shown, the present application proposes an encoding method, the method comprising:
[0049] Step 201: Acquire an object to be encoded and encoding information set for the object to be encoded, wherein the encoding information includes a plurality of encoding values arranged in sequence.
[0050] Coding is the process of converting information from one form or format to another. In this solution, for multimedia data or specific items, a coding pattern corresponding to the multimedia data or specific items is generated, that is, a dot matrix module, so that users can read the information corresponding to the multimedia data or specific items by scanning the coding pattern.
[0051] The object to be encoded refers to multimedia data or specific items for printing and fixing coding patterns. Coding information refers to a data string including multiple sequentially arranged coding values, through which specific information data can be read from a storage device. In practical applications, coding information can be a binary coded data string in computer language, for example, 10011111000111.
[0052] Step 202: determine the first graphical identifier corresponding to each coding value according to the order of the coding values in the coding information, so as to obtain the first graphical identifiers arranged in order corresponding to the coding information.
[0053] The first graphical identifier is as follows: Figure 1 The coding mark in the dot matrix module. The coding value refers to the binary value in computer language, which can be 0 or 1.
[0054] Among them, after obtaining the coding information, the coding identifier corresponding to each binary numerical value arranged in sequence in the coding information can be determined in sequence according to the preset coding value and graphic identifier shape feature correspondence table, that is, the first graphic identifier arranged in sequence is determined.
[0055] In a specific embodiment, a binary value corresponds to a graphical identifier. Figure 3 As shown, if the graphical symbol corresponding to the binary value 1 is a square and the graphical symbol corresponding to the binary value 0 is a circle, then the multiple first graphical symbols arranged in order corresponding to the coding information 0111001 are circle, square, square, square, circle, circle, square.
[0056] In a specific embodiment, a binary value may correspond to multiple graphical identifiers. Figure 4 As shown, if the graphic identifier corresponding to the binary value 1 is a square and a triangle, and the graphic identifier corresponding to the binary value 0 is a circle, then the multiple first graphic identifiers arranged in sequence corresponding to the coded information 0110 are circle, square, square, circle, or circle, triangle, triangle, circle, or circle, square, triangle, circle, or circle, triangle, square, circle. It can be understood that when a binary value corresponds to multiple graphic identifiers, any one of the multiple graphic identifiers is randomly obtained and determined as the first graphic identifier corresponding to the binary value.
[0057] By setting each dot in the dot matrix module as a graphical mark and corresponding each graphical mark to a binary coding value, not only the information capacity of the coded information can be greatly increased, but also the security and confidentiality of the dot matrix module can be greatly improved.
[0058] Step 203: Generate a dot matrix module according to the first graphical logos arranged in sequence.
[0059] Among them, after determining the first graphical identifier of the sequential arrangement according to the sequentially arranged coding value, the preset starting position identifier and the ending position identifier can be obtained; then the starting position identifier is placed at the head of the first graphical identifier of the sequential arrangement, and the ending position identifier is placed at the tail of the first graphical identifier of the sequential arrangement; finally, according to the identifier string composed of the starting position identifier, the first graphical identifier, and the ending position identifier, an m*m dot matrix module is generated in the order from top to bottom and from left to right.
[0060] The initial position is marked as Figure 1 The initial position mark in the dot matrix module and the end position mark are Figure 1 The initial position mark in the dot matrix module. It should be emphasized that in order to avoid recognition errors during code recognition, the starting position mark and the ending position mark are graphical marks different from the first graphical mark, that is, the initial position shape of the initial position mark and the ending position shape of the ending position mark are different from the graphics of the first graphical mark.
[0061] Step 204: after setting the color feature for the dot matrix module, superimpose the dot matrix module onto the object to be encoded to obtain a target object carrying the encoding information.
[0062] The color of each graphical mark in the dot matrix module has the same RGB value, so that the coding pattern recognition device can accurately recognize the dot matrix module from the object carrying the coding pattern.
[0063] In a specific embodiment, in order to prevent the coding pattern from affecting the aesthetics of the object to be coded, the concealment of the coding pattern can be improved and the incompatibility between the coding pattern and the object to be coded can be reduced. Specifically, the RGB value of the graphical identifier in the dot matrix module can be set to an RGB value close to the object to be coded. Setting a color feature for the dot matrix module is to set an RGB value for the dot matrix module.
[0064] In a specific embodiment, Figure 5 As shown, taking multimedia data as an example, in order to reduce the probability of missing dot matrix modules with coding information due to range cutting of the multimedia data, the present application will copy five identical dot matrix modules, divide the multimedia data into four areas equally, and superimpose the five dot matrix modules on the center points of the four areas and the center point of the data respectively.
[0065] The present application proposes a coding method, the method comprising: obtaining an object to be coded and coding information set for the object to be coded, the coding information comprising sequentially arranged coding values; determining the first graphical identifier corresponding to each coding value according to the order of the coding values in the coding information, so as to obtain the first graphical identifier arranged in sequence corresponding to the coding information; generating a dot matrix module according to the first graphical identifier arranged in sequence; after setting a color feature for the dot matrix module, superimposing the dot matrix module on the object to be coded, so as to obtain a target object carrying the coding information. The present application can not only greatly improve the information capacity of the coding information, but also greatly improve the security and confidentiality of the dot matrix module by setting each point in the dot matrix module as a graphical identifier and corresponding each graphical identifier to a binary coding value. By setting a color feature for the dot matrix module, the dot matrix module can be accurately identified, and the coding pattern can be prevented from affecting the aesthetics of the object to be coded.
[0066] In one embodiment, Figure 6 As shown, the present application proposes a coding reading method for reading the coding information indicated by the dot matrix module obtained by the coding method proposed in the present application. The method comprises:
[0067] Step 601, obtaining an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and one first graphical identifier corresponds to one coding value.
[0068] The object to be identified refers to multimedia data or specific items with printed and fixed coding patterns, and the coding pattern includes a dot matrix module for indicating coding information.
[0069] Among them, the dot matrix module can be as follows Figure 1 The first graphical identifier is as shown in FIG. Figure 1 Multiple coding marks in the dot matrix module.
[0070] Among them, the graphical logo has a shape feature corresponding thereto, and the shape feature is used to indicate the specific graphic of the graphical logo. A first graphical logo corresponds to a coding value, which means that a first graphical logo corresponds to a graphic, and a graphic corresponds to a coding value. It can be understood that the first graphical logo includes at least one first graphical logo. In practical applications, multiple first graphics may also correspond to one coding value at the same time. For example, a square may correspond to a coding value of 1, and a circle may correspond to a coding value of 0; or a square and a triangle may correspond to a coding value of 1 at the same time, and a circle and a hexagon may correspond to a coding value of 0 at the same time.
[0071] Step 602: Identify the dot matrix module from the object to be identified according to the color feature of the object to be identified.
[0072] The color feature of the object to be identified refers to the RGB value of the object to be identified.
[0073] The color of each graphical mark in the dot matrix module has the same RGB value. The coded pattern recognition device obtains the RGB value of the object to be recognized; then obtains a preset range of RGB values; if the RGB value of a certain area of the object to be recognized is within the preset range of RGB values, it means that the area is a dot matrix module area.
[0074] Step 603: Determine the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark.
[0075] The shape feature of the first graphical identifier refers to the graphic of the first graphical identifier. Since one first graphical identifier corresponds to one graphic, and one graphic corresponds to one coding value, after identifying the dot matrix module, the shape feature of the first graphical identifier in the dot matrix module can be identified, thereby determining the graphic of the first graphical identifier, and determining the coding value corresponding to the first graphical identifier according to the graphic of the first graphical identifier.
[0076] In a specific embodiment, the dot matrix module also includes a starting position identifier and an ending position identifier, the starting position identifier includes at least one second graphic identifier different from the first graphic identifier, which is used to indicate the starting position of the first graphic identifiers arranged in sequence in the dot matrix module, and the ending position identifier includes at least one third graphic identifier different from the first graphic identifier, which is used to indicate the ending position of the first graphic identifiers arranged in sequence in the dot matrix module; before determining the coding value corresponding to each first graphic identifier in the dot matrix module according to the shape characteristics of each first graphic identifier in the dot matrix module, it also includes: identifying the starting position identifier and the ending position identifier according to the shape characteristics of each graphic identifier in the dot matrix module; determining the starting position and the ending position of the arrangement of the first graphic identifiers arranged in sequence according to the starting position identifier and the ending position identifier.
[0077] The starting position marker can be Figure 1 The starting position mark in the dot matrix module shown is located at the head of the dot matrix module and includes at least one second graphical mark different from the first graphical mark. Specifically, the second graphical mark can be as follows: Figure 1The water drop graphic shown; the starting position identifier is used to indicate the starting position of the first graphical identifier arranged in sequence in the dot matrix module. Specifically, the first graphical identifier in the first graphical identifier arranged in sequence is the graphical identifier after the starting position identifier, that is, the starting position of the first graphical identifier arrangement.
[0078] The end position marker can be: Figure 1 The end position mark in the dot matrix module shown is located at the end of the dot matrix module and includes at least one third graphical mark different from the first graphical mark. Specifically, the third graphical mark can be as follows: Figure 1 The water drop graphic shown. It can be understood that the third graphical mark and the second graphical mark can also be different graphics; the end position mark is used to indicate the end position of the first graphical marks arranged in sequence in the dot matrix module. Specifically, the last graphical mark in the first graphical marks arranged in sequence is the previous graphical mark of the end position mark, that is, the end position of the first graphical mark arrangement.
[0079] The number of first graphic logos can be well controlled through the starting position identifier and the ending position identifier, so that even two dot matrix modules with the same arrangement and number of graphic logos can include different numbers of first graphic logos, thereby increasing the difficulty of information cracking and greatly improving the data security of the dot matrix module.
[0080] In a specific embodiment, the second graphic logo and the third graphic logo are both non-centrally symmetric graphic logos; before determining the coding values corresponding to the first graphic logos in the dot matrix module according to the shape features of the first graphic logos, it also includes: obtaining the inclination angle of any graphic logo in the second graphic logo and / or the third graphic logo relative to the horizontal direction; rotating the dot matrix module by an angle equal to the inclination angle so that the dot matrix module is horizontal relative to the horizontal direction, to obtain a rotated dot matrix module; and identifying the shape features of the first graphic logos in the rotated dot matrix module.
[0081] Among them, the position of any one of the second graphical logo and / or the third graphical logo is determined, and the circumscribed rectangle of the graphical logo and the bottom side of the circumscribed rectangle are determined, and then the inclination angle between the bottom side of the circumscribed rectangle and the horizontal direction is determined, and the inclination angle between the bottom side of the circumscribed rectangle and the horizontal direction is used as the inclination angle of the dot matrix module relative to the horizontal direction; after determining the inclination angle of the dot matrix module relative to the horizontal direction, the dot matrix module can be rotated by an angle equal to the inclination angle to make the graphical logo in the dot matrix module horizontal relative to the horizontal direction. For example, taking the second graphical logo and the third graphical logo as ellipses as an example, Figure 7aAs shown, the circumscribed rectangle of the graphical mark and the bottom side of the circumscribed rectangle are determined, and the inclination angle α between the bottom side of the circumscribed rectangle and the horizontal direction is used as the inclination angle of the dot matrix module relative to the horizontal direction. After the dot matrix module is rotated clockwise by the angle α, the rotated dot matrix module can be obtained, as shown in FIG. Figure 7b shown.
[0082] Among them, after obtaining the rotated dot matrix module, a pre-stored graphic logo shape feature table can be obtained, and the graphic logo shape feature table stores the correspondence between the graphic logo and the graphic logo shape feature; traverse the graphic logo shape feature table, and find the shape feature matching each first graphic logo from the graphic logo shape feature table.
[0083] In this embodiment, by determining whether the graphical mark is tilted, it is possible to ensure that the dot matrix module has rotation invariance, thereby making the code reading more accurate.
[0084] In a specific embodiment, the identification distances between adjacent graphic logos in the dot matrix module are equal; before determining the coding values corresponding to each first graphic logo in the dot matrix module based on the shape features of each first graphic logo in the dot matrix module, it also includes: determining the position of each first graphic logo in the dot matrix module based on a preset identification distance; and identifying the shape features of each first graphic logo after the position is determined.
[0085] The identification distance between adjacent graphical identifications refers to the distance between the center points of adjacent graphical identifications.
[0086] In this embodiment, since the identification distances between adjacent graphic logos in the dot matrix module are equal, after determining the starting position and the ending position of the sequentially arranged first graphic logos, the specific position of each first graphic logo can be determined according to the distance between adjacent first graphic logos, thereby improving the accuracy of determining the position of the graphic logo, and performing shape recognition on each first graphic logo after the position is determined, thereby improving the accuracy of code reading.
[0087] In a specific embodiment, determining the coding value corresponding to each first graphic logo according to the shape characteristics of each first graphic logo in the dot matrix module includes: binarizing each first graphic logo according to the shape characteristics of each first graphic logo in the dot matrix module to obtain the coding value corresponding to each first graphic logo.
[0088] The binary assignment refers to determining the binary value corresponding to each first graphical logo according to a preset correspondence table between the coding value and the shape feature of the graphical logo.
[0089] By assigning a binary value to each first graphical identifier, the graphical identifier can be converted into a set of binary coded data strings, thereby improving the simplicity of coded data storage and reducing memory usage.
[0090] Step 604: Determine the coding information of the object to be identified according to the coding values corresponding to the first graphical identifiers.
[0091] After the coding value corresponding to the first graphical mark is determined, the coding information of the object to be identified can be determined, and the information data of the object to be identified can be read from the storage device according to the coding information.
[0092] In a specific embodiment, determining the coding information of the object to be identified based on the coding values corresponding to the first graphical identifiers includes: forming a binary coding data string corresponding to the dot matrix module based on the coding values corresponding to the first graphical identifiers; and determining the coding information of the object to be identified based on the binary coding data string.
[0093] Among them, since the first graphical identification is arranged in sequence, after determining the code value corresponding to the first graphical identification, the binary code data string corresponding to the dot matrix module can be determined, and the binary code data string is the code information of the object to be identified.
[0094] The present application proposes a code reading method, which includes: obtaining an object to be identified that carries code information, wherein the object to be identified includes a dot matrix module for indicating the code information, wherein the dot matrix module includes first graphic identifiers arranged in sequence, and each first graphic identifier corresponds to a code value; identifying the dot matrix module from the object to be identified according to the color characteristics of the object to be identified; determining the code values corresponding to each first graphic identifier in the dot matrix module according to the shape characteristics of each first graphic identifier; and determining the code information of the object to be identified according to the code values corresponding to each first graphic identifier. By setting the first graphical logos arranged in sequence, and one first graphical logo corresponds to one coding value, the dot matrix module can have the characteristics of large coding capacity and not easy to imitate, and the micro-dot matrix structure has the characteristics of high concealment; by obtaining the object to be identified that carries the coding information, the dot matrix module can be identified; through the color characteristics of the object to be identified, the dot matrix module can be quickly and accurately identified from the object to be identified; because one first graphical logo corresponds to one coding value, the coding value corresponding to each first graphical logo can be accurately and efficiently determined through the shape characteristics of each first graphical logo, thereby accurately determining the coding information of the object to be identified. The coding reading method proposed in the present application can accurately identify the dot matrix module set in the present application, and can greatly improve the anti-counterfeiting performance and security performance of the coding information of the object to be identified.
[0095] like Figure 8 As shown, in one embodiment, the present invention provides a code reading device, the device comprising:
[0096] An acquisition module 801 is used to acquire an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value;
[0097] A search module 802 is used to identify the dot matrix module from the object to be identified according to the color feature of the object to be identified;
[0098] A first determination module 803, configured to determine the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark;
[0099] The second determination module 804 is used to determine the coding information of the object to be identified according to the coding values corresponding to the first graphical identifiers.
[0100] like Fig. 9 As shown, in one embodiment, the present invention provides an encoding device, the device comprising:
[0101] A coding information acquisition module 901 is used to acquire an object to be coded and coding information set for the object to be coded, wherein the coding information includes coding values arranged in sequence;
[0102] A third determining module 902, configured to determine the first graphical identifiers corresponding to the respective coding values according to the order of the coding values in the coding information, so as to obtain the first graphical identifiers arranged in order corresponding to the coding information;
[0103] A generating module 903, configured to generate a dot matrix module according to the first graphical identifiers arranged in sequence;
[0104] The superposition module 904 is used to set the color feature for the dot matrix module, and then superimpose the dot matrix module on the object to be encoded to obtain a target object carrying the encoding information.
[0105] like Fig.10 As shown in FIG. 1 , in one embodiment, it is an internal structure diagram of a computer device. The computer device may be a code reading device, or a terminal or server connected to a code reading device. Fig.10As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement a code reading method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a code reading method. The network interface is used to communicate with an external device. Those skilled in the art will appreciate that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0106] In one embodiment, a code reading method provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.10 The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the code reading device, such as the acquisition module 801, the search module 802, the first determination module 803, and the second determination module 804.
[0107] like Fig.10 As shown in FIG. 1 , in one embodiment, it is an internal structure diagram of a computer device. The computer device may also be an encoding device, or a terminal or server connected to an encoding device. Fig.10 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement a coding method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute a coding method. The network interface is used to communicate with an external device. Those skilled in the art will appreciate that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In one embodiment, a coding method provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.10The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the code reading device, such as the code information acquisition module 901, the third determination module 902, the generation module 903, and the superposition module 904.
[0109] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps: obtaining an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphic identifiers arranged in sequence, and each first graphic identifier corresponds to a coding value; identifying the dot matrix module from the object to be identified according to the color characteristics of the object to be identified; determining the coding values corresponding to each first graphic identifier in the dot matrix module according to the shape characteristics of each first graphic identifier; and determining the coding information of the object to be identified according to the coding values corresponding to each first graphic identifier.
[0110] In one embodiment, the dot matrix module also includes a starting position marker and an ending position marker, the starting position marker includes at least one second graphic marker different from the first graphic marker, which is used to indicate the starting position of the first graphic markers arranged in sequence in the dot matrix module, and the ending position marker includes at least one third graphic marker different from the first graphic marker, which is used to indicate the ending position of the first graphic markers arranged in sequence in the dot matrix module; before determining the coding value corresponding to each first graphic marker in the dot matrix module according to the shape characteristics of each first graphic marker in the dot matrix module, it also includes: identifying the starting position marker and the ending position marker according to the shape characteristics of each graphic marker in the dot matrix module; determining the starting position and the ending position of the arrangement of the first graphic markers arranged in sequence according to the starting position marker and the ending position marker.
[0111] In one embodiment, the second graphic logo and the third graphic logo are both non-centrally symmetric graphic logos; before determining the coding values corresponding to the first graphic logos in the dot matrix module according to the shape features of the first graphic logos, it also includes: obtaining the inclination angle of any graphic logo in the second graphic logo and / or the third graphic logo relative to the horizontal direction; rotating the dot matrix module by an angle equal to the inclination angle so that the dot matrix module is horizontal relative to the horizontal direction, to obtain a rotated dot matrix module; and identifying the shape features of the first graphic logos in the rotated dot matrix module.
[0112] In one embodiment, the identification distances between adjacent graphic logos in the dot matrix module are equal; before determining the coding values corresponding to each first graphic logo in the dot matrix module based on the shape features of each first graphic logo in the dot matrix module, it also includes: determining the position of each first graphic logo in the dot matrix module based on a preset identification distance; and identifying the shape features of each first graphic logo after the position is determined.
[0113] In one embodiment, determining the coding value corresponding to each first graphic logo in the dot matrix module based on the shape characteristics of each first graphic logo in the dot matrix module includes: binarizing each first graphic logo according to the shape characteristics of each first graphic logo in the dot matrix module to obtain the coding value corresponding to each first graphic logo.
[0114] In one embodiment, determining the coding information of the object to be identified based on the coding values corresponding to the first graphical identifiers includes: forming a binary coding data string corresponding to the dot matrix module based on the coding values corresponding to the first graphical identifiers; and determining the coding information of the object to be identified based on the binary coding data string.
[0115] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps: obtaining an object to be encoded and encoding information set for the object to be encoded, wherein the encoding information comprises encoding values arranged in sequence; determining a first graphic identifier corresponding to each encoding value according to the sequence of the encoding values in the encoding information, so as to obtain first graphic identifiers arranged in sequence corresponding to the encoding information; generating a dot matrix module according to the first graphic identifiers arranged in sequence; and after setting a color feature for the dot matrix module, superimposing the dot matrix module on the object to be encoded, so as to obtain a target object carrying the encoding information.
[0116] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the following steps: obtaining an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphic identifiers arranged in sequence, and each first graphic identifier corresponds to a coding value; identifying the dot matrix module from the object to be identified according to the color characteristics of the object to be identified; determining the coding values corresponding to each first graphic identifier in the dot matrix module according to the shape characteristics of each first graphic identifier; and determining the coding information of the object to be identified according to the coding values corresponding to each first graphic identifier.
[0117] In one embodiment, the dot matrix module also includes a starting position marker and an ending position marker, the starting position marker includes at least one second graphic marker different from the first graphic marker, which is used to indicate the starting position of the first graphic markers arranged in sequence in the dot matrix module, and the ending position marker includes at least one third graphic marker different from the first graphic marker, which is used to indicate the ending position of the first graphic markers arranged in sequence in the dot matrix module; before determining the coding value corresponding to each first graphic marker in the dot matrix module according to the shape characteristics of each first graphic marker in the dot matrix module, it also includes: identifying the starting position marker and the ending position marker according to the shape characteristics of each graphic marker in the dot matrix module; determining the starting position and the ending position of the arrangement of the first graphic markers arranged in sequence according to the starting position marker and the ending position marker.
[0118] In one embodiment, the second graphic logo and the third graphic logo are both non-centrally symmetric graphic logos; before determining the coding values corresponding to the first graphic logos in the dot matrix module according to the shape features of the first graphic logos, it also includes: obtaining the inclination angle of any graphic logo in the second graphic logo and / or the third graphic logo relative to the horizontal direction; rotating the dot matrix module by an angle equal to the inclination angle so that the dot matrix module is horizontal relative to the horizontal direction, to obtain a rotated dot matrix module; and identifying the shape features of the first graphic logos in the rotated dot matrix module.
[0119] In one embodiment, the identification distances between adjacent graphic logos in the dot matrix module are equal; before determining the coding values corresponding to each first graphic logo in the dot matrix module based on the shape features of each first graphic logo in the dot matrix module, it also includes: determining the position of each first graphic logo in the dot matrix module based on a preset identification distance; and identifying the shape features of each first graphic logo after the position is determined.
[0120] In one embodiment, determining the coding value corresponding to each first graphic logo in the dot matrix module based on the shape characteristics of each first graphic logo in the dot matrix module includes: binarizing each first graphic logo according to the shape characteristics of each first graphic logo in the dot matrix module to obtain the coding value corresponding to each first graphic logo.
[0121] In one embodiment, determining the coding information of the object to be identified based on the coding values corresponding to the first graphical identifiers includes: forming a binary coding data string corresponding to the dot matrix module based on the coding values corresponding to the first graphical identifiers; and determining the coding information of the object to be identified based on the binary coding data string.
[0122] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the following steps: obtaining an object to be encoded and encoding information set for the object to be encoded, the encoding information comprising sequentially arranged encoding values; determining a first graphical identifier corresponding to each encoding value according to the order of the encoding values in the encoding information to obtain sequentially arranged first graphical identifiers corresponding to the encoding information; generating a dot matrix module according to the sequentially arranged first graphical identifiers; and after setting a color feature for the dot matrix module, superimposing the dot matrix module on the object to be encoded to obtain a target object carrying the encoding information.
[0123] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0124] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for reading a code, characterized in that: The method comprises: Acquire an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating the coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value; Identify the dot matrix module from the object to be identified according to the color feature of the object to be identified; wherein the color feature of the object to be identified is the RGB value of the object to be identified, the color of each graphical mark in the dot matrix module has the same RGB value, and the area in the object to be identified whose RGB value is within the preset range of the RGB value is the dot matrix module area; Determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape characteristics of each first graphical mark; The coding information of the object to be identified is determined according to the coding values corresponding to the first graphical identifiers.
2. The method according to claim 1, characterized in that The dot matrix module further includes a starting position mark and an ending position mark, wherein the starting position mark includes at least one second graphic mark different from the first graphic mark, and is used to indicate the starting position of the first graphic marks arranged in sequence in the dot matrix module, and the ending position mark includes at least one third graphic mark different from the first graphic mark, and is used to indicate the ending position of the first graphic marks arranged in sequence in the dot matrix module; Before determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape feature of each first graphical mark, the method further includes: Identify the start position mark and the end position mark according to the shape characteristics of each graphic mark in the dot matrix module; The starting position and the ending position of the sequentially arranged first graphical identification arrangement are determined according to the starting position identification and the ending position identification.
3. The method according to claim 2, characterized in that The second graphical mark and the third graphical mark are both non-centrally symmetrical graphical marks; before determining the code values corresponding to the first graphical marks in the dot matrix module according to the shape characteristics of the first graphical marks, the method further includes: Obtaining an inclination angle of any one of the second graphical logo and / or the third graphical logo relative to a horizontal direction; Rotating the dot matrix module by an angle equal to the tilt angle so that the dot matrix module is horizontal relative to the horizontal direction, thereby obtaining a rotated dot matrix module; The shape features of the first graphical identifiers in the rotated dot matrix module are identified.
4. The method according to claim 1, characterized in that: The distances between adjacent graphic logos in the dot matrix module are equal; before determining the code values corresponding to the first graphic logos in the dot matrix module according to the shape features of the first graphic logos, the method further includes: Determining the position of each first graphical mark in the dot matrix module according to a preset mark distance; The shape features of each first graphical mark after the position is determined are identified.
5. The method according to claim 1, characterized in that The step of determining the code value corresponding to each first graphical mark in the dot matrix module according to the shape feature of each first graphical mark includes: Binarization is performed on each first graphical logo according to its shape feature in the dot matrix module to obtain a coding value corresponding to each first graphical logo.
6. The method according to claim 5, characterized in that The step of determining the coding information of the object to be identified according to the coding values corresponding to the first graphical identifiers includes: According to the code values corresponding to the first graphical identifiers, a binary code data string corresponding to the dot matrix module is formed; The encoding information of the object to be identified is determined according to the binary encoded data string.
7. A coding method, characterized in that: The method comprises: Acquire an object to be encoded and encoding information set for the object to be encoded, wherein the encoding information includes encoding values arranged in sequence; Determine the first graphical identifier corresponding to each coding value according to the order of the coding values in the coding information, so as to obtain the first graphical identifiers arranged in order corresponding to the coding information; Generating a dot matrix module according to the first graphical identifiers arranged in sequence; After setting the color feature for the dot matrix module, the dot matrix module is superimposed on the object to be encoded to obtain a target object carrying the encoding information; wherein the color feature of the object to be identified is the RGB value of the object to be identified, the color of each graphical logo in the dot matrix module has the same RGB value, and the area in the object to be identified where the RGB value is within a preset range of the RGB value is the dot matrix module area.
8. A code reading device, characterized in that: The device comprises: An acquisition module, used for acquiring an object to be identified that carries coding information, wherein the object to be identified includes a dot matrix module for indicating coding information, wherein the dot matrix module includes first graphical identifiers arranged in sequence, and each first graphical identifier corresponds to one coding value; A search module, used to identify the dot matrix module from the object to be identified according to the color feature of the object to be identified; wherein the color feature of the object to be identified is the RGB value of the object to be identified, the color of each graphical mark in the dot matrix module has the same RGB value, and the area in the object to be identified whose RGB value is within the preset range of the RGB value is the dot matrix module area; A first determination module, configured to determine a code value corresponding to each first graphical mark in the dot matrix module according to a shape feature of each first graphical mark; The second determination module is used to determine the coding information of the object to be identified according to the coding values corresponding to the first graphical identifiers.
9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Rectangular fixed dot matrix information encoding and decoding method
CN106845593A
Product identification code encoding method, product identification code recognition method and computer equipment
CN112633445A
Information coding method, information decoding method and device
CN113592514A