CN113222088A - Method and device for generating circular code - Google Patents

Method and device for generating circular code Download PDF

Info

Publication number
CN113222088A
CN113222088A CN202110492641.3A CN202110492641A CN113222088A CN 113222088 A CN113222088 A CN 113222088A CN 202110492641 A CN202110492641 A CN 202110492641A CN 113222088 A CN113222088 A CN 113222088A
Authority
CN
China
Prior art keywords
backup
graph
storage area
circular
code
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.)
Granted
Application number
CN202110492641.3A
Other languages
Chinese (zh)
Other versions
CN113222088B (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.)
Hangzhou Dingxiang Technology Co ltd
Original Assignee
Top Elephant Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Top Elephant Technology Co ltd filed Critical Top Elephant Technology Co ltd
Priority to CN202110492641.3A priority Critical patent/CN113222088B/en
Publication of CN113222088A publication Critical patent/CN113222088A/en
Application granted granted Critical
Publication of CN113222088B publication Critical patent/CN113222088B/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
    • 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

Abstract

The invention provides a method and a device for generating a circular code, which relate to the technical field of computers and comprise the following steps: firstly, acquiring information to be coded of a target object, and converting the information to be coded into binary data; then dividing a preset circular area into a main storage area and a backup storage area; generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; and finally, determining the whole graph formed by combining the first graph and the backup graph as the circular code of the target object. According to the circular code provided by the embodiment of the invention, the combination of the preset circular code coding strategy and the data backup technology is adopted, so that the circular code can identify the information to be coded through the backup graph under the condition that the first graph is stained, and the code identification rate can be improved.

Description

