Fractal two-dimensional code and generation method, identification method, identification system and device thereof
By generating fractal QR codes using fractal algorithms, the problem of QR code shape uniformity is solved, achieving integration with the environment and improved recognition accuracy, thus enhancing user experience and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 韩宝军
- Filing Date
- 2025-01-13
- Publication Date
- 2026-04-10
AI Technical Summary
The existing QR codes have a single and fixed shape, which limits their wide application in more fields and user experience, especially their lack of visual appeal and poor adaptability in special shapes or limited space scenarios.
Fractal algorithms are used to construct fractal QR codes. Dark and light modules are arranged according to preset rules to form track lines, generating a coding area with a fractal shape. The fractal algorithm is then used for recognition and reading of data information.
Fractal QR codes can be integrated with application environments and design elements to enhance visual appeal, improve recognition accuracy and efficiency, adapt to various shapes and spaces, and enhance user experience.
Smart Images

Figure CN119940385B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of two-dimensional codes, and particularly relates to a fractal two-dimensional code and a generation method, an identification method, an identification system and equipment thereof. BACKGROUND
[0002] In today's era of rapid digital information dissemination, two-dimensional codes, as a convenient information storage and transmission tool, have been widely used in various fields. From product identification, advertising to mobile payment, ticket management, etc., two-dimensional codes have become an indispensable part of people's life and work due to their advantages of quickly and accurately storing and reading a large amount of information.
[0003] However, the two-dimensional codes in the prior art have obvious limitations in shape. Their shape manifestations are single and fixed, and most of them are rectangular. Although this monotonous rectangular shape has certain stability and convenience in information carrying and reading, it also brings some problems.
[0004] On the one hand, the rectangular two-dimensional code lacks visual appeal and uniqueness, and it is difficult to stand out among many information display methods. In some design and aesthetic-oriented scenarios, such as creative advertising, art exhibitions, etc., the monotonous appearance of the rectangular two-dimensional code cannot be integrated with the surrounding environment and design elements, affecting the overall visual effect and user experience.
[0005] On the other hand, due to the single shape, the rectangular two-dimensional code has poor adaptability in some special shape or space-limited application scenarios. For example, in some product packaging or display areas with specific shapes, the rectangular two-dimensional code may not be fully adapted, resulting in space waste or incomplete information display.
[0006] Therefore, the single and fixed shape of the existing two-dimensional code limits its wide application in more fields and better user experience, and there is an urgent need for a new two-dimensional code generation method to break this limitation and realize the diversification and innovation of two-dimensional code shape. SUMMARY
[0007] The present disclosure provides a fractal two-dimensional code and a generation method, an identification method, an identification system and equipment thereof to solve the technical problem that the single and fixed shape of the two-dimensional code in the prior art limits its wide application in more fields and better user experience.
[0008] To solve the above technical problem, the present disclosure provides a fractal two-dimensional code, comprising:
[0009] a track line having a fractal shape formed by dark modules and light modules arranged according to a preset rule; and
[0010] The coding region is surrounded by the track line, and data modules for expressing data information are arranged in the coding region.
[0011] To solve the above technical problems, the disclosure further provides a fractal two-dimensional code generation method, comprising:
[0012] A design figure symbol with a fractal shape is constructed using a fractal algorithm.
[0013] The contour line of the design figure symbol is determined, and the contour line is converted into a track line formed by dark modules and light modules arranged according to a preset rule.
[0014] The design figure symbol is gridded according to the track line to obtain a grid figure symbol.
[0015] Data modules are filled in the grid figure symbol to generate the fractal two-dimensional code.
[0016] To solve the above technical problems, the disclosure further provides a fractal two-dimensional code recognition method, comprising:
[0017] According to the fractal algorithm used when generating the fractal two-dimensional code, a fractal figure symbol of the scanned area is recognized.
[0018] It is judged whether the boundary line of the fractal figure symbol is a track line. If yes, the fractal figure symbol is gridded according to the track line to obtain a grid figure symbol, data modules in the grid figure symbol are recognized, and corresponding data information is read. If not, the recognition is terminated.
[0019] To solve the above technical problems, the disclosure further provides a fractal two-dimensional code recognition system, comprising:
[0020] A display device for displaying the fractal two-dimensional code as described above.
[0021] An identification device for scanning and recognizing the fractal two-dimensional code displayed on the display device.
[0022] A server for sending or receiving the fractal two-dimensional code or data of the fractal two-dimensional code.
[0023] To solve the above technical problems, the disclosure further provides a computer device comprising a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method as described above.
[0024] To solve the above technical problems, the disclosure further provides a computer-readable storage medium having a computer program stored thereon. The computer program is executed by a processor to implement the steps of the method as described above.
[0025] To solve the above technical problems, the disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method as described above.
[0026] Positive progress effects of the disclosure:
[0027] The fractal two-dimensional code of the disclosure has a fractal shape, breaking the singleness and fixity of the shape of the traditional rectangular two-dimensional code. The fractal two-dimensional code can be combined with the environment and design elements of its application to be fused in shape, improve the visual attraction, and bring better user experience. The track line of the fractal two-dimensional code has a fractal shape, facilitating the capture of the fractal pattern during identification. Since the track line is formed by dark modules and light modules arranged according to a preset rule, the boundary line of the captured fractal pattern can be verified, thereby improving the accuracy of identification. The coding area in the track line is arranged with data modules, facilitating the extraction of coding information after verifying that the boundary line of the fractal pattern is the track line. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 A fractal two-dimensional code provided by an embodiment of the disclosure.
[0029] Figure 2 A flowchart of a fractal two-dimensional code generation method provided by an embodiment of the disclosure.
[0030] Figure 3 A fractal two-dimensional code generation process diagram provided by an embodiment of the disclosure.
[0031] Figure 4 A flowchart of a fractal two-dimensional code identification method provided by an embodiment of the disclosure.
[0032] Figure 5 A fractal two-dimensional code identification system diagram provided by an embodiment of the disclosure.
[0033] Figure 6 A computer device diagram provided by an embodiment of the disclosure.
[0034] Figure 7 A process diagram for generating a mountain-shaped fractal using a random interpolation model.
[0035] Figure 8 A cloud-shaped fractal generated by using an iterative function system model.
[0036] Figure 9 A leaf-shaped fractal generated by using an iterative function system model.
[0037] Figure 10 An initial graph and replacement rule for generating a snowflake-shaped fractal by using a normal grammar model.
[0038] Figure 11 Process diagram for generating a snowflake fractal using a regular grammar model.
[0039] Figure 12 Process diagram for generating a tree fractal using a regular grammar model according to a rule.
[0040] Figure 13 Process diagram for generating a tree fractal using a regular grammar model according to another rule.
[0041] The above and other features, advantages, etc. of the present disclosure will become more apparent by describing in detail the embodiments thereof with reference to the accompanying drawings. In the drawings: DETAILED DESCRIPTION
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs; the terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the disclosure; the use herein of terms such as "comprise" or "comprising", or "include" or "including" means "including but not limited to".
[0043] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the disclosure. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily all directed to the same embodiments, or alternative or alternative embodiments. It will be explicitly understood by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments.
[0044] In order to make the technical personnel in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings.
[0045] In the present disclosure, we introduce fractal theory into the field of two-dimensional code technology, use the description and expression of fractal for various complex patterns in nature to break through the singleness of the shape of the existing two-dimensional code, and make the shape of the two-dimensional code be able to be integrated with the application scene. For example, set a fractal two-dimensional code with snowflake shape in a ski resort, set a fractal two-dimensional code with leaf shape in a park, set a fractal two-dimensional code with coastline shape in a beach scenic spot, set a fractal two-dimensional code with mountain and river shape in a mountainous area, and so on. Since the technical scheme of the present disclosure adopts fractal algorithm to construct the fractal two-dimensional code, in order to better understand the technical scheme of the present disclosure and realize the technical scheme of the present disclosure, the concept of fractal and its application in the construction of the fractal two-dimensional code are introduced as follows.
[0046] I. Concept of fractal
[0047] The most basic feature of fractal theory is to describe and study objective things from the perspective of fractional dimension and mathematical method, that is, to describe and study objective things by using the mathematical tool of fractal dimension. It breaks out of the traditional barriers of one-dimensional line, two-dimensional surface, three-dimensional solid and even four-dimensional space-time, and is more close to the description of the true properties and states of complex systems, and is more consistent with the diversity and complexity of objective things. In nature, self-similar patterns exist widely, such as winding mountains and rivers, floating clouds, rock fracture, Brownian motion of particles, tree crowns, vegetables, and cerebral cortex, etc. We call these parts and wholes similar in shape in some way as fractals. According to the degree of self-similarity, fractals can be divided into regular fractals and irregular fractals. Regular fractals refer to fractals with strict self-similarity, that is, fractals whose similarity can be described by a simple mathematical model, such as Cantor set, Koch curve, etc. Irregular fractals refer to fractals with statistical self-similarity, such as winding coastline and floating clouds, etc.
[0048] Therefore, fractal has the following characteristics: first, self-similarity. No matter from which angle the local part of the fractal is observed, the similar features to the overall shape can be found. Such features can be described in geometric way or expressed by mathematical formula. The classical self-similar fractals include Cantor set, Sierpinski triangle and Koch snowflake, etc. Second, fractal dimension. The dimension of fractal can be a non-integer, which is called "fractal dimension". This feature enables fractal to describe complex shapes and structures. For example, the length of a coastline may vary when measured at different scales, showing its fractal dimension.
[0049] II. Construction of fractal symbols of fractal two-dimensional code
[0050] The construction of fractal symbols of fractal two-dimensional codes with different shapes is introduced as follows in combination with several common fractal models.
[0051] The first one is the random interpolation model.
[0052] The random interpolation model does not decide the various pixels and scales in advance, but uses a sampling path of a random process as a means of constructing the model. The commonly used method in the random interpolation model includes the random midpoint displacement method, which is a simple and fast random interpolation method for approximating the ground and other natural phenomena. For example, starting from a straight line segment, let the starting point of the line segment be P0 and the terminal point be P n . The midpoint displacement value of the line segment is obtained by averaging the starting point and the terminal point and adding a random offset value r: P m = P0+ P n + r, where the value of r is a Gaussian distribution between 0 and a value proportional to the mean square deviation of |P n -P0| 2H , where H = 2-D, D > 1 is the fractal dimension. The two parts of the line segment generated after the midpoint displacement continue to be randomly displaced at the midpoint, and recursion can obtain the simulated natural phenomenon.
[0053] For example, the process of constructing a fractal two-dimensional code figure with a coastline shape is as follows: select several initial points to control the general shape; take the midpoint of the line segment formed by the two adjacent points and randomly offset a distance in the perpendicular direction; then connect the offset point with the two end points of the line segment to form two new line segments. In this way, a winding coastline with infinite detail regression is obtained, and the degree of winding is controlled by the random offset amount, which also determines the size of the fractional dimension.
[0054] For example, the process of constructing a fractal two-dimensional code figure with a mountain shape is as follows: as shown in Figure 7 , a random point can be taken on each of the three sides of a triangle as shown in Figure 7 (a), and a new three points are obtained after randomly offsetting a distance in the perpendicular direction, and then connected to form a figure composed of four triangles as shown in Figure 7 (b), and so on, a wrinkled mountain peak is formed as shown in Figure 7 (c). The degree of wrinkling of the mountain is controlled by the fractional dimension.
[0055] The second one is the iterative function system model.
[0056] The iterative function system model takes the theory of iterative function system as its mathematical basis. An iterative function system in an n-dimensional space is composed of two parts, one is a finite set of mapping transformations from an n-dimensional space to itself M = {M1, M2,..., M n}; the other is a probability set P = {P1, P2,..., P n}. Each P i is associated with M i , and ∑P i=1. The iterative function system works in the following way: take any point Z0 in space, and P... i Probability selection transformation M i Perform the transformation Z1=M i (Z0), then P i Probability selection transformation M i Transform Z1 into Z2=M i (Z1), and so on, yields an infinite set of points. The model method aims to select appropriate mapping sets, probability sets, and initial points so that the generated infinite set of points can simulate a certain scene. If the modulus of the selected mapping transformation eigenvalues is less than 1, then the system has a unique bounded closed set, called the attractor of the iterative function system. The attractor is the point where the iteratively generated points converge. The speed at which points approach the attractor depends on the magnitude of the eigenvalues.
[0057] For example, the process of constructing a fractal QR code symbol with a cloud shape is as follows: Select the following algebraic function (a polynomial transformation function using the complex plane): f(z) = z 2 +c, the bounded closed set of this complex mapping transformation is called the Julia set, and the iterative process is written as: z n+1 =z n 2 +c, by appropriately selecting c, can generate fractional-dimensional graphics resembling clouds. For example... Figure 8 As shown, Figure 8 (a) is the graph generated when c = -0.12357 + 0.56508i. Figure 8 (b) is the graph generated when c = -0.12 + 0.74i.
[0058] For example, the process of constructing a fractal QR code symbol with a leaf shape is as follows: Let the generation rules be R1, R2, ..., R n , where R i It is an affine transformation, also a linear transformation. The general form of the transformation is as follows: x´=ax+by+e, y´=cx+dy+f. For different R... i (i=1,2,…,n), with corresponding a i b i c i d i e i and f i Typically, n takes the values 2, 3, or 4, but can sometimes be as high as 16. Additionally, each rule has a probability p of being selected. i The requirement is p1 + p2 + ... + p n =1. Table 1 is the parameter table for Barnsley fern. Figure 9 The shapes of the Barnsley fern leaves are given for different iteration numbers, where, Figure 9(a) is for 1000 iterations, Figure 9 (b) is for 5000 iterations, Figure 9 (c) is for 30000 iterations.
[0059] Table 1 Barnsley Fern Parameters
[0060]
[0061] Third, regular grammar model.
[0062] Regular grammar model can generate structured topology, such as plants, and further geometric interpretation to form realistic pictures. The tool of this model is parallel rewriting system, which has two main differences from the general rewriting system in formal language theory: one is that the matching of the production in this system is performed simultaneously for all characters of an input string; the second is that there is no distinction between terminal and non-terminal symbols in this system. A subset of parallel rewriting system is L-system. L-system is actually a string rewriting system, which first defines a set of characters, sets the initial string and string replacement rules, and then replaces the original string according to the rules. The replacement of characters in each iteration process is parallel, that is, all characters are replaced at the same time. Finally, the string is interpreted into a graph, which can generate many classic fractals, especially the branching structure of plants. The symbol string of L-system is also called "turtle graphics", and the state of turtle graphics is represented by a triple (X, Y, D), where X and Y represent the horizontal and vertical coordinates respectively, and D represents the current direction. Let δ be the angle increment and h be the step size. A possible interpretation of the symbol string in graph theory is as follows:
[0063] F: go forward one step from the current position while drawing a line;
[0064] G: go forward one step from the current position without drawing a line;
[0065] +: turn left by a given angle from the current direction;
[0066] -: turn right by a given angle from the current direction;
[0067] | : turn 180° in place;
[0068] [ : Push, push the current state of the turtle graphics into the stack;
[0069] ]: Pop, reset the graphics state to the top of the stack and remove the contents of the stack;
[0070] \nn: increase the angle by nn degrees;
[0071] / nn: decrease the angle by nn degrees;
[0072] Reverse direction (control +, -, / );
[0073] nnn: multiply the length of the line segment by nnn, nnn can also be a simple function;
[0074] Other: also legal, mainly used to obtain complex interpretation.
[0075] For example, the process of constructing a fractal two-dimensional code with a snowflake-shaped emoji is as follows: given the initial string F--F--F, set the angle increment to 60°, and the corresponding graph is as shown in Figure 10 (a). The first "F" means walking a unit line segment (from left to right is specified), resulting in the AB line segment. Then there are two "-", which means turning right by 60° from the current direction. The second "F" means walking another unit length along the current direction, resulting in the BC line segment. Next, turn right by 60° again, draw a unit line segment, and get the CA line segment. Thus a triangle ABC is obtained. Given the substitution rule F=F+F--F+F, the corresponding graph is as shown in Figure 10 (b). Replace each "F" in "F--F--F" with "F+F--F+F", the first substitution gives: F+F--F+F--F+F--F+F--F+F--F+F, and the corresponding graph is as shown in Figure 11 (a). It is equivalent to Figure 10 (a) with the three edges replaced by Figure 10 (b). The second substitution gives: F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F, and the corresponding graph is as shown in Figure 11(b) is shown. The third substitution yields: F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F+F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F- -F+F+F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F+F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F --F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F+F+ F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F+F+F--F+F+F+F--F+F--F+F--F+F+F+F--F+F, the corresponding graphics are as follows Figure 11 As shown in (c), its shape resembles a snowflake.
[0076] Based on the same principle as the snowflake symbol, different initial strings and replacement strings can be used to construct fractal QR codes with fractal tree shapes.
[0077] like Figure 12 As shown, different fractal tree graphs generated under three different substitution rules are presented. Among them, Figure 12 (a) has an axiom (initial string) of A, and the substitution rule is: A→F[+A][-A]FA, F→FF; Figure 12 (b) is axiom A, and the substitution rule is: A→F[+A]F[-A]FA, F→FF; Figure 12 (c) has an axiom A and a substitution rule: A→F[+AA]-F[-A+A]FA, F→FF.
[0078] like Figure 13 As shown, fractal tree graphs under three other different rules are presented. Among them, Figure 13 (a) is a rule (in the following formula, S is a non-empty start symbol, called an axiom; P is a set of production rules or rewrite rules, and the predecessor and successor of a production rule are connected by "→", such as a→ab): n=5, δ=30°, S: F, P: F→F[+F]F[-F]F; Figure 13The rule of (b) is: n=5, δ=20°, S:F, P:F→F[F]F[F]-[F]; Figure 13 The rule of (c) is: n=4, δ=20.5°, S:F, P:F→FF-[-F+F+F]+[+F-F-F].
[0079] Fourthly, the particle system model.
[0080] The particle system model is used to simulate natural scenes with changing shapes, such as clouds, smoke, fire, etc. The particle system uses particle primitives to describe the scene. The particles can change in position and shape over time. The position, orientation, and dynamic properties of each particle are described by a set of pre-defined random processes. Each particle has a certain life cycle, and they constantly change shape and move. This feature of the particle system fully embodies the dynamics and randomness of irregular fuzzy objects, and it well simulates natural scenes such as fire, clouds, water, forests, and wilderness. Therefore, this model can also be used to construct fractal two-dimensional code symbols.
[0081] The above detailed the concept of fractal and the construction examples of fractal symbols of fractal two-dimensional codes with different shapes by using various fractal algorithms. In the following, a fractal symbol of a fractal two-dimensional code with a specific shape, for example, the Great Wall shape, will be taken as a specific embodiment to introduce the first aspect of the present disclosure: fractal two-dimensional code.
[0082] Figure 1 A schematic diagram of a fractal two-dimensional code provided by an embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the fractal two-dimensional code includes: a track line 101 having a fractal shape formed by dark modules and light modules arranged according to a preset rule; and an encoding area 102 surrounded by the track line 101, in which a data module 103 for expressing data information is arranged. Figure 1 In the present embodiment, the fractal shape of the fractal two-dimensional code is the Great Wall shape, so that the fractal two-dimensional code is particularly suitable for use in scenarios related to the Great Wall, for example, in various scenic spots of the Great Wall, the Great Wall-shaped fractal two-dimensional code can be used as a tourist payment code, a tourist pass code, etc., to realize the combination of the shape of the two-dimensional code with its application environment and use scenario, improve the visual appeal, and bring a better user experience. Specifically, the Great Wall fractal can be constructed by using the fractal algorithm described above, for example, by using the regular grammar model, and the construction principle is the same as above, which will not be described here again.
[0083] Further, in the present embodiment, as shown in FIG. 1, the dark modules and the light modules are arranged in a staggered manner.
[0084] Figure 1 Further, in the present embodiment, as shown in FIG. 1, the dark modules and the light modules are arranged in a staggered manner. Figure 1 The track lines 101 of the fractal two-dimensional code are formed by the dark modules (red modules in this embodiment) and the light modules (white modules in this embodiment, not shown in the figure) arranged at intervals. It should be noted that, Figure 1 Only part of the track lines 101 in the Great Wall shape and part of the data modules 103 are shown in the figure, and only the track lines 101 and the data modules 103 are shown for illustration. In fact, the complete fractal two-dimensional code has complete track lines 101 in the Great Wall shape (see the red line in (b)) and the data modules 103 are arranged in the coding area inside the track lines 101, rather than only in a corner of the Great Wall. Figure 3
[0085] In addition, in other optional embodiments, the track lines 101 can be formed by the dark modules and the light modules arranged according to other rules. For example, two dark modules and two light modules are arranged at intervals, or two dark modules and one light module are arranged at intervals, and so on. The specific arrangement rules are predefined, so that the recognizer of the fractal two-dimensional code knows the preset rules and can recognize and verify the track lines 101 with the preset rules. In addition, the colors of the modules are not limited to black, white, red, and the like, as long as the dark and light colors can be easily distinguished and distinguished.
[0086] Further, in this embodiment, a dark module is arranged at each inflection point of the fractal shape of the track line 101. The inflection point of the fractal shape refers to a point where the edge of the shape changes in the extension direction, which can also be understood as a turning point or a corner point. These inflection points are sequentially connected to form a fractal shape. This arrangement is conducive to more completely and accurately embodying the fractal shape of the fractal two-dimensional code, because the dark module is easier to identify during recognition, thereby improving the accuracy and efficiency of recognition.
[0087] Further, in this embodiment, the coding area 102 also has format information modules arranged at preset positions, which embody the format information of the fractal two-dimensional code. The format information can include the coding direction, the error correction level, and the floating correction value, and the like. In addition, the format information modules are arranged according to the preset rules, which can also assist in the recognition and positioning of the fractal two-dimensional code.
[0088] Further, in this embodiment, the coding area 102 also has a sequence header module and a sequence tail module. The sequence header module is located before the initial position of the data modules 103, and the sequence tail module is located after the end position of the data modules 103. The sequence header module and the sequence tail module are used to assist in determining the coding direction and determining the start position and the end position of the data modules 103.
[0089] The second aspect of the present disclosure is a fractal two-dimensional code generation method.
[0090] Figure 2 A flowchart of a fractal two-dimensional code generation method provided by an embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the fractal two-dimensional code generation method provided by the embodiment for generating the fractal two-dimensional code includes the following steps. Figure 2
[0091] S201, constructing a design figure with a fractal shape by using a fractal algorithm;
[0092] S202, determining a contour line of the design figure and converting the contour line into a track line formed by dark modules and light modules arranged according to a preset rule;
[0093] S203, gridizing the design figure according to the track line to obtain a grid figure;
[0094] S204, filling data modules in the grid figure to generate a fractal two-dimensional code.
[0095] In the embodiment, the fractal algorithm is selected as LS grammar. LS grammar is an algorithm for constructing a figure by imitating the grammatical generation method in linguistics, i.e., specifying one or several initial letters and a set of “generation rules”, repeatedly applying the generation rules to the initial letters and newly generated letters to generate the entire language, i.e., the aforementioned normal grammar model. Specifically, the principle and the process of constructing a figure of the algorithm refer to the foregoing, which will not be described herein. Of course, in other alternative embodiments, the selection of the fractal algorithm is not limited to LS grammar, and other fractal algorithms or other fractal curves can also be used. For example, when a snowflake figure is to be generated, a Koch curve can be selected.
[0096] Specifically, in the embodiment, a fractal two-dimensional code with the shape of the Great Wall is to be generated. As shown in FIG. 2(a), the shape of the Great Wall is determined. Then, a design figure with the shape of the Great Wall is generated by using the fractal algorithm, as shown in FIG. 2(b) by the red line. Figure 3 Figure 3 Specifically, in the embodiment, a fractal two-dimensional code with the shape of the Great Wall is to be generated. As shown in FIG. 2(a), the shape of the Great Wall is determined. Then, a design figure with the shape of the Great Wall is generated by using the fractal algorithm, as shown in FIG. 2(b) by the red line. Figure 3 Figure 3 Specifically, in the embodiment, a fractal two-dimensional code with the shape of the Great Wall is to be generated. As shown in FIG. 2(a), the shape of the Great Wall is determined. Then, a design figure with the shape of the Great Wall is generated by using the fractal algorithm, as shown in FIG. 2(b) by the red line. Figure 3 Figure 3 Specifically, in the embodiment, a fractal two-dimensional code with the shape of the Great Wall is to be generated. As shown in FIG. 2(a), the shape of the Great Wall is determined. Then, a design figure with the shape of the Great Wall is generated by using the fractal algorithm, as shown in FIG. 2(b) by the red line. Figure 3 (e) as shown, likewise, only part of the data modules are shown in the figure, it should be known that the whole grid is filled with data modules.
[0097] Further, in the embodiment, the contour line of the design figure is determined, including:
[0098] Obtaining the data to be stored in the fractal two-dimensional code;
[0099] Calculating the coding area according to the data to be stored;
[0100] Determining the area of the design figure according to the coding area;
[0101] Determining the contour line according to the area of the design figure.
[0102] The data to be stored refers to the coded data of the information to be stored in the fractal two-dimensional code, which is, for example, binary data. The data to be stored is expressed by data modules, which can be dark modules and light modules, wherein the dark modules represent 1 and the light modules represent 0, of course, the dark modules can also represent 0 and the light modules represent 1. Wherein, the dark modules and the light modules are, for example, squares composed of any a*a pixels. Thus, each dark module or light module needs to occupy a certain area, and the total area is the coding area. Further, the area of the design figure is determined to ensure that it is not less than the required coding area, so as to ensure that the data modules can be arranged into the design figure, thereby determining the contour line of the design figure.
[0103] Further, in the embodiment, the area of the design figure is determined according to the coding area, including: enlarging or reducing the design figure according to the coding area, so that the area of the design figure is not less than the coding area. Since the design figure adopts fractal graphics, the fractal graphics has self-similarity, which can be infinitely enlarged or reduced, thus the area of the fractal graphics can be adjusted, in the adjustment process, the area of the fractal graphics is greater than or equal to the coding area calculated above, and further can ensure that the data modules can be filled in the design figure.
[0104] Further, in the embodiment, the contour line is converted into a track line formed by dark modules and light modules arranged according to a preset rule, including: forming the track line in a form of interval arrangement of the dark modules and the light modules. Here, the interval arrangement refers to interval arrangement of the single dark module and the single light module one by one. In other alternative embodiments, the track line can be formed by the dark modules and the light modules arranged according to other rules. For example, two dark modules and two light modules are interval arranged, for example, two dark modules and one light module are interval arranged, and the like, and the specific arrangement rule is defined in advance, so that the identification party of the fractal two-dimensional code knows the preset rule, and can identify and verify the track line with the preset rule. In addition, the color of the module is not limited to black, white and red, and the like, as long as the light and shade are different, and the identification and differentiation can be facilitated.
[0105] Further, in the embodiment, the design graph symbol is gridded according to the track line to obtain a grid graph symbol, including: taking the center points of the dark modules and the light modules of each track line as grid end points, respectively dividing grids in the design graph symbol along the horizontal direction and the vertical direction to obtain the grid graph symbol. In the embodiment, the dark modules and the light modules of the data module adopt the same size as the dark modules and the light modules of the track line. Thus, when the grids are divided, the center points of the dark modules and the light modules of the track line are the grid end points, which can ensure that the size of the divided grid is the same as the size of the data module, facilitating subsequent filling of the data module.
[0106] Further, in the embodiment, the data module is filled in the grid graph symbol to generate the fractal two-dimensional code, including: sequentially filling the data module at each grid intersection of the grid graph symbol according to a preset rule to generate the fractal two-dimensional code. The preset rule is a filling rule of the data module, for example, a left-to-right and top-to-bottom filling rule. Of course, it can also be other user-defined filling rules. In addition, in other alternative embodiments, the data module can also be sequentially filled in each grid of the grid graph symbol according to a preset rule to generate the fractal two-dimensional code.
[0107] In addition, in other alternative embodiments, the fractal two-dimensional code generation method can further include:
[0108] Encode the storage data of the single two-dimensional code into a plurality of data module groups;
[0109] Correspondingly, a plurality of fractal graph symbols with fractal shapes are set;
[0110] The plurality of data module groups are respectively filled into the plurality of fractal graph symbols.
[0111] In the embodiment, the data originally intended to be stored by one two-dimensional code is divided into multiple groups, and multiple data module groups are encoded, for example, divided into eight groups; then multiple fractal symbols are generated by using fractal algorithm, for example, a tree-shaped graph is generated by using LS grammar, and the tree-shaped graph has eight fractal symbols in the shape of leaves; and then the data modules in the eight data module groups are respectively stored in the eight fractal symbols in the shape of leaves. Thus, the data to be stored is grouped and stored, and the security and diversity of data storage are increased.
[0112] In addition, in other optional embodiments, the fractal two-dimensional code generation method can further include:
[0113] encoding the data intended to be stored by multiple two-dimensional codes into multiple data module groups;
[0114] correspondingly setting multiple fractal symbols having fractal shapes;
[0115] respectively filling the multiple data module groups into the multiple fractal symbols.
[0116] In the embodiment, the data originally intended to be stored by multiple two-dimensional codes is stored in one large systematic fractal. For example, the data intended to be stored by eight two-dimensional codes is correspondingly used to generate a tree-shaped graph by using LS algorithm, and the tree-shaped graph has eight fractal symbols in the shape of leaves; and then the data module groups of the eight two-dimensional codes are respectively filled into the eight fractal symbols in the shape of leaves. Thus, the systematic display of multiple two-dimensional codes is realized, and when the data information of the eight two-dimensional codes has certain parallelism and correlation, the system between the two-dimensional codes can be displayed in the display form of the two-dimensional codes.
[0117] The third aspect of the embodiment will be introduced below: a fractal two-dimensional code recognition method.
[0118] Figure 4 A flowchart of the fractal two-dimensional code recognition method provided by an embodiment of the disclosure is shown in FIG. 4. As shown in FIG. 4, the fractal two-dimensional code recognition method provided by the disclosure for recognizing the fractal two-dimensional code includes the following steps. Figure 4
[0119] S401, according to the fractal algorithm used when the fractal two-dimensional code is generated, the fractal symbol in the scanned area is recognized;
[0120] S402, it is judged whether the boundary line of the fractal symbol is a track line, if yes, S403 is executed, the fractal symbol is gridded according to the track line, a grid symbol is obtained, S404 is executed, the data module in the grid symbol is recognized, and corresponding data information is read; if not, S405 is executed, and the recognition is terminated.
[0121] In the embodiment, there is no concept of specific size when searching for the target figure by using the fractal algorithm, but since the figure described by the fractal algorithm has self-similarity, the figure (i.e. the figure shape) of the fractal two-dimensional code can meet the requirement of image recognition. After the fractal image is recognized, it is further judged whether the boundary is a track line, for example, whether it is in the form of alternating arrangement of dark modules and light modules, if not, it is proved that it is not a track line of the fractal two-dimensional code, and the recognition is terminated; if yes, the fractal figure needs to be gridded by using the track line, for example, taking the center points of the dark modules and the light modules of each track line as the grid end points, and respectively dividing the grid in the figure along the horizontal direction and the vertical direction to obtain the grid figure. Finally, the data modules in the recognized grid figure or at the grid intersection points are dark modules or light modules, and the data modules are expressed as a data matrix according to the color depth and the preset placement rule, and then the data information is extracted.
[0122] In addition, in other optional embodiments, the fractal two-dimensional code recognition method can further include:
[0123] Respectively reading the data modules in the plurality of fractal figures;
[0124] Judging whether the plurality of fractal figures belong to the same two-dimensional code, if yes, combining the data modules in the plurality of fractal figures, and if not, respectively expressing the data modules in each fractal figure.
[0125] Here, the recognition method is mainly aimed at the fractal system in which a plurality of fractal figures are arranged, i.e. a plurality of fractal two-dimensional codes are arranged. For example, in a tree figure system, eight leaf-shaped fractal figures are arranged, and each fractal figure is arranged as a fractal two-dimensional code. At this time, eight fractal figures can be recognized during recognition, and then it needs to be judged whether the eight fractal figures express a piece of data together (i.e. the data modules in the eight figures need to be combined to express the data information completely) or express different data respectively (i.e. the data modules in the eight figures do not need to be combined, and each expresses its own data), if the former, the data modules in the plurality of fractal figures need to be combined, and if the latter, the data modules in each fractal figure need to be expressed respectively. Specifically, the figure characteristics can be set as the judgment standard, for example, if the data modules in the eight figures need to be combined to express the data information completely, a set of characteristic modules can be set to express the continuity and order of the eight sets of data modules; for example, if the data modules in the eight fractal figures need to be expressed respectively, the characteristic modules can be set to be irrelevant.
[0126] The fourth aspect of the present application is introduced as follows: a fractal two-dimensional code recognition system.
[0127] As Figure 5As shown, the system architecture can include terminal devices 501, 502, 503, 504, 507, a network 505, and a server 506. The network 505 is a medium for providing communication links between the terminal devices 501, 502, 503, 504, 507 and the server 506.
[0128] Here, the terminal devices 501, 502, 503, 504 are display devices, for example, for displaying fractal two-dimensional codes as described above.
[0129] The terminal device 507 is an identification device, for example, for scanning and identifying fractal two-dimensional codes displayed on the display devices 501, 502, 503, 504, etc.
[0130] The server 506 is used for sending or receiving fractal two-dimensional codes or data of fractal two-dimensional codes, for example.
[0131] In the present embodiment, the electronic device (e.g., the terminal devices 501, 502, 503, or 504 as shown in the figure) on which the method runs can transmit various information through the network 505. The network 505 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. It should be noted that the above wireless connection methods can include but are not limited to 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB connections, local area networks (“LAN”), wide area networks (“WAN”), Internet networks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as other now known or future developed network connection methods. The network 505 can communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network).
[0132] A user can use the terminal devices 501, 502, 503, 504 to interact with the server 506 through the network 505 to receive or send messages, etc. Various client applications can be installed on the terminal devices 501, 502, 503, or 504, such as video live streaming and playing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0133] The terminal device 501, 502, 503 or 504 can be various electronic devices with a touch display screen and / or supporting web browsing, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer 4) player, a head-mounted display device, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PMP (Portable Multimedia Player), a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal), and the like, as well as a mobile terminal such as a digital TV, a desktop computer, and the like.
[0134] The server 506 can be a server providing various services, such as a background server providing support for a page displayed on or data transmitted by the terminal device 501, 502, 503 or 504, and the server 506 can be, for example, a local server or a cloud server.
[0135] It should be understood that Figure 5 The number of terminal devices, networks and servers in the above description is merely illustrative. Any number of terminal devices, networks and servers can be provided according to implementation needs.
[0136] Here, the terminal device can implement the embodiment method of the present disclosure independently or by cooperating with other electronic terminal devices to run an application in an operating system such as an Android system, and can also run an application in other operating systems to implement the embodiment method of the present disclosure.
[0137] The fifth aspect, the sixth aspect and the seventh aspect of the present disclosure are described below: a computer device, a computer readable storage medium and a computer program product.
[0138] The computer device includes a memory, a processor and a computer program stored on the memory, and the processor executes the computer program to implement the steps of the above method.
[0139] The computer readable storage medium has a computer program stored thereon, and the computer program is executed by the processor to implement the steps of the above method.
[0140] The computer program product includes a computer program, and the computer program is executed by the processor to implement the steps of the above method.
[0141] As Figure 6 shown, a schematic diagram of a computer device suitable for implementing the embodiments of the present disclosure is shown. The computer device in the embodiments of the present disclosure is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0142] Continuing to refer to Figure 6The computer device includes a processing device 601, a storage device 602, a sensor device 603, a bus 604, an input / output (I / O) interface 605, a multimedia device 606, a power device 607, and a communication device 608, etc.
[0143] The processing device 601 (e.g., a central processing unit, a graphics processing unit, etc.) is configured to control overall operations of the computer device. The processing device 601 can include one or more processors to execute instructions to complete all or part of steps of the above-described methods. In addition, the processing device 601 can further include one or more modules for processing and interacting with other devices.
[0144] The storage device 602 is configured to store various types of data. The storage device 602 can be a computer readable storage medium or a combination thereof including various types of computer readable storage media, such as an electrical, a magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination thereof.
[0145] More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program used by an instruction execution system, apparatus, or device to function or operate.
[0146] The sensor device 603 is configured to sense information of a specified measured quantity and convert it into a useful output signal according to a certain rule, and can include one or more sensors. For example, it can include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor, etc., for detecting changes in the opening / closing state, relative positioning, acceleration / deceleration, temperature, humidity, and light of the computer device.
[0147] The processing device 601, the storage device 602, and the sensor device 603 are connected to each other through the bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0148] The multimedia device 606 can include input devices such as touch screen, touch pad, keyboard, mouse, camera, microphone, etc. to receive input signals from a user, and various input devices can cooperate with various sensors of the sensor device to complete gesture operation input, image recognition input, distance detection input, etc. The multimedia device can also include output devices such as liquid crystal display (LCD), speaker, vibrator, etc.
[0149] The power device 607 is used to provide power for various devices in the computer device, and can include a power management system, one or more power sources, and components for distributing power to other devices.
[0150] The communication device 608 can allow the computer device to communicate with other devices wirelessly or by wire to exchange data.
[0151] The above-mentioned devices can also be connected to the I / O interface 605 to realize the application of the computer device.
[0152] It should be understood that although each block in the block diagram of the accompanying drawings can represent a module (device) whose part contains one or more executable instructions for implementing a specified logic function, these modules are not necessarily executed sequentially in order. The modules and functional units in the embodiments of the present disclosure can be integrated in one processing module, or each unit can exist physically alone, or two or more modules or functional units can be integrated in one module. The above-mentioned integrated modules can be realized in the form of hardware or in the form of software functional modules. The integrated modules in the form of software functional modules can be stored in a computer readable storage medium when they are sold or used as independent products. The above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0153] Although the computer device with various devices is shown in the figure, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices can be implemented or provided instead.
[0154] In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiments of the present disclosure are executed.
[0155] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0156] It should be noted that the computer-readable medium described above in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0157] The aforementioned computer-readable medium may be included in the aforementioned computer device; or it may exist independently and not assembled into the computer device.
[0158] Furthermore, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Python, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0159] The flow and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.
[0160] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself.
[0161] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, non-limiting, exemplary types of hardware logic components that can be used include: Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0162] The features of the above-described embodiments according to the present disclosure are summarized and listed as follows.
[0163] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which employs the technical solutions described as follows, comprising:
[0164] The track lines have fractal shapes and are formed by dark color modules and light color modules arranged according to a preset rule; and
[0165] The encoding area is surrounded by the track lines, and the encoding area is arranged with data modules for expressing data information.
[0166] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which employs the technical solutions described as follows, the track lines are formed by the dark color modules and the light color modules arranged at intervals.
[0167] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical scheme as described below: the dark color modules are arranged at the inflection point positions of the fractal shape of the track line.
[0168] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical scheme as described below: the format information modules arranged according to the preset positions are further arranged in the coding area.
[0169] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical scheme as described below: the sequence head module is arranged before the initial position of the arrangement of the data modules, and the sequence tail module is arranged after the end position of the arrangement of the data modules.
[0170] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided for generating the fractal two-dimensional code described above, which adopts the technical scheme as described below, comprising:
[0171] Constructing a design graph symbol with a fractal shape by using a fractal algorithm;
[0172] Determining the contour line of the design graph symbol, and converting the contour line into a track line arranged by dark color modules and light color modules according to a preset rule;
[0173] Griding the design graph symbol according to the track line to obtain a grid graph symbol;
[0174] Filling the data modules in the grid graph symbol to generate the fractal two-dimensional code.
[0175] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as described below: the determination of the contour line of the design graph symbol comprises:
[0176] Obtaining the data to be stored of the fractal two-dimensional code;
[0177] Calculating the coding area according to the data to be stored;
[0178] Determining the area of the design graph symbol according to the coding area;
[0179] Determining the contour line according to the area of the design graph symbol.
[0180] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as described below: the determination of the area of the design graph symbol according to the coding area comprises:
[0181] According to the design graph symbol, the design graph symbol is enlarged or reduced according to the code arrangement area, so that the area of the design graph symbol is not less than the code arrangement area.
[0182] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as follows: the contour line is converted into a track line formed by dark modules and light modules arranged according to a preset rule, and the method comprises:
[0183] The track line is formed in a form of being arranged at intervals between the dark modules and the light modules.
[0184] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as follows: the design graph symbol is gridized according to the track line to obtain a grid graph symbol, and the method comprises:
[0185] The center points of the dark modules and the light modules of each track line are taken as grid end points, and a grid is divided in the design graph symbol along a horizontal direction and a vertical direction respectively to obtain the grid graph symbol.
[0186] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as follows: data modules are filled in the grid graph symbol to generate a fractal two-dimensional code, and the method comprises:
[0187] The data modules are sequentially filled in at each grid intersection of the grid graph symbol or inside each grid of the grid graph symbol according to a preset rule to generate the fractal two-dimensional code.
[0188] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as follows: the fractal two-dimensional code generation method further comprises:
[0189] A single two-dimensional code is encoded into a plurality of data module groups;
[0190] A plurality of fractal graph symbols with the fractal shape are correspondingly set;
[0191] The plurality of data module groups are respectively filled into the plurality of fractal graph symbols.
[0192] According to one or more embodiments of the present disclosure, a fractal two-dimensional code generation method is provided, which adopts the technical scheme as follows: the fractal two-dimensional code generation method further comprises:
[0193] A plurality of two-dimensional codes are encoded into a plurality of data module groups;
[0194] A plurality of fractal graph symbols with the fractal shape are correspondingly set;
[0195] Fill the plurality of data modules into the plurality of fractal symbols respectively.
[0196] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition method is provided for recognizing the fractal two-dimensional code described above, which adopts the technical scheme as follows, comprising:
[0197] According to the fractal algorithm adopted when generating the fractal two-dimensional code, the fractal symbol of the scanned area is recognized;
[0198] It is judged whether the boundary line of the fractal symbol is a track line, if yes, the fractal symbol is gridded according to the track line, a grid symbol is obtained, data modules in the grid symbol are recognized, and corresponding data information is read; if not, the recognition is terminated.
[0199] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition method is provided for recognizing the fractal two-dimensional code described above, which adopts the technical scheme as follows, the fractal two-dimensional code recognition method further comprises:
[0200] The data modules in the plurality of fractal symbols are read respectively;
[0201] It is judged whether the plurality of fractal symbols belong to the same two-dimensional code, if yes, the data modules in the plurality of fractal symbols are combined to express, if not, the data modules in each fractal symbol are expressed respectively.
[0202] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition system is provided, which adopts the technical scheme as follows, comprising:
[0203] A display device is used to display the fractal two-dimensional code described above;
[0204] A recognition device is used to scan and recognize the fractal two-dimensional code displayed on the display device;
[0205] A server is used to send or receive the fractal two-dimensional code or data of the fractal two-dimensional code.
[0206] According to one or more embodiments of the present disclosure, a computer device is provided, which comprises a memory, a processor and a computer program stored in the memory, the processor executes the computer program to realize the steps of the above method.
[0207] According to one or more embodiments of the present disclosure, a computer readable storage medium is provided, which stores a computer program, the computer program is executed by a processor to realize the steps of the above method.
[0208] According to one or more embodiments of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the above method.
[0209] The above description merely provides preferred embodiments of the present disclosure and a description of the technical principles of the present disclosure. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features with similar functions disclosed in the present disclosure (but not limited to) can be used.
[0210] In addition, although each operation is described in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable subcombination.
[0211] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A fractal two-dimensional code, characterized by, The fractal two-dimensional code comprises: a track line having a fractal shape formed by dark modules and light modules arranged according to a preset rule, the track line being identified by a fractal algorithm corresponding to the fractal shape, and the track line being used for identification and verification of the fractal two-dimensional code; and an encoding area surrounded by the track line, the encoding area being arranged with data modules for expressing data information, the data modules being used for reading to express the data information after the track line is identified and verified. The track line is formed by the dark modules and the light modules arranged at intervals. The dark modules are arranged at each inflection point of the fractal shape of the track line, and the dark modules at the inflection points are included in the track line. The track line is used to divide a grid in the encoding area with the center points of the dark modules and the light modules as grid end points, and the data modules are arranged at the grid intersections according to a preset rule. The encoding area is further arranged with format information modules arranged at preset positions.
2. The fractal two-dimensional code according to claim 1, wherein The encoding area is further arranged with a sequence header module before the initial position of the data modules and a sequence tail module after the end position of the data modules.
3. The fractal two-dimensional code according to claim 1, wherein The fractal two-dimensional code generation method comprises:
4. A fractal two-dimensional code generation method characterized by comprising: constructing a design figure symbol having a fractal shape by using a fractal algorithm; determining an outline of the design figure symbol and converting the outline into a track line formed by dark modules and light modules arranged according to a preset rule; gridizing the design figure symbol according to the track line to obtain a grid figure symbol; filling data modules in the grid figure symbol to generate the fractal two-dimensional code. The determination of the outline of the design figure symbol comprises: obtaining data to be stored in the fractal two-dimensional code; calculating a coding area according to the data to be stored; determining an area of the design figure symbol according to the coding area; determining the outline according to the area of the design figure symbol. The determination of the area of the design figure symbol according to the coding area comprises:
5. The fractal two-dimensional code generation method according to claim 4, wherein enlarging or reducing the design figure symbol according to the coding area, so that the area of the design figure symbol is not less than the coding area. The conversion of the outline into the track line formed by the dark modules and the light modules arranged according to the preset rule comprises:
6. The fractal two-dimensional code generation method according to claim 4, wherein forming the track line in the form of the dark modules and the light modules arranged at intervals. The gridization of the design figure symbol according to the track line to obtain the grid figure symbol comprises:
7. The fractal two-dimensional code generation method according to claim 4, wherein dividing a grid in the design figure symbol along a horizontal direction and a vertical direction respectively with the center points of the dark modules and the light modules of each track line as grid end points to obtain the grid figure symbol. The filling of the data modules in the grid figure symbol to generate the fractal two-dimensional code comprises:
8. The fractal two-dimensional code generation method according to claim 4, wherein filling the data modules in the grid figure symbol according to a preset rule at grid intersections or inside each grid of the grid figure symbol to generate the fractal two-dimensional code. The fractal two-dimensional code generation method further comprises:
9. The fractal two-dimensional code generation method according to claim 4, wherein Encoding the data to be stored in a single two-dimensional code into a plurality of data module groups; Correspondingly arranging a plurality of fractal symbols with the fractal shape; Respectively filling the plurality of data module groups into the plurality of fractal symbols.
10. The fractal two-dimensional code generation method according to claim 4, wherein The fractal two-dimensional code generation method further comprises: Encoding the data to be stored in a plurality of two-dimensional codes into a plurality of data module groups; Correspondingly arranging a plurality of fractal symbols with the fractal shape; Respectively filling the plurality of data module groups into the plurality of fractal symbols.
11. A fractal two-dimensional code recognition method, characterized by, The fractal two-dimensional code recognition method for recognizing the fractal two-dimensional code according to any one of claims 1 to 3 comprises: According to the fractal algorithm used when generating the fractal two-dimensional code, identifying the fractal symbol of the scanned area; Judging whether the boundary line of the fractal symbol is a track line composed of dark modules and light modules with a preset arrangement rule, if yes, taking the center points of the dark modules and the light modules of the track line as grid end points, respectively gridizing the fractal symbol along the horizontal direction and the vertical direction to obtain a grid symbol, identifying the data modules in the grid symbol as the dark modules or the light modules, and expressing the data modules as a data matrix according to the color depth of the data modules and a preset arrangement rule, and reading the corresponding data information; if not, terminating the recognition.
12. The fractal two-dimensional code recognition method according to claim 11, wherein, The fractal two-dimensional code recognition method further comprises: Respectively reading the data modules in the plurality of fractal symbols; Judging whether the plurality of fractal symbols belong to the same two-dimensional code, if yes, combining and expressing the data modules in the plurality of fractal symbols, if not, respectively expressing the data modules in each fractal symbol.
13. A fractal two-dimensional code recognition system, characterized by, It comprises: A display device for displaying the fractal two-dimensional code according to any one of claims 1 to 3; An identification device for scanning and identifying the fractal two-dimensional code displayed on the display device; A server for sending or receiving the fractal two-dimensional code or the data of the fractal two-dimensional code.
14. A computer device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the processor to perform the method of any one of claims 1-13. The processor executes the computer program to implement the steps of the method according to any one of claims 4 to 12.
15. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method according to any one of claims 4 to 12.
16. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method according to any one of claims 4 to 12.
Citation Information
Patent Citations
Two-dimensional code, two-dimensional code encoding method and device, and two-dimensional code recognition method and device
CN111523630A
Cmnibearing information synchronous two-dimensional bar code system and reading method
CN1444175A
Two-dimentional bar code system of continuous chagnable of length-width ratio of code area
CN1560792A
Identification code issuing / recognizing system using fractal figure
JP2005292888A