CN113688648B - Identification code encoding method - Google Patents

Identification code encoding method Download PDF

Info

Publication number
CN113688648B
CN113688648B CN202110902711.8A CN202110902711A CN113688648B CN 113688648 B CN113688648 B CN 113688648B CN 202110902711 A CN202110902711 A CN 202110902711A CN 113688648 B CN113688648 B CN 113688648B
Authority
CN
China
Prior art keywords
block
identification code
coded
coordinate correction
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110902711.8A
Other languages
Chinese (zh)
Other versions
CN113688648A (en
Inventor
陈明强
陈晓濠
朱思语
谭平
侯植宝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba China Co Ltd
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd, Alibaba Cloud Computing Ltd filed Critical Alibaba China Co Ltd
Priority to CN202110902711.8A priority Critical patent/CN113688648B/en
Publication of CN113688648A publication Critical patent/CN113688648A/en
Application granted granted Critical
Publication of CN113688648B publication Critical patent/CN113688648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06075Constructional details the marking containing means for error correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06093Constructional details the marking being constructed out of a plurality of similar markings, e.g. a plurality of barcodes randomly oriented on an object
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps

Abstract

The embodiment of the present specification provides an identification code encoding method, wherein the identification code encoding method includes: determining at least two adjacent regions to be coded according to object information contained in a carrier object, wherein each region to be coded comprises m × n blocks, m and n are positive integers, and determining a coordinate correction block in each region to be coded, wherein under the condition that the coordinate correction blocks in the current region to be coded are not distributed in the same column, the coordinate correction blocks in the adjacent regions to be coded in the current region to be coded are not distributed in the same row, determining a direction indication block and a data storage block in each region to be coded, and adding corresponding micro-image units in the coordinate correction blocks, the direction indication blocks and the data storage blocks to generate identification codes corresponding to the object information.

Description

Identification code encoding method
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to an identification code encoding method.
Background
The dot matrix two-dimensional code is a new information coding mode and is commonly used in audio books. The dot matrix two-dimensional code has the characteristics of large information carrying capacity, strong concealment and no influence on the visual attractiveness of publications, has an encryption anti-counterfeiting function, can be perfectly combined with paper media, and assists users in performing three-dimensional learning by combining visual sense and auditory sense.
At present, with the rapid development of mobile internet technology, the requirement for associating all media contents including figures, texts, audio and video on the internet with paper teaching materials is more and more urgent, but because the resources on the internet are massive, each associated digital media content must have a unique ID code, if the same ID code is repeatedly used, the associated digital media content will be separated into a plurality of independent systems, and a user will need to use different point reading pens for each independent system, which will undoubtedly increase the complexity of the use of the user. Therefore, how to increase the coding capacity of the dot matrix two-dimensional code becomes an urgent problem to be solved.
Disclosure of Invention
In view of this, the present specification provides an identification code encoding method. One or more embodiments of the present disclosure also relate to an identification code encoding apparatus, a computing device, a computer-readable storage medium, and a computer program, so as to solve the technical problems in the prior art.
According to a first aspect of embodiments of the present specification, there is provided an identification code encoding method, including:
determining at least two adjacent regions to be coded according to object information contained in a carrier object, wherein each region to be coded contains m × n blocks, and m and n are positive integers;
determining coordinate correction blocks in each region to be coded, wherein under the condition that the coordinate correction blocks in the current region to be coded are not distributed in the same column, the coordinate correction blocks in adjacent regions to be coded of the current region to be coded are not distributed in the same row;
determining a direction indication block and a data storage block in each area to be encoded;
and adding corresponding micro-image units in the coordinate correction block, the direction indication block and the data storage block to generate identification codes corresponding to the object information.
Optionally, the determining a coordinate correction block in each to-be-encoded region includes:
determining a target region consisting of the at least two adjacent regions to be coded, and determining the position information of each region to be coded in the target region;
and determining the coordinate correction block in each area to be coded according to the position information.
Optionally, the determining a coordinate correction block in each to-be-encoded region includes:
determining a coordinate correction block in a current region to be coded and a coordinate correction block in an adjacent region to be coded of the current region to be coded, wherein the coordinate correction blocks in the current region to be coded are distributed in the same row, and the coordinate correction blocks in the adjacent region to be coded are distributed in the same column;
and periodically and alternately arranging the coordinate correction blocks in the at least two adjacent regions to be coded according to the arrangement mode of the coordinate correction blocks in the current region to be coded and the adjacent regions to be coded.
Optionally, the determining the direction indication block and the data storage block in each to-be-encoded area includes:
taking any one block in m × n blocks contained in each region to be coded as a direction indication block of each region to be coded, wherein the position of a coordinate correction block in each region to be coded is different from the position of the direction indication block;
and taking the block except the coordinate correction block and the direction indication block in the m multiplied by n blocks contained in each area to be coded as a data storage block in each area to be coded.
Optionally, the adding corresponding microimage units to the coordinate correction block, the direction indication block, and the data storage block to generate an identification code corresponding to the object information includes:
and adding micro-image units corresponding to the code element types to the coordinate correction block, the direction indication block and the data storage block according to the code element types respectively corresponding to the coordinate correction block, the direction indication block and the data storage block so as to generate the identification codes corresponding to the object information.
Optionally, the identification code encoding method further includes:
in response to a decoding request submitted by the carrier object, determining a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
and determining an analysis rule corresponding to the identification code to be analyzed in the area to be decoded, and analyzing the identification code to be analyzed according to the analysis rule to generate a corresponding decoding result.
Optionally, the determining a parsing rule corresponding to the to-be-parsed identification code in the to-be-decoded region includes:
determining a coordinate correction block in the region to be decoded according to the code element type corresponding to the coordinate correction block;
and determining the identification code to be analyzed in the area to be decoded and the analysis rule corresponding to the identification code to be analyzed according to the position relation between the direction indication block in the area to be decoded and the coordinate correction block.
Optionally, the identification code encoding method further includes:
in response to a decoding request submitted by the carrier object, determining a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
determining coordinate correction blocks in the region to be decoded, and determining the central point of each coordinate correction block;
according to the arrangement mode of the coordinate correction blocks in the to-be-decoded area, a straight line parallel or perpendicular to the sides of the coordinate correction blocks is constructed along the central point, wherein the straight line divides each data storage block contained in the to-be-analyzed identification code in the to-be-decoded area into a plurality of sub-blocks;
identifying a code value corresponding to each data storage block according to the distribution condition of the microimage units in each data storage block in each sub-block;
and analyzing the identification code to be analyzed according to the code value to generate a corresponding decoding result.
Optionally, the analyzing the identification code to be analyzed according to the code value includes:
determining an analysis direction corresponding to the identification code to be analyzed according to the position relationship between the direction indication block in the identification code to be analyzed and the coordinate correction block;
under the condition that the analysis direction is a target analysis direction, constructing a first code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block;
and analyzing the identification code to be analyzed according to the first code value matrix.
Optionally, the identification code encoding method further includes:
determining a rotation center and a rotation angle of the identification code to be analyzed under the condition that the analysis direction does not belong to a target analysis direction;
carrying out rotation processing on the identification code to be analyzed according to the rotation center and the rotation angle;
constructing a second code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block in the rotation result;
and analyzing the identification code to be analyzed according to the second code value matrix.
According to a second aspect of embodiments of the present specification, there is provided an identification code encoding apparatus including:
the region determining module is configured to determine at least two adjacent regions to be coded according to object information contained in the carrier object, wherein each region to be coded contains m × n blocks, and m and n are positive integers;
the first block determining module is configured to determine coordinate correction blocks in each to-be-encoded region, wherein under the condition that the coordinate correction blocks in the current to-be-encoded region are not distributed in the same column, the coordinate correction blocks in adjacent to the current to-be-encoded region are not distributed in the same row;
a second block determining module configured to determine a direction indication block and a data storage block in each of the to-be-encoded areas;
the generating module is configured to add corresponding micro-image units to the coordinate correction block, the direction indication block and the data storage block so as to generate an identification code corresponding to the object information.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is used for storing computer executable instructions, and the processor is used for executing the steps of the computer executable instructions to realize any one of the identification code encoding methods.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any one of the identification code encoding methods.
According to a fifth aspect of embodiments herein, there is provided a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the steps of the above-mentioned identification code encoding method.
An embodiment of the present specification determines at least two adjacent regions to be encoded according to object information included in a carrier object, where each region to be encoded includes m × n blocks, and m and n are positive integers, and determines a coordinate correction block in each region to be encoded, where, in a case where coordinate correction blocks in a current region to be encoded are not distributed in a same column, coordinate correction blocks in adjacent regions to be encoded of the current region to be encoded are not distributed in a same row, determines a direction indication block and a data storage block in each region to be encoded, and adds corresponding micro-image units to the coordinate correction blocks, the direction indication blocks and the data storage blocks to generate an identification code corresponding to the object information.
In the embodiment of the description, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, the use complexity of a user is reduced, the visual interference of the identification code on pictures and texts in a carrier object is reduced, the operation amount of image recognition and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
Drawings
Fig. 1 is a flowchart of an identification code encoding method according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating an arrangement result of coordinate correcting blocks in a region to be encoded according to an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of a target area provided by one embodiment of the present description;
FIG. 4 is a diagram of a symbol type provided by one embodiment of the present description;
FIG. 5 is a diagram illustrating an identification code encoding result according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a region to be decoded according to an embodiment of the present specification;
fig. 7 is a flowchart illustrating a processing procedure of a method for encoding an identification code according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an identification code encoding apparatus according to an embodiment of the present disclosure;
fig. 9 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
Dot matrix two-dimensional code: the system consists of M-N virtual code point storage blocks, and a coordinate correction block, a plurality of data storage blocks and a direction indication block are respectively formed by filling code points in the virtual storage blocks. Since the code points are very tiny, the code points are easy to be ignored visually and can coexist with the original patterns on the printed matters.
In the present specification, an identification code encoding method is provided, and the present specification relates to an identification code encoding apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
The dot matrix two-dimensional code coding is a technology which can hide digital data in a common printed matter through a standard printing program and ink and can coexist with an original pattern on the printed matter. Generally, two-dimensional codes with different code values are embedded in different positions of a printed matter, and then a specific reader reads the two-dimensional codes to obtain the code values of the positions.
Under the condition that does not change traditional paper and write and experience, with the data in high in the clouds with the mode of stealthy dot matrix two-dimensional code, print on the paper to through the pen that has the discernment inductor will write process information acquisition record, transmit to the high in the clouds and carry out data analysis, finally realize the paper digitization.
In the current education mode, the requirement for associating the full media content including the pictures, the texts, the audios and the videos on the internet with the paper teaching materials is more and more urgent, but because the resources on the internet are massive, each associated digital media content must have unique lattice codes, if the lattice codes are recycled, the digital media content needs to be divided into a plurality of independent systems, and for each independent system, a user needs to use different reading pens, which greatly increases the use complexity of the user.
To solve the above problem, the coding capacity of the dot matrix two-dimensional code needs to be increased. At present, two ways are available for increasing the coding capacity, the first way is to keep the area of a single dot matrix two-dimensional code unchanged and increase the printing density of code points, but the visual interference of the code points to pictures and texts is increased, so that the pictures and texts are much darker than the normal printing; the second method is to keep the code dot spacing unchanged and increase the area of a single dot matrix two-dimensional code, but this will significantly increase the amount of image recognition computation and the error rate of code dot coordinate positioning.
Based on this, the identification code encoding method provided in the embodiments of the present specification determines at least two adjacent regions to be encoded according to object information included in a carrier object, determines a coordinate correction block in each region to be encoded, where, under the condition that the coordinate correction blocks in the current region to be encoded are not distributed in the same column, the coordinate correction blocks in the adjacent regions to be encoded of the current region to be encoded are not distributed in the same row, then determines a direction indication block and a data storage block in each region to be encoded, and adds corresponding micro-image units in the coordinate correction blocks, the direction indication blocks and the data storage blocks by using this encoding method, so as to generate an identification code corresponding to the object information.
In the embodiment of the description, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, the use complexity of a user is reduced, the visual interference of the identification code on pictures and texts in a carrier object is reduced, the operation amount of image recognition and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
Fig. 1 shows a flowchart of an identification code encoding method according to an embodiment of the present specification, which specifically includes the following steps.
Step 102, determining at least two adjacent regions to be coded according to object information contained in the carrier object, wherein each region to be coded contains m × n blocks, and m and n are positive integers.
Specifically, the identification code described in the embodiments of the present specification may be a dot matrix code, and specifically may be a dot matrix two-dimensional code; the method comprises the steps of coding the area to be coded by reasonably setting a coordinate correction block, a direction indication block and a data storage block in the area to be coded to generate a corresponding identification code, so that the coding capacity of the identification code is improved.
In practical applications, the carrier object is a carrier for carrying an identification code, and the carrier includes but is not limited to cards, books, newspapers, and the like; the carrier object includes object information, i.e. object information corresponding to each object in the carrier, the object information includes, but is not limited to, identification information of the carrier, position information of the object in the carrier, etc., for example, if the carrier object is a book, the object may be each page in the book, the object information may be a book name of the book, and a position of each page in the book, i.e. a page belonging to the book, etc.
The embodiments of the present specification may determine (generate) at least two adjacent regions to be encoded in the carrier object, and generate a corresponding identification code in each region to be encoded, where the identification code is used to characterize the identification information of the carrier object, the position information of the object in the carrier object, and the position information of the identification code in the object.
Specifically, at least two adjacent regions to be coded need to be determined, so as to determine the coordinate correction block in each region to be coded according to the position relationship of the at least two adjacent regions to be coded.
In addition, the blocks, i.e., the virtual code point storage blocks, are used for filling (adding) the micro image units corresponding to the code points, and each to-be-encoded area includes a plurality of blocks, and each identification code is composed of the micro image units in the plurality of blocks.
In the embodiment of the present specification, each region to be coded includes m × n blocks, where m and n are positive integers; in practical applications, m and n may take on values of 6, that is, each region to be encoded includes 36 blocks of 6 × 6.
And 104, determining the coordinate correction blocks in each area to be coded, wherein the coordinate correction blocks in the adjacent areas to be coded of the current area to be coded are not distributed in the same row under the condition that the coordinate correction blocks in the current area to be coded are not distributed in the same column.
Specifically, after at least two adjacent regions to be coded are determined, a coordinate correction block in each region to be coded can be determined; the coordinate correcting block in the embodiment of this specification is used to fill the micro image unit corresponding to the coordinate correcting code element, and during the process of decoding the identification code, the coordinate origin (the intersection point obtained by performing horizontal or vertical straight extension along the center point of the coordinate correcting block) of each data storage block in the identification code may be determined according to the coordinate correcting block in each region to be decoded, so as to establish a coordinate system in each data storage block with the coordinate origin, and further determine the position of the micro image unit in each data storage block in the coordinate system, so as to perform decoding processing on the identification code according to the position.
Therefore, under the condition that the coordinate origin of each data storage block in each to-be-decoded region can be obtained, only two adjacent to-be-coded regions need to be ensured, wherein the coordinate correction blocks in one to-be-coded region (the current to-be-coded region) are not distributed in the same column, each column is provided with one coordinate correction block, the coordinate correction blocks in the other to-be-coded region (the adjacent to-be-coded region of the current to-be-coded region) are not distributed in the same row, each row is provided with one coordinate correction block, and the position of each coordinate correction block is not limited.
In addition, the coordinate correction block in each area to be coded is determined, which can be realized by the following steps:
determining a target region consisting of the at least two adjacent regions to be coded, and determining the position information of each region to be coded in the target region;
and determining the coordinate correction block in each area to be coded according to the position information.
Specifically, after at least two adjacent regions to be coded are determined, a large target region composed of the at least two adjacent regions to be coded can be determined, and the position information of each region to be coded in the target region is determined; the position information may be row information and column information of each to-be-encoded region in the target region, and is used to determine which row and which column of the to-be-encoded region in the target region.
After the position information is determined, the coordinate correction block in each area to be coded can be determined according to the position information.
For example, two types of regions to be encoded may be preset, and if coordinates are set for 6 × 6 blocks within the region to be encoded, and the coordinates corresponding to the 6 × 6 blocks are (1,1), (1,2), …, (1,6), (2,1), (2,2), …, (2,6), …, (6,1), (6,2), …, (6,6), respectively, the coordinates corresponding to the coordinate correction blocks within the first type of region to be encoded may be (1,1), (1,2), (2,3), (3,4), (3,5), (1,6), and are not distributed in the same column; the coordinates corresponding to the coordinate calibration blocks in the second type of region to be encoded may be (1,1), (2,1), (3,3), (4,3), (5,2), (6,1), and are not distributed in the same row; after the two types of regions to be coded are set, the regions to be coded, which are positioned in odd-numbered rows and odd-numbered columns or even-numbered rows and even-numbered columns in the target region, can be set as a first type, the regions to be coded, which are positioned in odd-numbered rows and even-numbered columns in the target region, are set as a second type, and the coordinate correction blocks in each region to be coded are determined according to the position information of the coordinate correction blocks in the first type and the second type regions to be coded.
In this way, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, which is beneficial to increasing the coding capacity of the identification code and reducing the use complexity of a user.
Or, determining the coordinate correction block in each region to be encoded may also be implemented by:
determining a coordinate correction block in a current region to be coded and a coordinate correction block in an adjacent region to be coded of the current region to be coded, wherein the coordinate correction blocks in the current region to be coded are distributed in the same row, and the coordinate correction blocks in the adjacent region to be coded are distributed in the same column;
and periodically and alternately arranging the coordinate correction blocks in the at least two adjacent regions to be coded according to the arrangement mode of the coordinate correction blocks in the current region to be coded and the adjacent regions to be coded.
Specifically, after at least two adjacent regions to be encoded are determined, because the coordinate correction blocks in one of the two adjacent regions to be encoded (the current region to be encoded) are not distributed in the same column, and the coordinate correction blocks in the other region to be encoded (the adjacent region to be encoded of the current region to be encoded) are not distributed in the same row, in the embodiment of the present specification, the coordinate correction blocks in one of the two adjacent regions to be encoded (the current region to be encoded) are set to be in the same row (not distributed in the same column), a schematic diagram of which is shown in fig. 2(a), and a block where P0 is located is the coordinate correction block; a schematic diagram of the coordinate correction blocks in another region to be coded (a region to be coded adjacent to the current region to be coded) is set to be in the same column (not distributed in the same row), which is shown in fig. 2(b), and the coordinate correction blocks are periodically and alternately arranged in the at least two adjacent regions to be coded according to the arrangement manner of the coordinate correction blocks in the current region to be coded and the adjacent regions to be coded, and a schematic diagram of a generated target region is shown in fig. 3.
In the embodiment of the description, the coordinate correction blocks are arranged in the same row or the same column of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the image recognition computation amount and the code point coordinate positioning error rate in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
And step 106, determining the direction indication block and the data storage block in each area to be encoded.
In specific implementation, the determining of the direction indication block and the data storage block in each to-be-encoded region may be specifically implemented by the following steps:
taking any one block in m × n blocks contained in each region to be coded as a direction indication block of each region to be coded, wherein the position of a coordinate correction block in each region to be coded is different from the position of the direction indication block;
and taking the block except the coordinate correction block and the direction indication block in the m multiplied by n blocks contained in each area to be coded as a data storage block in each area to be coded.
Specifically, each region to be coded includes a coordinate correction block, a direction indication block, and a data storage block, where each region to be coded includes only one direction storage block, and thus, after the coordinate correction block in each region to be coded is determined, any one of m × n blocks except for the coordinate correction block may be used as the direction indication block, as shown in fig. 2(a) or fig. 2(b), the block where P1 is located is the direction indication block, and other blocks except for the coordinate correction block and the direction indication block in the m × n blocks are used as the data storage blocks, and similarly, as shown in fig. 2(a) or fig. 2(b), other blank blocks except for the blocks where P0 and P1 are located are used as the data storage blocks.
For example, if each region to be encoded includes 6 × 6 blocks, the number of coordinate correction blocks is 6, the number of direction indication blocks is 1, and the other 29 blocks can be used as data storage blocks.
In the embodiment of the specification, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, and the use complexity of a user is reduced.
And 108, adding corresponding micro-image units to the coordinate correction block, the direction indication block and the data storage block to generate identification codes corresponding to the object information.
In specific implementation, corresponding microimage units are added to the coordinate correction block, the direction indication block and the data storage block to generate the identification codes corresponding to the object information, which can be specifically implemented by the following steps:
and adding micro-image units corresponding to the code element types to the coordinate correction block, the direction indication block and the data storage block according to the code element types respectively corresponding to the coordinate correction block, the direction indication block and the data storage block so as to generate the identification codes corresponding to the object information.
Specifically, as mentioned above, each region to be coded includes three types of blocks, namely, a coordinate correction block, a direction indication block and a data storage block, and each type of block corresponds to a different symbol type.
For example, a schematic diagram of a symbol type corresponding to a coordinate correction block in the embodiment of the present disclosure is shown in fig. 4, where a micro image unit corresponding to the symbol type in fig. 4(a) is located at a center position of the block; the symbol types in fig. 4(b) correspond to two micro image units, which can be located in any two sub-blocks if the direction indication block is divided into 4 sub-blocks; in fig. 4(c), if the data storage block is divided into 4 sub-blocks, the microimage unit corresponding to the symbol type may be located in any one sub-block, and the microimage units in different sub-blocks correspond to different code values, for example, the code value corresponding to the microimage unit in d1 may be 0, the code value corresponding to the microimage unit in d2 may be 1, the code value corresponding to the microimage unit in d3 may be 2, and the code value corresponding to the microimage unit in d4 may be 3.
After determining the symbol types corresponding to the different blocks, a micro image unit corresponding to the symbol type of the block may be added to the different blocks of each to-be-encoded region to generate an identification code corresponding to object information in a carrier object, where a schematic diagram of an identification code encoding result provided in an embodiment of the present specification is shown in fig. 5. If the identification code is located on the 1 st row and 1 st column of the 3 rd page in the book T, the generated identification code includes information such as the book T, the 3 rd page, the 1 st row and the 1 st column.
The coordinate correction blocks are arranged on different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, the use complexity of a user is reduced, the visual interference of the identification code on pictures and texts in a carrier object is reduced, the operation amount of image recognition and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
In addition, after the identification code is generated, the identification code may be decoded, which may be specifically implemented as follows:
in response to a decoding request submitted by aiming at the carrier object, determining a region to be decoded in the carrier object according to the direction indication block in the carrier object;
and determining an analysis rule corresponding to the identification code to be analyzed in the area to be decoded, and analyzing the identification code to be analyzed according to the analysis rule to generate a corresponding decoding result.
Further, determining an analysis rule corresponding to the identification code to be analyzed in the area to be decoded may specifically be implemented in the following manner:
determining a coordinate correction block in the region to be decoded according to the code element type corresponding to the coordinate correction block;
and determining the identification code to be analyzed in the area to be decoded and the analysis rule corresponding to the identification code to be analyzed according to the position relation between the direction indication block in the area to be decoded and the coordinate correction block.
Specifically, after at least two adjacent regions to be encoded are encoded to generate corresponding identification codes, the identification codes can be printed at corresponding positions of the carrier object, so that a user can submit a decoding request in a manner that the identification codes are scanned by an identification code scanning device (e.g., a touch-and-talk pen).
In the embodiment of the description, because the micro image unit corresponding to the code element type of the direction indication block in the identification code is different from the micro image units corresponding to the code element types of other blocks, an image identification module in the identification code scanning device can conveniently and quickly identify the position of the identification code, and the identification code scanning device has an easily-identified characteristic. Therefore, after receiving a decoding request submitted by a user for the carrier object, the area to be decoded in the carrier object can be determined according to the direction indication block scanned by the identification code scanning device.
In addition, the direction identification block can be used for determining the type of the identification code to be analyzed in the area to be identified by combining the coordinate correction block in the area to be identified so as to determine whether the identification code belongs to the horizontal identification code or the vertical identification code.
In practical application, since the setting manner of the coordinate correction block in each to-be-encoded region is known in the process of generating the identification code, the to-be-analyzed identification code in the to-be-decoded region can still be determined based on the aforementioned setting manner of the coordinate correction block in each to-be-encoded region and the direction indication block in each to-be-encoded region in the process of decoding.
For example, when encoding a region to be encoded, the coordinate correction block in the region to be encoded is set in the following manner: determining blocks in a first row in a current block to be coded as coordinate correction blocks, and determining blocks in a first column in an adjacent block to be coded of the current block to be coded as coordinate correction blocks; therefore, when the area to be decoded is decoded, after the coordinate correction block and the direction indication block in the area to be decoded are determined, the identification code to be analyzed can be determined according to the setting mode of the coordinate correction block, and then the analysis rule corresponding to the identification code to be analyzed is determined according to the position relation between the coordinate correction block and the direction indication block in the identification code to be analyzed.
If the position relationship between the coordinate correcting block and the direction indicating block in the identification code to be analyzed is the same as the position relationship between the coordinate correcting block and the direction indicating block in fig. 2(a), the identification code to be analyzed can be determined to be a longitudinal identification code, and in this case, the analysis rule corresponding to the longitudinal identification code can be used as the decoding rule corresponding to the identification code to be analyzed; if the position relationship between the coordinate calibration block and the direction indication block in the identifier to be analyzed is the same as the position relationship between the coordinate calibration block and the direction indication block in fig. 2(b), the identifier to be analyzed can be determined as the horizontal identifier, and in this case, the analysis rule corresponding to the horizontal identifier can be used as the decoding rule corresponding to the identifier to be analyzed.
After the analysis rule corresponding to the identification code to be analyzed in the area to be decoded is determined, the identification code to be analyzed can be analyzed according to the analysis rule, and a corresponding decoding result is generated.
According to the position relation between the direction indication block in the area to be decoded and the coordinate correction block, the identification code to be analyzed in the area to be decoded and the analysis rule corresponding to the identification code to be analyzed are determined, so that the operation amount of image identification and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
In addition, the process of decoding the identification code can be realized by the following steps:
in response to a decoding request submitted by the carrier object, determining a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
determining coordinate correction blocks in the region to be decoded, and determining the central point of each coordinate correction block;
according to the arrangement mode of the coordinate correction blocks in the to-be-decoded area, a straight line parallel or perpendicular to the sides of the coordinate correction blocks is constructed along the central point, wherein the straight line divides each data storage block contained in the to-be-analyzed identification code in the to-be-decoded area into a plurality of sub-blocks;
identifying a code value corresponding to each data storage block according to the distribution condition of the microimage units in each data storage block in each sub-block;
and analyzing the identification code to be analyzed according to the code value to generate a corresponding decoding result.
Specifically, as previously described, the user may submit the decode request by scanning the identification code with an identification code scanning device (e.g., a stylus).
In the embodiment of the present specification, after receiving the decoding request, the region to be decoded in the carrier object may be determined according to the direction indication block scanned by the identification code scanning device, and then the identification code to be resolved in the region to be decoded may be determined based on the setting mode of the coordinate correction block and the direction indication block in each region to be encoded in the encoding process of each region to be encoded; and then, determining coordinate correction blocks in the area to be decoded, determining the center point of each coordinate correction block, and then constructing a straight line parallel or perpendicular to the edge of the coordinate correction block along the center point according to the arrangement mode of the coordinate correction blocks in the area to be decoded, wherein the straight line divides each data storage block contained in the identification code to be analyzed in the area to be decoded into a plurality of sub-blocks.
Fig. 6 shows a schematic diagram of a region to be decoded provided in an embodiment of the present specification, where if a region to be encoded is encoded, a coordinate correction block in the region to be encoded is set in a manner that: determining blocks in a first row in a current block to be coded as coordinate correction blocks, and determining blocks in a first column in an adjacent block to be coded of the current block to be coded as coordinate correction blocks; therefore, when the region to be decoded is decoded, after the coordinate calibration block and the direction indication block in the region to be decoded are determined, the identification code to be analyzed determined according to the setting manner of the coordinate calibration block is shown in fig. 6.
After the identification code to be analyzed is determined, the coordinate correction blocks in the determined area to be decoded are the blocks where P0 in fig. 6 is located, and since the coordinate correction blocks in the identification code to be analyzed in fig. 6 are distributed in the same row, that is, not distributed in the same column, for the coordinate correction blocks in the identification code to be analyzed, after the central point of each coordinate correction block is determined, a straight line parallel to the left edge or the right edge of the coordinate correction block can be longitudinally constructed along the central point; for other coordinate calibration blocks except the identification code to be analyzed in fig. 6, since they are distributed in the same row, i.e., not distributed in the same row, for these coordinate calibration blocks, after the central point of each coordinate calibration block is determined, a straight line parallel to the upper edge or the lower edge of the coordinate calibration block can be established along the central point in the transverse direction.
Each data storage block contained in the identification code to be analyzed is divided into a plurality of sub-blocks through the straight lines constructed in the mode, then the code value corresponding to each data storage block can be identified according to the distribution condition of the micro-image units in each sub-block, the identification code to be analyzed is analyzed according to the code value, and the corresponding decoding result is generated.
Still taking the carrier object as a book as an example, if the identification code includes information such as a book T, a page 3, a line 1, a column 1, and the like, the information can be obtained by decoding the information, then book information corresponding to the position of the identification code in the first line and the first column in the page 3 of the book T can be determined according to the information, and if the book information is an audio playing identifier, corresponding audio is played, where the audio may be a vocal book corresponding to the text, or music corresponding to a scene described by the text, and the like, and is not limited herein.
Or, taking the carrier object as a test question as an example, if the user fills an answer at a certain position of the test question, the identification code scanning device may decode a plurality of identification codes corresponding to the position of the answer to determine the position information of the plurality of identification codes in the test question, and then may determine a track corresponding to the answer filled by the user according to the plurality of position information to restore the specific content of the answer according to the track, and in this way, the content filled by the user may be recorded to prevent information loss, or the content filled by the user may be synchronized in different devices to implement remote synchronous or asynchronous reception of information.
Further, after the code value corresponding to each data storage block is obtained through identification, the identification code to be analyzed is analyzed according to the code value, which can be specifically realized through the following modes:
determining an analysis direction corresponding to the identification code to be analyzed according to the position relationship between the direction indication block in the identification code to be analyzed and the coordinate correction block;
under the condition that the analysis direction is a target analysis direction, constructing a first code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block;
and analyzing the identification code to be analyzed according to the first code value matrix.
Or, determining a rotation center and a rotation angle of the identification code to be analyzed under the condition that the analysis direction does not belong to the target analysis direction;
rotating the identification code to be analyzed according to the rotation center and the rotation angle;
constructing a second code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block in the rotation result;
and analyzing the identification code to be analyzed according to the second code value matrix.
Specifically, the direction identification block in the identification code to be analyzed can be used for determining the area to be identified, and the type of the identification code to be analyzed in the area to be identified can be determined by combining the coordinate correction block in the area to be identified so as to determine whether the identification code belongs to the horizontal identification code or the vertical identification code.
In practical application, since the setting manner of the coordinate correction block in each to-be-encoded region is known in the process of generating the identification code, the to-be-analyzed identification code in the to-be-decoded region can still be determined based on the aforementioned setting manner of the coordinate correction block in each to-be-encoded region and the direction indication block in each to-be-encoded region in the process of decoding.
For example, when encoding a region to be encoded, the coordinate correction block in the region to be encoded is set in the following manner: determining blocks in a first row in a current block to be coded as coordinate correction blocks, and determining blocks in a first column in an adjacent block to be coded of the current block to be coded as coordinate correction blocks; therefore, when the area to be decoded is decoded, after the coordinate correction block and the direction indication block in the area to be decoded are determined, the identification code to be analyzed can be determined according to the setting mode of the coordinate correction block, and then the analysis rule corresponding to the identification code to be analyzed is determined according to the position relation between the coordinate correction block and the direction indication block in the identification code to be analyzed.
If the position relationship between the coordinate correcting block and the direction indicating block in the identification code to be analyzed is the same as the position relationship between the coordinate correcting block and the direction indicating block in fig. 2(a), the identification code to be analyzed can be determined to be a longitudinal identification code, and in this case, the analysis rule corresponding to the longitudinal identification code can be used as the decoding rule corresponding to the identification code to be analyzed; if the position relationship between the coordinate calibration block and the direction indication block in the identifier to be analyzed is the same as the position relationship between the coordinate calibration block and the direction indication block in fig. 2(b), the identifier to be analyzed can be determined as the horizontal identifier, and in this case, the analysis rule corresponding to the horizontal identifier can be used as the decoding rule corresponding to the identifier to be analyzed.
The target analysis direction is a longitudinal analysis direction, so that when the identification code to be analyzed is determined to be a longitudinal identification code, the corresponding analysis direction is the target analysis direction, and in this case, the m × n first code value matrix corresponding to the identification code to be analyzed can be directly constructed based on the code value corresponding to each block in the identification code to be analyzed. As shown in fig. 6, the coordinates of the block in the identifier to be analyzed correspond to the elements in the matrix one to one, that is, the code value corresponding to the block with the coordinate of (1,1) is the element value corresponding to the element (1,1) in the first code value matrix. After the first code value matrix is constructed, the first code value matrix can be analyzed, and a corresponding decoding result is generated.
Alternatively, in the case where the identification code to be analyzed is determined to be a horizontal identification code, the analysis direction of the identification code does not belong to the target analysis direction, and in this case, the identification code to be analyzed may be rotated, for example, if the direction of the identification code to be analyzed is consistent with the direction of the area to be encoded shown in fig. 2(b), the identification code to be analyzed may be rotated clockwise by 90 degrees, and then the second code value matrix may be constructed based on the rotation result.
An embodiment of the present specification determines at least two adjacent regions to be encoded according to object information included in a carrier object, where each region to be encoded includes m × n blocks, and m and n are positive integers, and determines a coordinate correction block in each region to be encoded, where, in a case where coordinate correction blocks in a current region to be encoded are not distributed in a same column, coordinate correction blocks in adjacent regions to be encoded of the current region to be encoded are not distributed in a same row, determines a direction indication block and a data storage block in each region to be encoded, and adds corresponding micro-image units to the coordinate correction blocks, the direction indication blocks and the data storage blocks to generate an identification code corresponding to the object information.
In the embodiment of the description, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, the use complexity of a user is reduced, the visual interference of the identification code on pictures and texts in a carrier object is reduced, the operation amount of image recognition and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
The following description will further describe the identification code encoding method with reference to fig. 7 by taking an application of the identification code encoding method provided in the present specification in a vocal book scenario as an example. Fig. 7 is a flowchart illustrating a processing procedure of an identification code encoding method according to an embodiment of the present specification, and specifically includes the following steps.
Step 702, determining at least two adjacent regions to be encoded according to book units contained in the book T, wherein each region to be encoded contains m × n blocks, and m and n are positive integers.
Step 704, determine the coordinate calibration block in the target region to be encoded and the coordinate calibration block in an adjacent region to be encoded of the target region to be encoded.
The coordinate correction blocks in the target area to be coded are distributed in the same row, the coordinate correction blocks in the adjacent area to be coded are distributed in the same column, and the target area to be coded is one of at least two adjacent areas to be coded.
Step 706, according to the arrangement mode of the coordinate correction blocks in the target region to be encoded and the region to be encoded adjacent to the target region to be encoded, periodically and alternately arranging the coordinate correction blocks in at least two adjacent regions to be encoded.
Step 708, any block except the coordinate correction block in the m × n blocks included in each to-be-encoded area is taken as the direction indication block of each to-be-encoded area.
In step 710, of the m × n blocks included in each region to be encoded, the blocks except the coordinate correcting block and the direction indicating block are used as data storage blocks in each region to be encoded.
Step 712, adding a micro-image unit corresponding to the symbol type to the coordinate correction block, the direction indication block and the data storage block according to the symbol type respectively corresponding to the coordinate correction block, the direction indication block and the data storage block, so as to generate an identification code corresponding to the book unit.
Step 714, in response to the decoding request submitted for any book unit in the image T, determining the region to be decoded in the book unit according to the direction indication block in the book unit.
Step 716, determine the coordinate calibration blocks in the region to be decoded, and determine the center point of each coordinate calibration block.
Step 718, constructing a straight line parallel or perpendicular to the edge of the coordinate correction block along the central point according to the arrangement of the coordinate correction block in the to-be-decoded region, wherein the straight line divides each data storage block included in the to-be-analyzed identification code in the to-be-decoded region into a plurality of sub-blocks.
And step 720, identifying the code value corresponding to each data storage block according to the distribution condition of the micro image unit in each sub-block.
And step 722, analyzing the identification code to be analyzed according to the code value, and generating a corresponding decoding result.
And step 724, playing the corresponding audio according to the decoding result.
In the embodiment of the description, the coordinate correction blocks are arranged in different rows or columns of each region to be coded, so that more blocks can be used for data storage in each region to be coded, the coding capacity of the identification code is increased, the use complexity of a user is reduced, the visual interference of the identification code on pictures and texts in a carrier object is reduced, the operation amount of image recognition and the error rate of code point coordinate positioning in the process of decoding the identification code are reduced, and the accuracy of the decoding result of the identification code is improved.
Corresponding to the above method embodiment, the present specification further provides an identification code encoding apparatus embodiment, and fig. 8 shows a schematic structural diagram of an identification code encoding apparatus provided in an embodiment of the present specification. As shown in fig. 8, the apparatus includes:
a region determining module 802 configured to determine at least two adjacent regions to be encoded according to object information contained in the carrier object, wherein each region to be encoded contains m × n blocks, and m and n are positive integers;
a first block determining module 804, configured to determine coordinate correction blocks in each of the regions to be encoded, where coordinate correction blocks in adjacent regions to be encoded of the current region to be encoded are not distributed in the same row in a case that coordinate correction blocks in the current region to be encoded are not distributed in the same column;
a second block determination module 806 configured to determine a direction indication block and a data storage block within each of the to-be-encoded areas;
a generating module 808 configured to add corresponding microimage units to the coordinate correction block, the direction indication block and the data storage block to generate an identification code corresponding to the object information.
Optionally, the first block determining module 804 is further configured to:
determining a target region consisting of the at least two adjacent regions to be coded, and determining the position information of each region to be coded in the target region;
and determining the coordinate correction block in each area to be coded according to the position information.
Optionally, the first block determining module 804 is further configured to:
determining a coordinate correction block in a current region to be coded and a coordinate correction block in an adjacent region to be coded of the current region to be coded, wherein the coordinate correction blocks in the current region to be coded are distributed in the same row, and the coordinate correction blocks in the adjacent region to be coded are distributed in the same column;
and periodically and alternately arranging the coordinate correction blocks in the at least two adjacent regions to be coded according to the arrangement mode of the coordinate correction blocks in the current region to be coded and the adjacent regions to be coded.
Optionally, the second block determining module 806 is further configured to:
taking any one block in m × n blocks contained in each region to be coded as a direction indication block of each region to be coded, wherein the position of a coordinate correction block in each region to be coded is different from the position of the direction indication block;
and taking the block except the coordinate correction block and the direction indication block in the m multiplied by n blocks contained in each area to be coded as a data storage block in each area to be coded.
Optionally, the generating module 808 is further configured to:
and adding micro-image units corresponding to the code element types to the coordinate correction block, the direction indication block and the data storage block according to the code element types respectively corresponding to the coordinate correction block, the direction indication block and the data storage block so as to generate the identification codes corresponding to the object information.
Optionally, the identification code encoding apparatus further includes:
a first response module configured to respond to a decoding request submitted by the carrier object, and determine a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
the first analysis module is configured to determine an analysis rule corresponding to the identification code to be analyzed in the area to be decoded, and analyze the identification code to be analyzed according to the analysis rule to generate a corresponding decoding result.
Optionally, the parsing module is further configured to:
determining a coordinate correction block in the region to be decoded according to the code element type corresponding to the coordinate correction block;
and determining the identification code to be analyzed in the area to be decoded and the analysis rule corresponding to the identification code to be analyzed according to the position relation between the direction indication block in the area to be decoded and the coordinate correction block.
Optionally, the identification code encoding apparatus further includes:
a second response module, configured to respond to a decoding request submitted for the carrier object, and determine a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
the center point determining module is configured to determine coordinate correction blocks in the to-be-decoded area and determine the center point of each coordinate correction block;
the construction module is configured to construct a straight line parallel or perpendicular to the edge of the coordinate correction block along the central point according to the arrangement mode of the coordinate correction block in the to-be-decoded area, wherein the straight line divides each data storage block contained in the to-be-analyzed identification code in the to-be-decoded area into a plurality of sub-blocks;
the identification module is configured to identify the code value corresponding to each data storage block according to the distribution condition of the microimage units in each data storage block in each sub-block;
and the second analysis module is configured to analyze the identification code to be analyzed according to the code value and generate a corresponding decoding result.
Optionally, the second parsing module is further configured to:
determining the analysis direction corresponding to the identification code to be analyzed according to the position relation between the direction indication block in the identification code to be analyzed and the coordinate correction block;
under the condition that the analysis direction is a target analysis direction, constructing a first code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block;
and analyzing the identification code to be analyzed according to the first code value matrix.
Optionally, the identification code encoding apparatus, the processing module, is configured to:
determining a rotation center and a rotation angle of the identification code to be analyzed under the condition that the analysis direction does not belong to the target analysis direction;
carrying out rotation processing on the identification code to be analyzed according to the rotation center and the rotation angle;
constructing a second code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block in the rotation result; and analyzing the identification code to be analyzed according to the second code value matrix.
The above is a schematic scheme of an identification code encoding apparatus of the present embodiment. It should be noted that the technical solution of the identification code encoding apparatus and the technical solution of the identification code encoding method belong to the same concept, and details that are not described in detail in the technical solution of the identification code encoding apparatus can be referred to the description of the technical solution of the identification code encoding method.
FIG. 9 illustrates a block diagram of a computing device 900 provided in accordance with one embodiment of the present specification. Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is coupled to the memory 910 via a bus 930, and a database 950 is used to store data.
Computing device 900 also includes access device 940, access device 940 enabling computing device 900 to communicate via one or more networks 960. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 940 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 900, as well as other components not shown in FIG. 9, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 9 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 900 may also be a mobile or stationary server.
The processor 920 is configured to execute computer-executable instructions, which when executed by the processor implement the steps of the above-mentioned identification code encoding method.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above identification code encoding method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the above identification code encoding method.
An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor, implement the steps of the above-mentioned identifier encoding method.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above identification code encoding method, and for details that are not described in detail in the technical solution of the storage medium, reference may be made to the description of the technical solution of the above identification code encoding method.
An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above identification code encoding method.
The above is an illustrative scheme of a computer program of the present embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above identification code encoding method belong to the same concept, and details that are not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the above identification code encoding method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.

Claims (12)

1. An identification code encoding method, comprising:
determining at least two adjacent regions to be coded according to object information contained in a carrier object, wherein each region to be coded contains m × n blocks, and m and n are positive integers;
determining coordinate correction blocks in each area to be coded, wherein under the condition that the coordinate correction blocks in the current area to be coded are not distributed in the same column and each column has one coordinate correction block, the coordinate correction blocks in the adjacent areas to be coded of the current area to be coded are not distributed in the same row and each row has one coordinate correction block, and the number of the coordinate correction blocks in each area to be coded is equal to m or n;
determining a direction indication block and a data storage block in each area to be encoded;
and adding corresponding micro-image units to the coordinate correction block, the direction indication block and the data storage block to generate identification codes corresponding to the object information.
2. The identification code encoding method of claim 1, wherein the determining the coordinate correction block in each area to be encoded comprises:
determining a target region consisting of the at least two adjacent regions to be coded, and determining the position information of each region to be coded in the target region;
and determining the coordinate correction block in each area to be coded according to the position information.
3. The identification code encoding method of claim 1, wherein the determining the coordinate correction block in each area to be encoded comprises:
determining a coordinate correction block in a current region to be coded and a coordinate correction block in an adjacent region to be coded of the current region to be coded, wherein the coordinate correction blocks in the current region to be coded are distributed in the same row, and the coordinate correction blocks in the adjacent region to be coded are distributed in the same column;
and periodically and alternately arranging the coordinate correction blocks in the at least two adjacent regions to be coded according to the arrangement mode of the coordinate correction blocks in the current region to be coded and the adjacent regions to be coded.
4. The identification code encoding method of claim 1, wherein the determining of the direction indication block and the data storage block in each of the areas to be encoded comprises:
taking any one block in m × n blocks contained in each region to be coded as a direction indication block of each region to be coded, wherein the position of a coordinate correction block in each region to be coded is different from the position of the direction indication block;
and taking the block except the coordinate correction block and the direction indication block in the m multiplied by n blocks contained in each area to be coded as a data storage block in each area to be coded.
5. The method for encoding identification codes according to claim 1 or 4, wherein the adding corresponding micro-image units to the coordinate correction block, the direction indication block and the data storage block to generate the identification codes corresponding to the object information comprises:
and adding micro-image units corresponding to the code element types to the coordinate correction block, the direction indication block and the data storage block according to the code element types respectively corresponding to the coordinate correction block, the direction indication block and the data storage block so as to generate the identification codes corresponding to the object information.
6. The identification code encoding method of claim 1, further comprising:
in response to a decoding request submitted by the carrier object, determining a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
and determining an analysis rule corresponding to the identification code to be analyzed in the area to be decoded, and analyzing the identification code to be analyzed according to the analysis rule to generate a corresponding decoding result.
7. The method for encoding identification codes according to claim 6, wherein the determining the parsing rule corresponding to the identification code to be parsed in the region to be decoded comprises:
determining a coordinate correction block in the region to be decoded according to the code element type corresponding to the coordinate correction block;
and determining the identification code to be analyzed in the area to be decoded and the analysis rule corresponding to the identification code to be analyzed according to the position relation between the direction indication block in the area to be decoded and the coordinate correction block.
8. The identification code encoding method of claim 1, further comprising:
in response to a decoding request submitted by the carrier object, determining a region to be decoded in the carrier object according to the direction indication blocks in the carrier object;
determining coordinate correction blocks in the region to be decoded, and determining the central point of each coordinate correction block;
according to the arrangement mode of the coordinate correction blocks in the to-be-decoded area, a straight line parallel or perpendicular to the sides of the coordinate correction blocks is constructed along the central point, wherein the straight line divides each data storage block contained in the to-be-analyzed identification code in the to-be-decoded area into a plurality of sub-blocks;
identifying a code value corresponding to each data storage block according to the distribution condition of the microimage units in each data storage block in each sub-block;
and analyzing the identification code to be analyzed according to the code value to generate a corresponding decoding result.
9. The identification code encoding method according to claim 8, wherein the parsing the identification code to be parsed according to the code value includes:
determining an analysis direction corresponding to the identification code to be analyzed according to the position relationship between the direction indication block in the identification code to be analyzed and the coordinate correction block;
under the condition that the analysis direction is a target analysis direction, constructing a first code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block;
and analyzing the identification code to be analyzed according to the first code value matrix.
10. The identification code encoding method of claim 9, further comprising:
determining a rotation center and a rotation angle of the identification code to be analyzed under the condition that the analysis direction does not belong to a target analysis direction;
carrying out rotation processing on the identification code to be analyzed according to the rotation center and the rotation angle;
constructing a second code value matrix corresponding to the identification code to be analyzed based on the code value corresponding to each data storage block in the rotation result;
and analyzing the identification code to be analyzed according to the second code value matrix.
11. A computing device, comprising:
a memory and a processor;
the memory is used for storing computer-executable instructions, and the processor is used for executing the computer-executable instructions, and the computer-executable instructions realize the steps of the identification code encoding method of any one of claims 1 to 10 when being executed by the processor.
12. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the identification code encoding method of any one of claims 1 to 10.
CN202110902711.8A 2021-08-06 2021-08-06 Identification code encoding method Active CN113688648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110902711.8A CN113688648B (en) 2021-08-06 2021-08-06 Identification code encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110902711.8A CN113688648B (en) 2021-08-06 2021-08-06 Identification code encoding method

Publications (2)

Publication Number Publication Date
CN113688648A CN113688648A (en) 2021-11-23
CN113688648B true CN113688648B (en) 2022-06-10

Family

ID=78579059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110902711.8A Active CN113688648B (en) 2021-08-06 2021-08-06 Identification code encoding method

Country Status (1)

Country Link
CN (1) CN113688648B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760919A (en) * 2016-02-06 2016-07-13 深圳市天朗时代科技有限公司 Dot matrix two-dimensional code coding and recognition method
CN105894067A (en) * 2016-02-06 2016-08-24 深圳市天朗时代科技有限公司 Dot matrix two-dimensional code coding and reading method
CN109754046A (en) * 2019-01-31 2019-05-14 北京迈格威科技有限公司 Two dimensional code, the coding method of two dimensional code, coding/decoding method, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760919A (en) * 2016-02-06 2016-07-13 深圳市天朗时代科技有限公司 Dot matrix two-dimensional code coding and recognition method
CN105894067A (en) * 2016-02-06 2016-08-24 深圳市天朗时代科技有限公司 Dot matrix two-dimensional code coding and reading method
CN109754046A (en) * 2019-01-31 2019-05-14 北京迈格威科技有限公司 Two dimensional code, the coding method of two dimensional code, coding/decoding method, device and equipment

Also Published As

Publication number Publication date
CN113688648A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
KR102029727B1 (en) Coding and Reading Method of Dot Matrix QR Codes
JP5743994B2 (en) Printed matter displaying two-dimensional code
US7942341B2 (en) Two dimensional dot code, and decoding apparatus and method for a two dimensional dot code
KR20180108788A (en) Coding and Recognition Method of Dot Matrix QR Code
Al Hussien et al. Coverless image steganography based on optical mark recognition and machine learning
CN109785823B (en) Speech synthesis method and system
CN101339599A (en) Method and terminal for obtaining two-dimension code
KR100905705B1 (en) Method for Providing Electronic Note Service by Using Digital Paper and Pen, System and Computer-Readable Recording Medium with Program Therefor
JP2007179111A (en) Code pattern, printed matter, image forming device, image processor, image forming method, and information specifying method
CN105677777A (en) Lattice coding file generation method
CN108319578B (en) Method for generating medium for data recording
CN113688648B (en) Identification code encoding method
CN107742145A (en) Data embedding method, method for reading data, device and readable storage medium storing program for executing
US20180210691A1 (en) Image forming apparatus
Bunma et al. Using augment reality to increase capacity in QR code
JP2007219779A (en) Two-dimensional code generation system and two-dimensional code generation program
CN116110065A (en) Method, device, computer equipment and storage medium for generating question card data
JP2012208729A (en) Form managing system, form image managing method, and program
CN111783066B (en) Character recognition method, system, computer equipment and storage medium
CN111353133B (en) Image processing method, device and readable storage medium
CN111583349A (en) Method and system for restoring coded information by original handwriting
CN113012265B (en) Method, apparatus, computer device and medium for generating needle-type printed character image
CN114118075B (en) Text recognition method and device, electronic equipment and storage medium
CN108280502A (en) A kind of QR codes capacity boost method and terminal
Cvitić et al. Standardizacija bar kodova sa stvaranjem nove tipizacije bar koda

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 554, 5 / F, building 3, 969 Wenyi West Road, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Applicant after: Alibaba cloud computing Co., Ltd

Address before: 310052 room 508, 5th floor, building 4, No. 699 Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Alibaba (China) Co.,Ltd.

Applicant before: Alibaba cloud computing Co., Ltd

GR01 Patent grant
GR01 Patent grant