Method and device for generating circular code
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a circular code.
Background
The two common existing code making technologies are a bar code and a two-dimensional code, the bar code has less storage data, and the two-dimensional code can store more information, but because the two-dimensional code uses a black and white block to represent binary data, when the two-dimensional code is stained, a white block in a stained area can be mistakenly identified as a black block, so that the low identification rate is easily caused.
Disclosure of Invention
The invention aims to provide a method and a device for generating a circular code, which are used for solving the technical problem of low code recognition rate caused by that a white block is mistakenly recognized as a black block under the condition that a two-dimensional code is stained in the prior art.
In a first aspect, the present invention provides a method for generating a circular code, where the method includes: acquiring information to be coded of a target object, and converting the information to be coded into binary data; dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area; generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon; determining an integral graph formed by combining the first graph and the backup graph as a circular code of the target object; and the backup graph is a graph stored in the backup storage area.
Further, dividing the preset circular area into a main storage area and a backup storage area includes: positioning a circle center position in a preset circular area; generating a division indication graph at the circle center position; the circular area is divided into a main storage area and a plurality of backup storage areas according to a division indication pattern.
Further, the division indication pattern includes: the step of dividing the circular area into a main storage area and a plurality of backup storage areas according to the division indication graph comprises the following steps: and dividing the circular area into a main storage area and three backup storage areas according to the cross pattern.
Further, dividing the circular area into a main storage area and three backup storage areas according to the cross pattern includes: identifying the colors of four lines in the cross pattern, and determining a reference line according to the colors of the four lines; wherein the color of the reference line is different from the colors of the other three lines; determining the four lines of the cross pattern as the reference line, the second line, the third line and the fourth line according to a clockwise sequence; determining an area between the reference line and the fourth line as the main storage area; determining a region between the reference line and the second line as a second storage region; determining a region between the second line and the third line as a third storage region; determining a region between the third line and the fourth line as a fourth storage region; determining the second storage area, the third storage area and the fourth storage area as three backup storage areas.
Further, the method further comprises: determining the number of the backup storage areas according to the division indication graph; the number of the backup storage areas is used for determining the number of times of backup; when the division indication graph is the cross graph, the backup times are three times; backing up the first graph three times by adopting a data backup technology to respectively obtain a first backup sub-graph, a second backup sub-graph and a third backup sub-graph; wherein the first backup sub pattern is stored in the second storage area, the second backup sub pattern is stored in the third storage area, and the third backup sub pattern is stored in the fourth storage area; and combining the first backup sub-graph, the second backup sub-graph and the third backup sub-graph to obtain a backup graph.
Further, the method further comprises: and scanning any backup sub-graph and/or the first graph in the circular code by using a code scanning device to obtain the information to be coded of the target object.
Further, the method further comprises: performing custom setting on the attribute information of the circular area; wherein the attribute information comprises a circle radius and/or a circle arc density.
In a second aspect, the present invention provides an apparatus for generating a circular code, including: the system comprises an acquisition conversion unit, a processing unit and a processing unit, wherein the acquisition conversion unit is used for acquiring information to be coded of a target object and converting the information to be coded into binary data; the device comprises a dividing unit, a judging unit and a judging unit, wherein the dividing unit is used for dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area; the generating unit is used for generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon; a first determining unit, configured to determine an overall graph formed by combining the first graph and the backup graph as a circular code of the target object; and the backup graph is a graph stored in the backup storage area.
In a third aspect, the present invention further provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the method for generating circular codes.
In a fourth aspect, the present invention further provides a computer readable medium having a non-volatile program code executable by a processor, wherein the program code causes the processor to execute the method for generating a circular code.
The invention provides a method and a device for generating a circular code, which comprise the following steps: firstly, acquiring information to be coded of a target object, and converting the information to be coded into binary data; then dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area; generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon; and finally, determining the whole graph formed by combining the first graph and the backup graph as the circular code of the target object. The circular code adopts a preset circular code coding strategy, the strategy utilizes the combination of the point icon and the line icon to represent binary data, so that the point icon cannot be mistaken as the line icon and the line icon cannot be mistaken as the point icon under the condition that the circular code is stained, and the circular code can also identify information to be coded through the backup graph under the condition that the first graph is stained.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for generating a circular code according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S102 in FIG. 1;
fig. 3 is a schematic structural diagram of a circular code according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for generating a circular code according to an embodiment of the present invention.
Icon:
11-obtaining a conversion unit; 12-a partitioning unit; 13-a generating unit; 14-first determination unit.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the increasing demand for faster settlement services, bar code technology is becoming more and more intense. At present, two relatively common quick code making and identifying technologies are available on the market, one is a bar code, and the other is a two-dimensional code. The Bar Code Bar is a graphic identifier which is used for expressing a group of information by arranging a plurality of black bars and blanks with different widths according to a certain coding rule. Common bar codes are a pattern of parallel lines of dark bars (simply bars) and white bars (simply spaces) of widely differing reflectivity. The purpose of the bar code is as follows: the method can mark a lot of information such as the producing country, the manufacturer, the commodity name, the production date, the book classification number, the starting and stopping location, the class, the date and the like of the article, thereby being widely applied to many fields such as commodity circulation, book management, postal management, bank systems and the like. The two-dimensional Code is also called as a two-dimensional Bar Code, a common two-dimensional Code is a QR Code, which is called as Quick Response, and is an ultra-popular coding mode on mobile equipment in recent years, and compared with the traditional Bar Code, the two-dimensional Code can store more information and can also represent more data types.
In summary, the barcode stores too little data and has poor anti-contamination capability, and when the barcode is contaminated up and down, the contaminated area reaches 1/4, which results in data loss; most areas of the two-dimensional code are used for a data recovery (restoration) algorithm, and the occupied storage area is very large, so that the recognition speed is reduced, and the recognition experience is delayed. No matter the bar code or the two-dimensional code relates to a data backup technology.
In view of the above, an object of the present invention is to provide a method and an apparatus for generating a circular code, which can represent binary data by a combination of a dot icon and a line icon in a preset circular code encoding strategy, so that a dot icon is not mistaken for a line icon or a line icon is not mistaken for a dot icon when a circular code is stained, and information to be encoded can be identified by a backup graphic when a first graphic is stained.
For the convenience of understanding the embodiment, a detailed description will be given to a method for generating a circular code disclosed in the embodiment of the present invention.
Example 1:
in accordance with an embodiment of the present invention, there is provided an embodiment of a method for generating circular code, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for generating a circular code according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, obtaining information to be coded of the target object, and converting the information to be coded into binary data.
In the embodiment of the present invention, the target object may be various objects. The information to be encoded may represent: the information of the country of manufacture, the manufacturer, the name of the commodity, the date of manufacture, the book classification number, the starting and stopping location of the mail, the category, the date and the like. The purpose of the conversion is to achieve binarization of the information to be encoded, resulting in binary data in binary form ("01" combined form).
Step S102, dividing the preset circular area into a main storage area and a backup storage area. And the backup storage area is used for performing backup storage on the graphs in the main storage area.
The embodiment of the present invention does not specifically limit the number of backup storage areas, for example: the number of backup storage areas may be 3 or 7. When the number of the backup storage areas is 3, 1 main storage area and each backup storage area are one of four equal parts of a circular area. It should be noted that the larger the number of backup storage areas, the stronger the anti-pollution capability.
And step S103, generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy. The preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon and a 1 in the binary data corresponds to a line icon.
The line icons may refer to cross-lines. The colors of the dot icons and the horizontal icons may be the same or different, and this is not particularly limited in the embodiment of the present invention. The first graph generated by the dot icon and the cross icon is an arc, and the number of the arcs can be one or more, and is related to the number of binary data. The conventional two-dimensional code stores data represented by a black and white block as 01, and when the two-dimensional code is contaminated, the data of a white part is easily recognized as black data by mistake. In order to overcome the above-mentioned defect of being misrecognized, the embodiment of the present invention uses the dot bar as the data 01, since the pattern of the dot bar is not misrecognized anyway because it is covered. Therefore, when the first graphic is stained, the dot icon in the first graphic is not erroneously recognized as the cross icon, and the cross icon is not erroneously recognized as the dot icon. Compared with the two-dimensional code, the data recovery technology is not needed to be used for data recovery, so that the identification speed can be increased, the identification experience is not delayed, and the user experience degree is improved.
And step S104, determining the whole graph formed by combining the first graph and the backup graph as the circular code of the target object. The backup graph is a graph stored in the backup storage area. The circular code may be simply referred to as a circular code, and data can be stored in a pattern of circular arcs formed by dots and lines. The generation process of the circular code adopts a brand-new code making technology.
In an alternative embodiment, as shown in fig. 2, the step S102 of dividing the preset circular area into a main storage area and a backup storage area includes the following steps:
step S201, positioning a circle center position in a preset circular area;
step S202, generating a division indication graph at the position of the circle center;
step S203, the circular area is divided into a main storage area and a plurality of backup storage areas according to the division indication graph.
The division in step S203 described above may be understood as division. The dividing of the indication graph in step S202 includes, but is not limited to: a cross pattern, a line pattern and a Chinese character 'mi' pattern. The word graph can be divided into a main storage area and a backup storage area; the cross pattern can be divided into a main storage area and three backup areas; the Chinese character 'mi' shaped graph can be divided into a main storage area and seven backup storage areas. As shown in fig. 3, the division indication pattern of the circular code is a cross pattern. The cross pattern divides the circular area into four storage areas, and there are two ways to determine one main storage area from the four storage areas: one is determined randomly and the other is determined according to the colors of four lines in the cross pattern. The circular code uses a data backup technology (namely, a graph backup technology) to ensure the safety and the anti-loss characteristic of data, and the whole backup storage area reaches three fourths, so that the anti-pollution capability is strong, and the identification speed is very high.
When the division indicating pattern is a cross pattern, step S203, the step of dividing the circular area into a main storage area and a plurality of backup storage areas according to the division indicating pattern, includes: in step S301, the circular area is divided into a main storage area and three backup storage areas according to a cross pattern.
In an alternative embodiment, step S301 comprises the steps of: step S401, identifying the colors of four lines in the cross pattern, and determining a reference line according to the colors of the four lines; wherein, the color of the reference line (which may be called as the first line) is different from the colors of the other three lines; step S402, respectively determining four lines of the cross pattern as a reference line, a second line, a third line and a fourth line according to a clockwise sequence; step S403, determining an area between the reference line and the fourth line as a main storage area (or referred to as a first storage area); step S404, determining an area between the reference line and the second line as a second storage area; step S405, determining an area between the second line and the third line as a third storage area; step S406, determining an area between the third line and the fourth line as a fourth storage area; in step S407, the second storage area, the third storage area, and the fourth storage area are determined as three backup storage areas. For example, if the reference line in the cross is red and the remaining three lines are black, the left area of the red line can be used as the main storage area. The main storage area and the backup storage area are fan-shaped storage areas with equal areas.
In an alternative embodiment, before performing step S104, the method further comprises the steps of:
step S501, determining the number of backup storage areas according to the division indication graph; the number of backup storage areas is used for determining the number of times of backup. When the division indication pattern is a cross pattern, the number of times of backup is three. Step S502, the first graph is backed up three times by adopting a data backup technology to respectively obtain a first backup sub-graph, a second backup sub-graph and a third backup sub-graph. The first backup sub-graph is stored in the second storage area, the second backup sub-graph is stored in the third storage area, and the third backup sub-graph is stored in the fourth storage area. Step S503, combining the first backup sub-graph, the second backup sub-graph and the third backup sub-graph to obtain a backup graph.
The first backup sub-graph, the second backup sub-graph and the third backup sub-graph are backups of the first graph in the main storage area, and the whole circular code can be manufactured through backup and combination of the first backup sub-graph and the first graph.
Binary data are firstly stored in a first graph (namely a graph formed by a plurality of quarter arcs with different radiuses) in a main storage area, wherein the arcs are composed of points and transverse lines, different combinations represent different information, and the more the arcs are, the more information is stored; then 3 such patterns are copied, i.e. a circle can be made up, this technique can be referred to as backup storage technique.
In an optional embodiment, the method further comprises: performing custom setting on the attribute information of the circular area; wherein the attribute information comprises a circle radius and/or a circle arc density. In the embodiment of the present invention, the storage area may be adjusted according to actual requirements, including but not limited to: circle radius and arc density.
The above is the complete process of the circular code generation method. The code making technology and the code recognizing technology are two opposite processes. In an optional embodiment, the method further comprises: and scanning any backup sub-graph and/or first graph in the circular code by using a code scanning device to obtain the information to be coded of the target object.
The embodiment of the invention has two identification modes, one is random sequence identification, and the other is designated sequence identification. The random sequence identification process is as follows: the code scanning device (machine for short) firstly obtains the picture of the circular code, then positions four areas of the circular code according to the cross pattern, randomly selects one area for decoding, and if the circular code is stained, clockwise selects the next area for decoding. And the process of specifying sequential identification is as follows: and firstly identifying a first graph, sequentially identifying a first backup sub-graph under the condition that the first graph is stained, and further identifying a second backup sub-graph if the first backup sub-graph is stained until the information to be encoded of the target object is identified. In order to prevent a large amount of storage from being wasted, the embodiment of the invention preferentially selects one main storage area and three backup storage areas, can save storage space, increases storage contents, and ensures data security. Because of the sector backup, data can be effectively identified even if three quarters are corrupted.
In summary, the key technical points of the embodiment of the present invention are as follows: (1) the data backup technology comprises the following steps: by means of the data backup technology, the data can be protected to the maximum extent, backup is conducted for three times, pollution resistance is high, and the identification speed can be improved. (2) The arc storage technology, namely the combination of points and lines, has low error recognition rate.
The embodiment of the invention realizes the graphical storage of data by a data backup technology and a graph storage technology (namely, the arc storage technology), overcomes the defects that the two-dimensional code storage data is easy to lose and the data area is too small, and under the same area, the circular code can still effectively read the content under the condition that three fourths of the maximum stain, and the appearance is beautiful; and the algorithm recovery technology for castrating the two-dimensional code in a large area is adopted, and the data backup technology is adopted for carrying out multiple backups, so that the method has the advantages of less use space, stability, safety, strong anti-pollution capability and high code recognition rate. Therefore, through the implementation scheme of the embodiment of the invention, the purposes of safety, high efficiency and stability can be achieved by quick identification.
Example 2:
an embodiment of the present invention provides a device for generating a circular code, where the device for generating a circular code is mainly used to execute the method for generating a circular code provided in embodiment 1.
Fig. 4 is a schematic structural diagram of a device for generating a circular code according to an embodiment of the present invention. As shown in fig. 4, the apparatus for generating circular code mainly includes: an acquisition conversion unit 11, a dividing unit 12, a generating unit 13, and a first determining unit 14, wherein:
the acquiring and converting unit 11 is used for acquiring information to be coded of the target object and converting the information to be coded into binary data;
a dividing unit 12 for dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area;
the generating unit 13 is used for generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon;
a first determining unit 14 for determining an overall pattern formed by combining the first pattern and the backup pattern as a circular code of the target object; the backup graph is a graph stored in the backup storage area.
The circular code determined by the first determining unit in the embodiment of the invention adopts a preset circular code coding strategy, the strategy uses the combination of the point icon and the line icon to represent binary data, so that the point icon cannot be mistaken as the line icon and the line icon cannot be mistaken as the point icon when the circular code is stained, and the circular code in the embodiment of the invention can identify information to be coded by the backup graph when the first graph is stained, so that the circular code in the embodiment of the invention can improve the identification rate when the circular code is stained.
Optionally, the dividing unit 12 includes a positioning subunit, a generating subunit, and a dividing subunit, where:
the positioning subunit is used for positioning the circle center position in a preset circular area;
the generating subunit is used for generating a division indication graph at the position of the circle center;
and the dividing subunit is used for dividing the circular area into a main storage area and a plurality of backup storage areas according to the dividing indication graph.
Optionally, dividing the indication graph comprises: the cross figure, divide the subunit and include: a partitioning module, wherein:
and the dividing module is used for dividing the circular area into a main storage area and three backup storage areas according to the cross pattern.
Optionally, the dividing module includes an identification determination sub-module, a first determination sub-module, a second determination sub-module, a third determination sub-module, a fourth determination sub-module, a fifth determination sub-module, and a sixth determination sub-module, wherein:
the identification and determination submodule is used for identifying the colors of four lines in the cross-shaped graph and determining a reference line according to the colors of the four lines; wherein, the color of the reference line is different from the colors of the other three lines;
the first determining submodule is used for respectively determining the four lines of the cross pattern as a reference line, a second line, a third line and a fourth line according to a clockwise sequence;
a second determination sub-module for determining an area between the reference line and the fourth line as a main storage area;
a third determination submodule for determining a region between the reference line and the second line as a second storage region;
a fourth determination submodule for determining a region between the second line and the third line as a third storage region;
a fifth determining sub-module, configured to determine an area between the third line and the fourth line as a fourth storage area;
and the sixth determining submodule is used for determining the second storage area, the third storage area and the fourth storage area as three backup storage areas.
Optionally, the apparatus further comprises: a second determining unit, a backup unit, and a combining unit, wherein:
the second determining unit determines the number of the backup storage areas according to the division indicating graph; the number of the backup storage areas is used for determining the number of times of backup; when the division indication graph is a cross graph, the backup times are three times;
the backup unit is used for backing up the first graph for three times by adopting a data backup technology to respectively obtain a first backup sub-graph, a second backup sub-graph and a third backup sub-graph; the first backup sub-graph is stored in a second storage area, the second backup sub-graph is stored in a third storage area, and the third backup sub-graph is stored in a fourth storage area;
and the combination unit is used for combining the first backup sub-graph, the second backup sub-graph and the third backup sub-graph to obtain a backup graph.
Optionally, the apparatus further comprises: a scanning unit, wherein:
and the scanning unit is used for scanning any backup sub-graph and/or first graph in the circular code by using the code scanning device to obtain the information to be coded of the target object.
Optionally, the apparatus further comprises: a custom setting unit, wherein:
the user-defined setting unit is used for carrying out user-defined setting on the attribute information of the circular area; wherein the attribute information comprises a circle radius and/or a circle arc density.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In an optional embodiment, the present embodiment further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method of the foregoing method embodiment.
In an alternative embodiment, the present embodiment also provides a computer readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of the above method embodiment.
It should be noted that the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the embodiments provided in the present embodiment, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present embodiment or parts of the technical solution may be essentially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A method for generating a circular code, comprising:
acquiring information to be coded of a target object, and converting the information to be coded into binary data;
dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area;
generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon;
determining an integral graph formed by combining the first graph and the backup graph as a circular code of the target object; and the backup graph is a graph stored in the backup storage area.
2. The method of claim 1, wherein dividing the preset circular area into a main storage area and a backup storage area comprises:
positioning a circle center position in a preset circular area;
generating a division indication graph at the circle center position;
the circular area is divided into a main storage area and a plurality of backup storage areas according to a division indication pattern.
3. The method of claim 2, wherein partitioning the indication graph comprises: the step of dividing the circular area into a main storage area and a plurality of backup storage areas according to the division indication graph comprises the following steps:
and dividing the circular area into a main storage area and three backup storage areas according to the cross pattern.
4. The method of claim 3, wherein dividing the circular area into a main storage area and three backup storage areas according to the cross pattern comprises:
identifying the colors of four lines in the cross pattern, and determining a reference line according to the colors of the four lines; wherein the color of the reference line is different from the colors of the other three lines;
determining the four lines of the cross pattern as the reference line, the second line, the third line and the fourth line according to a clockwise sequence;
determining an area between the reference line and the fourth line as the main storage area;
determining a region between the reference line and the second line as a second storage region;
determining a region between the second line and the third line as a third storage region;
determining a region between the third line and the fourth line as a fourth storage region;
determining the second storage area, the third storage area and the fourth storage area as three backup storage areas.
5. The method of claim 4, further comprising:
determining the number of the backup storage areas according to the division indication graph; the number of the backup storage areas is used for determining the number of times of backup; when the division indication graph is the cross graph, the backup times are three times;
backing up the first graph three times by adopting a data backup technology to respectively obtain a first backup sub-graph, a second backup sub-graph and a third backup sub-graph; wherein the first backup sub pattern is stored in the second storage area, the second backup sub pattern is stored in the third storage area, and the third backup sub pattern is stored in the fourth storage area;
and combining the first backup sub-graph, the second backup sub-graph and the third backup sub-graph to obtain a backup graph.
6. The method of claim 5, further comprising:
and scanning any backup sub-graph and/or the first graph in the circular code by using a code scanning device to obtain the information to be coded of the target object.
7. The method of claim 2, further comprising:
performing custom setting on the attribute information of the circular area; wherein the attribute information comprises a circle radius and/or a circle arc density.
8. An apparatus for generating a circular code, comprising:
the system comprises an acquisition conversion unit, a processing unit and a processing unit, wherein the acquisition conversion unit is used for acquiring information to be coded of a target object and converting the information to be coded into binary data;
the device comprises a dividing unit, a judging unit and a judging unit, wherein the dividing unit is used for dividing a preset circular area into a main storage area and a backup storage area; the backup storage area is used for performing backup storage on the graphs in the main storage area;
the generating unit is used for generating a first graph in the main storage area according to the binary data and a preset circular code coding strategy; the preset circular code encoding strategy is as follows: a 0 in the binary data corresponds to a dot icon, and a 1 in the binary data corresponds to a line icon;
a first determining unit, configured to determine an overall graph formed by combining the first graph and the backup graph as a circular code of the target object; and the backup graph is a graph stored in the backup storage area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 7.
CN202110492641.3A 2021-05-06 2021-05-06 Method and device for generating circular code Active CN113222088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110492641.3A CN113222088B (en) 2021-05-06 2021-05-06 Method and device for generating circular code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110492641.3A CN113222088B (en) 2021-05-06 2021-05-06 Method and device for generating circular code

Publications (2)

Publication Number Publication Date
CN113222088A true CN113222088A (en) 2021-08-06
CN113222088B CN113222088B (en) 2022-10-18

Family

ID=77091362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110492641.3A Active CN113222088B (en) 2021-05-06 2021-05-06 Method and device for generating circular code

Country Status (1)

Country Link
CN (1) CN113222088B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093267A (en) * 2012-12-11 2013-05-08 关秀清 Coding method based on graph
KR101322193B1 (en) * 2012-08-09 2013-10-28 서울시립대학교 산학협력단 Circular pattern code, system for analyzing circular pattern code using video input unit and computer-readable recording medium for the same
CN106778999A (en) * 2016-12-02 2017-05-31 武汉网码云防伪技术有限公司 A kind of two-dimentional camber line figure code and a kind of antifake method for products
CN108776828A (en) * 2018-06-07 2018-11-09 中国联合网络通信集团有限公司 Two-dimensional code generation method, Quick Response Code generating means and Quick Response Code
US20200394481A1 (en) * 2017-07-28 2020-12-17 The Coca-Cola Company Method and apparatus for encoding and decoding circular symbolic codes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101322193B1 (en) * 2012-08-09 2013-10-28 서울시립대학교 산학협력단 Circular pattern code, system for analyzing circular pattern code using video input unit and computer-readable recording medium for the same
CN103093267A (en) * 2012-12-11 2013-05-08 关秀清 Coding method based on graph
CN106778999A (en) * 2016-12-02 2017-05-31 武汉网码云防伪技术有限公司 A kind of two-dimentional camber line figure code and a kind of antifake method for products
US20200394481A1 (en) * 2017-07-28 2020-12-17 The Coca-Cola Company Method and apparatus for encoding and decoding circular symbolic codes
CN108776828A (en) * 2018-06-07 2018-11-09 中国联合网络通信集团有限公司 Two-dimensional code generation method, Quick Response Code generating means and Quick Response Code

Also Published As

Publication number Publication date
CN113222088B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
US9406010B2 (en) Producing, capturing and using visual identification tags for moving objects
CN108334922B (en) Dot matrix two-dimensional code and encoding and identifying method thereof
CN103377390B (en) The generation of Quick Response Code, recognition methods and device
CN111539502B (en) Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN107392270B (en) Two-dimensional code generation method
EP2898451A1 (en) Information obtaining method and apparatus
CN102968654A (en) Method and system for producing information recognizable by naked eyes in plane of two-dimensional (2D) code and 2D code
CN103119613A (en) Two-dimensional identification pattern, article including such a pattern, and methods for marking and identifying such a pattern
CN113822091B (en) Method and device for correcting errors of two-dimensional code pattern, electronic equipment and storage medium
CN114997352A (en) Anti-counterfeiting tracing code generation and verification method based on dot matrix
CN110517051A (en) A kind of two dimension code generation method, coding/decoding method, two dimensional code and readable storage medium storing program for executing
CN109831309A (en) A kind of safety code principle and method with multiple-authentication
CN109454997B (en) Two-dimensional code printing generation system with electronic texture
CN115511031A (en) Capacity-expansion two-dimensional code and three-dimensional code decoding method, system, equipment and medium
CN104899748A (en) Two-dimensional code and scratch-off code composite identifying method based on identity authentication technology
WO2015021857A1 (en) Method and apparatus for data processing
CN115953175A (en) Multiple anti-counterfeiting method, system, equipment and storage medium based on surface layer identification
CN110517052A (en) A kind of two-dimensional code generation method, recognition methods, two dimensional code and equipment
CN113222088B (en) Method and device for generating circular code
KR101205865B1 (en) Design QR code making method
CN108734048A (en) Various dimensions Quick Response Code based on proprietary code generates and interpretation method
CN109325568B (en) Anti-counterfeiting two-dimensional code and modulation encryption method and identification system thereof
CN108491914B (en) Bar code generating and identifying method and device, printed matter and electronic equipment
CN103778453A (en) Writable two-dimensional bar code based on fault-tolerant mechanism and generating method thereof
CN114398920A (en) Code reading method, and code reading apparatus

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 601, Building 4, No. 165 Wuchang Avenue, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Patentee after: Hangzhou Dingxiang Technology Co.,Ltd.

Address before: Room 603b, building 19, No. 998, Wenyi West Road, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee before: Top Elephant Technology Co.,Ltd.