Fractal two-dimensional code and generation method, identification method, identification system and equipment thereof
Generating QR codes with fractal shapes through fractal algorithms solves the problem of single shapes of existing QR codes and achieves better user experience and visual appeal.
Patent Information
- Application Number
- CN202510052278.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing QR code has a single and fixed shape, limiting its wide application in more fields and a better user experience.
The fractal algorithm is used to construct design symbols with fractal shapes, and converted into track lines formed by dark modules and light modules arranged according to preset rules, grid them and fill in the coded area to generate fractal QR codes.
It breaks through the shape singularity of traditional rectangular QR codes, realizes the diversification and innovation of QR code shapes, and improves visual appeal and user experience.
Smart Images

Figure CN119940385A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of two-dimensional codes, and in particular to a fractal two-dimensional code and a generation method, recognition method, recognition system, and device thereof. Background Art
[0002] In today's era of rapid digital information dissemination, QR 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., QR codes have become an indispensable part of people's lives and work due to their ability to quickly and accurately store and read large amounts of information.
[0003] However, the two-dimensional codes in the prior art have obvious limitations in shape. Their shape is single and fixed, and most of them are rectangular. Although this stereotyped rectangular shape has certain stability and convenience in information carrying and reading, it also brings some problems.
[0004] On the one hand, rectangular QR codes lack visual appeal and uniqueness, making it difficult to stand out among many information display methods. In some scenarios that focus on design and aesthetics, such as creative advertisements and art exhibitions, the monotonous appearance of rectangular QR codes 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, rectangular QR codes are less adaptable in some application scenarios with special shapes or limited space. For example, in some product packaging or display areas with specific shapes, rectangular QR codes may not be fully adapted, resulting in wasted space or incomplete information display.
[0006] Therefore, the single and fixed shape of existing QR codes limits their wide application in more fields and better user experience. There is an urgent need for a new QR code generation method to break this limitation and achieve diversification and innovation of QR code shapes. Summary of the invention
[0007] The present disclosure provides a fractal two-dimensional code and a generation method, recognition method, recognition system, and device thereof, so as to solve the technical problem in the prior art that the single and fixed shape of the two-dimensional code limits its wide application in more fields and better user experience.
[0008] In order to solve the above technical problems, the present disclosure provides a fractal two-dimensional code, comprising: Track lines, which have fractal shapes, are formed by dark modules and light modules arranged according to preset rules; and The coding area is surrounded by the track line, and data modules for expressing data information are arranged in the coding area.
[0009] In order to solve the above technical problems, the present disclosure also provides a fractal two-dimensional code generation method, comprising: Use fractal algorithms to construct design icons with fractal shapes; Determine the outline of the design icon, and convert the outline into a track line formed by arranging dark modules and light modules according to a preset rule; Gridding the design icon according to the track line to obtain a grid icon; The data module is filled in the grid icon to generate the fractal two-dimensional code.
[0010] In order to solve the above technical problems, the present disclosure also provides a fractal two-dimensional code recognition method, comprising: According to the fractal algorithm used when generating the fractal two-dimensional code, the fractal symbol of the scanned area is identified; Determine whether the boundary line of the fractal symbol is a track line. If so, grid the fractal symbol according to the track line, obtain the grid symbol, identify the data module in the grid symbol, and read the corresponding data information; if not, terminate the identification.
[0011] In order to solve the above technical problems, the present disclosure also provides a fractal two-dimensional code recognition system, comprising: A display device, used to display the fractal two-dimensional code as described above; An identification device, used for scanning and identifying the fractal two-dimensional code displayed on the display device; The server is used to send or receive the fractal two-dimensional code or the data of the fractal two-dimensional code.
[0012] In order to solve the above technical problems, the present disclosure also provides a computer device, including a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above method.
[0013] In order to solve the above technical problems, the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0014] In order to solve the above technical problems, the present disclosure also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0015] The positive and progressive effects of this disclosure: The fractal two-dimensional code disclosed in the present invention has a fractal shape, which breaks through the singleness and fixedness of the shape of the traditional rectangular two-dimensional code. The fractal two-dimensional code can be combined with the environment and design elements in which it is applied, and the shape is integrated to improve the visual appeal and bring a better user experience. The track line of the fractal two-dimensional code has a fractal shape, which is convenient for capturing the fractal graphics during recognition. Since the track line is formed by dark modules and light modules arranged according to preset rules, it is convenient to verify the boundary line of the captured fractal graphics, thereby improving the accuracy of recognition; the coding area within the track line is arranged with data modules, which is convenient for extracting the coding information after verifying that the boundary line of the fractal graphics is the track line. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a fractal two-dimensional code provided according to an embodiment of the present disclosure.
[0017] Figure 2 A flowchart of a method for generating a fractal two-dimensional code provided in one embodiment of the present disclosure.
[0018] Figure 3 A schematic diagram of a fractal QR code generation process provided in one embodiment of the present disclosure.
[0019] Figure 4 A flowchart of a fractal two-dimensional code recognition method provided in one embodiment of the present disclosure.
[0020] Figure 5 A schematic diagram of a fractal two-dimensional code recognition system provided in accordance with an embodiment of the present disclosure.
[0021] Figure 6 A schematic diagram of a computer device provided by an embodiment of the present disclosure.
[0022] Figure 7 Schematic diagram of the process of generating mountain fractals using a random interpolation model.
[0023] Figure 8 Schematic diagram of a cloud-shaped fractal generated using the iterated function system model.
[0024] Fig. 9 Schematic diagram of a leaf-shaped fractal generated using the iterated function system model.
[0025] Fig.10 Schematic diagram of the initial graphics and replacement rules for generating snowflake fractals using a regular grammar model.
[0026] Fig.11 Schematic diagram of the process of generating snowflake fractals using a regular grammar model.
[0027] Fig.12This is a schematic diagram of a tree fractal generated according to a certain rule using a regular grammar model.
[0028] Fig.13 A schematic diagram of a tree fractal generated by another rule using a regular grammar model.
[0029] The above and other features, advantages, etc. of each embodiment of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the accompanying drawings are schematic and the elements are not necessarily drawn to scale. DETAILED DESCRIPTION
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present disclosure belongs; herein, the terms used in the specification of the application are only for describing specific embodiments and are not intended to limit the present disclosure; the term "including" in the specification and claims of the present disclosure and any corresponding variations are intended to cover non-exclusive inclusions.
[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present disclosure. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0033] In the present disclosure, we introduce fractal theory into the field of QR code technology, and use fractals to describe and express various complex graphics in nature to break through the singleness of the shape of existing QR codes, so that the shape of the QR code can be integrated with its application scenario. For example, a fractal QR code with a snowflake shape is set up in a ski resort, a fractal QR code with a leaf shape is set up in a park, a fractal QR code with a coastline shape is set up in a beach scenic area, a fractal QR code with a mountain shape is set up in a mountainous area, and so on. Since the technical solution of the present disclosure uses a fractal algorithm to construct the symbols of the fractal QR code, therefore, in order to better understand the technical solution of the present disclosure and implement the technical solution of the present disclosure, the concept of fractals and their application in the construction of fractal QR code symbols are first introduced below.
[0034] 1. The concept of fractal.
[0035] The most basic feature of fractal theory is to describe and study objective things from the perspective of fractional dimensions and mathematical methods, that is, to describe and study objective things with the mathematical tools of fractal dimension. It jumps out of the traditional barriers of one-dimensional lines, two-dimensional surfaces, three-dimensional solids and even four-dimensional space-time, and is closer to the description of the true attributes and states of complex systems, which is more in line with the diversity and complexity of objective things. In nature, self-similar forms are widely present, such as: continuous mountains and rivers, floating clouds, rock fractures, Brownian motion of particles, tree crowns, cauliflowers, cerebral cortex, etc. We call these parts and the whole similar in some way 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 simple mathematical models, such as the three-dimensional Cantor set and the Koch curve; irregular fractals refer to fractals with statistical self-similarity, such as the winding coastline and floating clouds.
[0036] From this we can see that fractals have the following characteristics: First, self-similarity. No matter from which angle you observe the local part of the fractal, you can find features similar to the overall shape. This feature can be described geometrically or expressed by mathematical formulas. Classic self-similar fractals include the Cantor set, the Sierpinski triangle, and the Koch snowflake. Second, fractal dimension. The dimension of a fractal can be a non-integer, which is called "fractal dimension". This property enables fractals to describe complex shapes and structures. For example, when the length of a coastline is measured at different scales, different results may appear, showing its fractal dimension characteristics.
[0037] 2. The construction of fractal symbols of fractal QR code.
[0038] The following introduces the construction of fractal symbols of fractal QR codes of different shapes in combination with several common fractal models.
[0039] The first one is the random interpolation model.
[0040] The random interpolation model does not determine various pixels and scales in advance, but uses a random process sampling path as a means of constructing the model. Commonly used methods in the random interpolation model include the random midpoint displacement method, which is a simple and fast random interpolation method that approximates 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 end point be P n The midpoint displacement of the line segment is obtained by adding a random offset value r to the average of the starting point and the end point: m ﹦P0﹢P n ﹢r, where r is from 0 to proportional to |P n -P0| 2HThe Gaussian distribution between the mean square error of the midpoint displacement and the mean square error of the midpoint displacement is H = 2-D, and D>1 is the fractal dimension. The two line segments generated after the midpoint displacement are subjected to random midpoint displacement, and the natural phenomenon can be simulated by recursion.
[0041] For example, the process of constructing a fractal QR code with a coastline shape is as follows: select a number of initial points that control the general shape; take the middle point of the line segment formed by two adjacent points and randomly offset it by a distance along the vertical line; then connect the offset point with the two end points of the line segment to form two new line segments. In this way, a tortuous coastline with infinite detailed regression can be obtained, and its tortuosity is controlled by the random offset, which also determines the size of the fractal dimension.
[0042] For example, the process of constructing a fractal two-dimensional code icon with a mountain shape is as follows: Figure 7 As shown, in a Figure 7 (a) Randomly select a point on each of the three sides of the triangle, randomly offset a distance in the vertical direction to obtain three new points, and then connect them into Figure 7 (b) The four triangles shown in the figure can form a wrinkled mountain peak. Figure 7 (c) The degree of mountain wrinkles is controlled by the fractal dimension.
[0043] The second is the iterated function system model.
[0044] The iterated function system model takes the iterated function system theory as its mathematical basis. An iterated function system in n-dimensional space consists of two parts: a finite set M={M1,M2,...,M n}; second, there is a probability set P={P1,P2,…,P n}. Each P i With M i Related, ∑P i = 1. The iterated function system works in the following way: take any point Z0 in space and use P i Probability selection transformation M i , transform Z1=M i (Z0), and then P i The probability of selecting transformation M i , transform Z1 to Z2=M i (Z1), and in this way, an infinite set of points is obtained. The model method is to select a suitable mapping set, probability set and initial point so that the generated infinite set of points can simulate a certain scene. If the modulus of the selected mapping transformation eigenvalue is less than 1, then the system has a unique bounded closed set, called the attractor of the iterated function system. The attractor is the gathering place of the iteratively generated points. The speed at which a point approaches the attractor depends on the size of the eigenvalue.
[0045] For example, the process of constructing a fractal QR code with a cloud shape is as follows: Select the following selection 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: n+1 =z n 2 +c, by properly selecting c, a fractal graphic similar to a cloud can be generated. 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.
[0046] For example, the process of constructing a fractal QR code with a leaf shape is as follows: Let the generation rules be R1, R2, …, R n , where R i It is an affine transformation, which is 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), there is a corresponding i 、b i 、c i d i 、e i and f i Usually n is 2, 3, 4, and sometimes up to 16. In addition, each rule has a probability p of being selected. i , requiring p1+p2+…+p n = 1. Table 1 is the parameter table of Barnsley fern. Fig. 9 The corresponding Barnsley fern leaf shapes under different iteration numbers are given, where Fig. 9 (a) is 1000 iterations, Fig. 9 (b) is 5000 iterations, Fig. 9 (c) is 30,000 iterations.
[0047] Table 1 Barnsley fern parameters
[0048] The third type is the regular grammar model.
[0049] The formal grammar model can generate highly structured topological structures, such as plants, and then form realistic pictures through further geometric interpretation. The tool of this model is the parallel rewriting system, which has two main differences from the general rewriting system in formal language theory: first, the matching of productions in this system is performed simultaneously for all characters of an input string; second, this system does not distinguish between terminal symbols and non-terminal symbols. A subset of the parallel rewriting system is the L system. The L system is actually a string rewriting system. First, the character set is defined, the initial string and string substitution rules are set, and then the original string is continuously replaced 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, by interpreting the string into a graph, many classic fractals can be generated, especially the branching structure of plants that can be well expressed. The symbol string of the L system is also called a "turtle graph". The state of the turtle graph 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 graphical interpretation of the symbol string is as follows: F: Move forward one step from the current position and draw a line at the same time; G: Move one step forward from the current position, but do not draw a line; +: turn left a given angle from the current direction; -: turn right a given angle from the current direction; |: Turn 180° on the spot; [: Push, push the current state of the turtle image into the stack; ]: Pop, reset the graphics state to the state at the top of the stack and remove the contents of the stack; \nn: increase the angle by nn degrees; / nn: decrease the angle by nn degrees; !: Reverse direction (control +, -, / ); @nnn: multiply the length of the line segment by nnn, where nnn can also be a simple function; Other: Also legal, mainly used to obtain complex explanations.
[0050] For example, the process of constructing a fractal QR code with a snowflake shape is as follows: given an initial string of F--F--F, and an angle increment of 60°, the corresponding graphic is as follows: Fig.10(a). The first "F" means walking forward one unit line segment (from left to right), and the resulting line segment is AB. Then there are two "-", which means turning right two 60° from the current direction. The second "F" means walking another unit length in the current direction, and the resulting line segment is BC. Next, turn right two more 60°, and draw another unit line segment, and the resulting line segment is CA. Thus, a triangle ABC is obtained. The substitution rule is given as F=F+F--F+F, and the corresponding figure is as follows: Fig.10 (b) As shown. Replace each "F" in "F--F--F" with "F+F--F+F", and the first substitution is: F+F--F+F--F+F--F+F--F+F--F+F, and the corresponding graph is as follows Fig.11 (a) is equivalent to Fig.10 The three sides of (a) are Fig.10 (b) Replace. 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+F--F+F+F--F+F+F--F+F+F--F+F+F+F--F+F, and the corresponding graph is as follows: Fig.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, the corresponding graphics are as follows Fig.11 As shown in (c), its shape is similar to a snowflake.
[0051] Based on the same principle as the snowflake icon, different initial character strings and replacement character strings can be used to construct a fractal two-dimensional code icon having a fractal tree shape.
[0052] like Fig.12 As shown in the figure, three different fractal tree graphs generated under different substitution rules are given. Among them, Fig.12 The axiom (initial string) of (a) is A, and the substitution rule is: A→F[+A][-A]FA, F→FF; Fig.12 The axiom of (b) is A, and the substitution rule is: A→F[+A]F[-A]FA, F→FF; Fig.12 The axiom of (c) is A, and the substitution rule is: A→F[+AA]-F[-A+A]FA, F→FF.
[0053] like Fig.13 As shown in the figure, three other fractal tree graphics under different rules are given. Among them, Fig.13 The rules for (a) are (in the following formula, S is a non-empty start symbol, called an axiom; P is a set of productions or rewriting rules, and the predecessor and successor of a production are connected by “→”, such as a→ab): n=5, δ=30°, S: F, P: F→F[﹢F]F[﹣F]F; Fig.13 The rules for (b) are: n=5, δ=20°, S:F, P:F→F[﹢F]F[﹣F][F]; Fig.13 The rule for (c) is: n = 4, δ = 20.5°, S: F, P: F→FF-[-F﹢F﹢F]+[﹢F﹣F﹣F].
[0054] The fourth type is the particle system model.
[0055] The particle system model is used to simulate natural scenes with changing shapes, such as clouds, smoke, and fire. The particle system uses particle primitives to describe the scene. Particles can change position and shape over time. The position, orientation, and dynamic properties of each particle are described by a set of predefined random processes. Each particle has a certain life cycle, and they keep changing shape and moving. This feature of the particle system makes it fully reflect the dynamics and randomness of irregular fuzzy objects, and well simulates natural landscapes such as fire, clouds, water, forests, and wilderness. Therefore, this model can also be used to construct fractal QR code symbols.
[0056] The above describes in detail the concept of fractal and the construction examples of fractal symbols of fractal two-dimensional codes of different shapes by various fractal algorithms. The following describes the first aspect of the disclosed embodiment: fractal two-dimensional code, taking a fractal symbol of a specific shape, such as the Great Wall, as a specific embodiment.
[0057] Figure 1Schematic diagram of a fractal two-dimensional code provided by an embodiment of the present disclosure. Figure 1 As shown, the fractal two-dimensional code includes: a track line 101, which has a fractal shape and is formed by arranging dark modules and light modules according to preset rules; and a coding area 102, which is surrounded by the track line 101, and data modules 103 for expressing data information are arranged in the coding area 102.
[0058] In this embodiment, the fractal shape of the fractal QR code is the shape of the Great Wall, so that the fractal QR code is particularly suitable for use scenarios related to the Great Wall. For example, in various scenic spots of the Great Wall, the fractal QR code in the shape of the Great Wall can be used as a tourist payment code, a tourist pass code, etc., to achieve the combination of the shape of the QR code with its application environment and use scenario, improve visual appeal, and bring a better user experience. Specifically, the Great Wall fractal can be constructed using the aforementioned fractal algorithm, such as a regular grammar model, and its construction principle is the same as above, which will not be repeated here.
[0059] Furthermore, in this implementation, if Figure 1 As shown, the dark module ( Figure 1 The red module in the figure) and the light-colored module (the white module in this embodiment, not shown in the figure) are arranged alternately to form the track line 101 of the fractal two-dimensional code. It should be noted that Figure 1 Only part of the Great Wall-shaped track line 101 and part of the data module 103 are shown in the figure. The track line 101 module and the data module 103 are only used for illustration. In fact, the complete fractal two-dimensional code has a contour line along the Great Wall shape (see Figure 3 The complete track line 101 in the shape of the Great Wall (red line in (b)) is set, and the data modules 103 are distributed throughout the coding area inside it, rather than just being arranged in a corner of the Great Wall.
[0060] In addition, in other optional implementations, the track line 101 can be formed by dark modules and light modules arranged according to other rules. For example, two dark modules are arranged alternately with two light modules, and for another example, two dark modules are arranged alternately with one light module, and so on. The specific arrangement rules are pre-defined so that the recognizer of the fractal two-dimensional code knows the preset rules and can identify and verify the track line 101 with the preset rules. In addition, the color of the module is not limited to black, white, red and other colors, as long as the shades are different, it can be easily identified and distinguished.
[0061] Furthermore, in this embodiment, dark modules are provided at the inflection points of the fractal shape of the track line 101. The inflection points of the fractal shape refer to the points where the edges of the shape change in the extension direction, which can also be understood as turning points or corner points. These inflection points are connected in sequence to form a fractal shape. This setting method is conducive to more complete and accurate reflection of the fractal shape of the fractal two-dimensional code, because the dark modules are easier to identify during recognition, thereby improving the accuracy and efficiency of recognition.
[0062] Furthermore, in this embodiment, the encoding area 102 is also arranged with a format information module set in a preset position to reflect the format information of the fractal two-dimensional code, wherein the format information may include encoding direction, error correction level, and floating correction value, etc. In addition, the format information modules are arranged according to preset rules, which can also assist in the recognition and positioning of the fractal two-dimensional code.
[0063] Furthermore, in this embodiment, a header module and a tail module are arranged in the encoding area 102, the header module is located before the initial position of the data module 103, and the tail module is located after the end position of the data module 103. The header module and the tail module are used to assist in determining the encoding direction and determining the start position and end position of reading the data module 103.
[0064] The second aspect of the present disclosure is introduced below: a fractal two-dimensional code generation method.
[0065] Figure 2 Flow chart of a method for generating a fractal two-dimensional code provided by an embodiment of the present disclosure. Figure 2 As shown, the fractal two-dimensional code generation method provided in this embodiment for generating the above-mentioned fractal two-dimensional code includes: S201, constructing a design icon with a fractal shape by using a fractal algorithm; S202, determining the outline of the design symbol, and converting the outline into a track line formed by arranging dark modules and light modules according to a preset rule; S203, gridding the design icon according to the track line to obtain a grid icon; S204, filling the data module in the grid icon to generate a fractal two-dimensional code.
[0066] In this embodiment, the fractal algorithm uses LS grammar. LS grammar is an algorithm that constructs graphics by imitating the grammar generation method in linguistics, that is, specifying one or several initial letters and a set of "generation rules", and repeatedly applying the generation rules to the initial letters and newly generated letters to generate the entire language, that is, the aforementioned regular grammar model. Specifically, the principle of the algorithm and the process of constructing the graphics refer to the above text and will not be repeated here. Of course, in other optional implementations, the selection of fractal algorithms is not limited to LS grammar, and other fractal algorithms can also be selected, or other fractal curves can be used. For example, when it is necessary to generate snowflake graphics, the Koch curve can be selected.
[0067] Specifically, in this embodiment, a fractal QR code in the shape of the Great Wall is to be generated, such as Figure 3 (a) shows the proposed shape of the Great Wall. Then, the fractal algorithm is used to generate a design symbol with the shape of the Great Wall, as shown in Figure 3 (b) The design symbol in the shape of the Great Wall is depicted by the red line; determine the contour line of the design symbol in the shape of the Great Wall, that is, Figure 3 (b) The red line; then the contour is transformed into Figure 3 (c) shows a track line formed by alternately arranging dark modules (red modules) and light modules (white modules, not shown in the figure), where: Figure 3 (c) shows only part of the track lines in the design symbol. It should be known that the contour lines of the entire Great Wall symbol will be converted into track lines. Then the Great Wall symbol is meshed using the track lines to obtain a mesh symbol with the shape of the Great Wall, such as Figure 3 (d) As shown in the figure, similarly, only part of the grid in the grid symbol is schematically shown in the figure. It should be known that the entire grid symbol will be filled with track lines; finally, the data module is filled in the grid symbol, such as Figure 3 As shown in (e), similarly, the figure only schematically shows part of the data modules, and it should be known that the entire grid icon is filled with data modules.
[0068] Furthermore, in this embodiment, determining the outline of the design symbol includes: Obtain the data to be stored of the fractal QR code; Calculate the coding area according to the data to be stored; Determine the area of the design symbol based on the coding area; Determine the outline according to the area of the design symbol.
[0069] The data to be stored refers to the data after the information is encoded and needs to be stored in the fractal two-dimensional code, and the data is, for example, binary data. The data to be stored is expressed by a data module, and the data module can adopt a dark module and a light module, wherein the dark module represents 1 and the light module represents 0. Of course, a dark module can also be used to represent 0 and a light module to represent 1. Among them, the dark module and the light module are, for example, a square composed of any a*a pixels. Therefore, each dark module or light module needs to occupy a certain area, and its total area is the coding area. Further, the area of the design symbol is determined to ensure that it is not less than the required coding area to ensure that all the data modules can be arranged in, thereby determining the outline of the design symbol.
[0070] Furthermore, in this embodiment, determining the area of the design symbol according to the coding area includes: enlarging or reducing the design symbol according to the coding area so that the area of the design symbol is not less than the coding area. Since the design symbol adopts a fractal graphic, the fractal graphic has self-similarity and can be infinitely enlarged or reduced. Therefore, the area of the fractal graphic can be adjusted. During the adjustment process, the area of the fractal graphic is made greater than or equal to the coding area calculated above, thereby ensuring that the data module can be filled in the design symbol.
[0071] Further, in the present embodiment, the contour line is converted into a track line formed by arranging dark modules and light modules according to preset rules, including: forming the track line in the form of dark modules and light modules arranged at intervals. Here, the interval arrangement refers to a single dark module and a single light module arranged at intervals one by one. In other optional implementations, the track line can be formed by arranging dark modules and light modules according to other rules. For example, two dark modules are arranged at intervals with two light modules, and for another example, two dark modules are arranged at intervals with one light module, 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 identify and verify the track line with the preset rules. In addition, the color of the module is not limited to black, white, red and other colors, as long as the shades are different, it can be easily identified and distinguished.
[0072] Furthermore, in this embodiment, the design symbol is gridded according to the track line to obtain the grid symbol, including: taking the center points of the dark module and the light module of each track line as the grid endpoints, dividing the grid in the design symbol along the horizontal direction and the vertical direction respectively, to obtain the grid symbol. In this embodiment, the dark module and the light module of the data module adopt the same size as the dark module and the light module of the track line. Therefore, when dividing the grid, the center points of the dark module and the light module of the track line are the grid endpoints, which can ensure that the size of the divided grid is the same as the size of the data module, which is convenient for the subsequent filling of the data module.
[0073] Further, in the present embodiment, filling the data module in the grid symbol to generate the fractal two-dimensional code includes: filling the data module in sequence according to the preset rules at each grid intersection of the grid symbol to generate the fractal two-dimensional code. Among them, the preset rules are the filling rules of the data module, for example, from left to right and from top to bottom. Of course, it can also be other user-defined filling rules. In addition, in other optional implementations, the data modules can also be filled in sequence according to the preset rules inside each grid of the grid symbol to generate the fractal two-dimensional code.
[0074] In addition, in other optional implementations, the fractal two-dimensional code generation method may further include: Encoding the data to be stored in a single QR code into multiple data module groups; Correspondingly, a plurality of fractal icons having fractal shapes are set; Fill multiple data module groups into multiple fractal symbols respectively.
[0075] In this implementation, the data originally intended to be stored in a two-dimensional code is divided into multiple groups, and multiple data module groups are encoded, for example, into eight groups; then multiple fractal symbols are generated using a fractal algorithm, for example, a tree graph is generated using the LS grammar, and the tree graph has eight leaf-shaped fractal symbols; then the data modules in the eight data module groups are respectively stored in the eight leaf-shaped fractal symbols. In this way, a section of data to be stored is stored in groups, which increases the security and diversity of data storage.
[0076] In addition, in other optional implementations, the fractal two-dimensional code generation method may further include: Encoding the data to be stored of the multiple QR codes into multiple data module groups; Correspondingly, a plurality of fractal icons having fractal shapes are set; Fill multiple data module groups into multiple fractal symbols respectively.
[0077] In this implementation, it is equivalent to storing the data originally intended to be stored in multiple QR codes in a large systematic fractal. For example, there are originally eight QR codes to store data. Correspondingly, a tree-shaped graph is generated using the LS algorithm, and the tree-shaped graph has eight leaf-shaped fractal symbols; then the data module groups of the eight QR codes are respectively filled into the eight leaf-shaped fractal symbols. In this way, a systematic display of multiple QR codes is achieved, especially when the data information of the eight QR codes has a certain degree of parallelism, correlation, etc., the systematicity between them can be displayed in the form of the QR code display.
[0078] The third aspect of this embodiment is introduced below: a fractal two-dimensional code recognition method.
[0079] Figure 4 Flow chart of a fractal two-dimensional code recognition method provided by an embodiment of the present disclosure. Figure 4 As shown, the fractal two-dimensional code recognition method provided by the present disclosure for recognizing the above-mentioned fractal two-dimensional code includes: S401, identifying the fractal symbol of the scanned area according to the fractal algorithm used when generating the fractal two-dimensional code; S402, determine whether the boundary line of the fractal symbol is a track line, if so, execute S403, grid the fractal symbol according to the track line, obtain the grid symbol, and execute S404, identify the data module in the grid symbol, and read the corresponding data information; if not, execute S405, terminate the identification.
[0080] In this embodiment, when using the fractal algorithm to find the target icon, there is no concept of specific size, but because the graphics described by the fractal algorithm have self-similarity, the icon (i.e., the shape of the graphic) of the fractal two-dimensional code can meet the requirements of image recognition. After identifying the fractal image, it is further determined whether its boundary is a track line, for example, whether it is a form of dark modules and light modules arranged alternately. If not, it is proved that it is not a track line of the fractal two-dimensional code, and the recognition is terminated; if so, it is necessary to further use the track line to grid the fractal icon, for example, the center points of the dark modules and light modules of each track line are used as grid endpoints, and the grid is divided in the icon along the horizontal direction and the vertical direction respectively, to obtain the grid icon. Finally, the data module in the grid icon or at the intersection of the grid is identified as a dark module or a light module, and the data module is expressed as a data matrix according to the color depth and the preset placement rules, and then the data information is extracted.
[0081] In addition, in other optional implementations, the fractal two-dimensional code recognition method may further include: Read the data modules in multiple fractal symbols respectively; It is determined whether the multiple fractal symbols belong to the same two-dimensional code. If so, the data modules in the multiple fractal symbols are combined and expressed. If not, the data modules in each fractal symbol are expressed separately.
[0082] Here, the recognition method is mainly aimed at a fractal system in which multiple fractal symbols are set in the fractal, that is, multiple fractal two-dimensional codes are set. For example, in a tree-shaped graphic system, eight fractal symbols in the shape of leaves are set, and each fractal symbol is set as a fractal two-dimensional code. At this time, when identifying, eight fractal symbols can be identified. After that, it is necessary to judge whether the eight fractal symbols express a piece of data together (that is, the data modules in the eight symbols need to be combined to fully express the data information), or express different data separately (that is, the data modules in the eight symbols do not need to be combined, and each expresses its own data). If it is the former, it is necessary to combine the data modules in multiple fractal symbols to express them. If it is the latter, it is necessary to express the data modules in each fractal symbol separately. Specifically, the symbol feature can be set as a judgment standard. For example, if the data modules in the eight symbols need to be combined to fully express the data information, a group of feature modules can be set, and the continuity and sequence of the eight groups of data modules can be expressed by the feature modules; for another example, if the data modules in the eight fractal symbols need to be expressed separately, the feature modules can be set to be irrelevant.
[0083] The fourth aspect of the present invention is introduced below: a fractal two-dimensional code recognition system.
[0084] like Figure 5 As shown, the system structure may include terminal devices 501, 502, 503, 504, 507, a network 505 and a server 506. The network 505 is used to provide a medium for communication links between the terminal devices 501, 502, 503, 504, 507 and the server 506.
[0085] Here, the terminal devices 501, 502, 503, and 504 are, for example, display devices for displaying the fractal two-dimensional code as described above.
[0086] The terminal device 507 is, for example, an identification device, which is used to scan and identify the fractal two-dimensional code displayed on the display devices such as the terminal devices 501, 502, 503, 504.
[0087] The server 506 is used, for example, to send or receive a fractal two-dimensional code or data of a fractal two-dimensional code.
[0088] In this embodiment, the electronic device on which the method is run (e.g., the terminal device 501, 502, 503, or 504 shown in the figure) can transmit various information through the network 505. The network 505 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. It should be noted that the above-mentioned wireless connection methods may 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 (e.g., the Internet) and peer-to-peer networks (e.g., adhoc peer-to-peer networks) and other network connection methods currently known or developed in the future. 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 digital data communications (e.g., communication networks) of any form or medium.
[0089] The 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 broadcast and playback applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0090] Terminal devices 501, 502, 503 or 504 can be various electronic devices with touch screens and / or support for web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Compressed Standard Audio Layer 3) players, MP4 (Moving Picture Experts Compressed Standard Audio Layer 4) players, head-mounted display devices, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as mobile terminals such as digital TVs, desktop computers, etc.
[0091] The server 506 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal device 501 , 502 , 503 or 504 or data transmitted. The server 506 may be a local server or a cloud server, for example.
[0092] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0093] Here, the terminal device can independently or in cooperation with other electronic terminal devices run various operating systems such as applications in the Android system to implement the embodiment method of the present disclosure, and can also run applications in other operating systems to implement the embodiment method of the present disclosure.
[0094] The fifth, sixth and seventh aspects of the present invention are introduced below: computer equipment, computer readable storage medium and computer product.
[0095] The computer device comprises a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above method.
[0096] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0097] The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0098] like Figure 6 As shown, it shows a schematic diagram of a computer device suitable for implementing the embodiment of the present disclosure. The computer device in the embodiment of the present disclosure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present disclosure.
[0099] Continue to refer to Figure 6 The 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 supply device 607, and a communication device 608.
[0100] The processing device 601 (such as a central processing unit, a graphics processing unit, etc.) is used to control the overall operation of the computer device. The processing device 601 may include one or more processors to execute instructions to complete all or part of the steps of the above method. In addition, the processing device 601 may also include one or more modules for processing and interacting with other devices.
[0101] The storage device 602 is used to store various types of data. The storage device 602 may include various types of computer-readable storage media or a combination thereof, such as an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above.
[0102] Among them, more specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0103] The sensor device 603 is used to sense the specified measured information and convert it into a usable output signal according to a certain rule, and may include one or more sensors. For example, it may 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.
[0104] The processing device 601 , the storage device 602 , and the sensor device 603 are connected to each other via a bus 604 . An input / output (I / O) interface 605 is also connected to the bus 604 .
[0105] The multimedia device 606 may include input devices such as a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, etc. for receiving input signals from a user. The various input devices may cooperate with various sensors of the above-mentioned sensor devices to complete, for example, gesture operation input, image recognition input, distance detection input, etc. The multimedia device may also include output devices such as a liquid crystal display (LCD), a speaker, a vibrator, etc.
[0106] The power supply device 607 is used to provide power to various devices in the computer device, and may include a power management system, one or more power supplies, and components for distributing power to other devices.
[0107] The communication device 608 may allow the computer device to communicate with other devices wirelessly or by wire to exchange data.
[0108] The above-mentioned devices can also be connected to the I / O interface 605 to realize the application of computer equipment.
[0109] It should be understood that, although each box in the block diagram of the accompanying drawings may represent a module (device), a part of which contains one or more executable instructions for implementing a specified logical function, these modules are not necessarily executed in sequence. The modules and functional units in the embodiments of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more modules or functional units may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0110] Although the computer device with various devices is shown in the figure, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0111] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, 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 embodiment of the present disclosure are executed.
[0112] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0113] It should be noted that the above-mentioned computer-readable medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. In the present disclosure, the computer-readable signal medium may include a data signal propagated in the baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0114] The computer-readable medium may be included in the computer device, or may exist independently without being incorporated into the computer device.
[0115] Further, computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages such as Java, Python, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer via any type of network, or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0118] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0119] Below, the features of the above-mentioned embodiments according to the present disclosure are briefly summarized and listed.
[0120] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the following technical solution, including: Track lines, which have fractal shapes, are formed by dark modules and light modules arranged according to preset rules; and The coding area is surrounded by the track line, and data modules for expressing data information are arranged in the coding area.
[0121] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical solution described below, wherein the track line is formed by the dark-colored modules and the light-colored modules being arranged alternately.
[0122] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical solution described below, and the dark modules are arranged at the inflection points of the fractal shape of the track line.
[0123] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical solution described below, and format information modules set according to preset positions are also arranged in the coding area.
[0124] According to one or more embodiments of the present disclosure, a fractal two-dimensional code is provided, which adopts the technical solution described below, wherein a header module and a tail module are also arranged in the coding area, the header module is located before the initial position of the data module arrangement, and the tail module is located after the end position of the data module arrangement.
[0125] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which is used to generate the above-mentioned fractal two-dimensional code, and adopts the following technical solution, including: Use fractal algorithms to construct design icons with fractal shapes; Determine the outline of the design icon, and convert the outline into a track line formed by arranging dark modules and light modules according to a preset rule; Gridding the design icon according to the track line to obtain a grid icon; The data module is filled in the grid icon to generate the fractal two-dimensional code.
[0126] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, wherein determining the contour line of the design icon includes: Obtaining data to be stored in the fractal two-dimensional code; Calculate the coding area according to the data to be stored; Determining the area of the design icon according to the coding area; The contour line is determined according to the area of the design icon.
[0127] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, wherein the area of the design icon is determined according to the code arrangement area, including: The design icon is enlarged or reduced according to the coding area so that the area of the design icon is not smaller than the coding area.
[0128] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, wherein the contour line is converted into a track line formed by arranging dark modules and light modules according to a preset rule, comprising: The track line is formed in a form in which the dark-colored modules and the light-colored modules are arranged alternately.
[0129] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, wherein the design icon is gridded according to the track line to obtain the grid icon, including: The center points of the dark-colored modules and the light-colored modules of each track line are used as grid endpoints, and the design icon is divided into grids along the horizontal direction and the vertical direction respectively to obtain the grid icon.
[0130] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, wherein the method of filling a data module in the grid icon to generate a fractal two-dimensional code includes: At each grid intersection of the grid symbol, or inside each grid of the grid symbol, the data modules are filled in sequentially according to a preset rule to generate the fractal two-dimensional code.
[0131] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, and the method for generating a fractal two-dimensional code further includes: Encoding the data to be stored in a single QR code into multiple data module groups; Correspondingly, a plurality of fractal icons having the fractal shape are provided; Fill the plurality of data module groups into the plurality of fractal icons respectively.
[0132] According to one or more embodiments of the present disclosure, a method for generating a fractal two-dimensional code is provided, which adopts the following technical solution, and the method for generating a fractal two-dimensional code further includes: Encoding the data to be stored of the multiple QR codes into multiple data module groups; Correspondingly, a plurality of fractal icons having the fractal shape are provided; Fill the plurality of data module groups into the plurality of fractal icons respectively.
[0133] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition method is provided, which is used to recognize the above-mentioned fractal two-dimensional code, and adopts the following technical solution, including: According to the fractal algorithm used when generating the fractal two-dimensional code, the fractal symbol of the scanned area is identified; Determine whether the boundary line of the fractal symbol is a track line. If so, grid the fractal symbol according to the track line, obtain the grid symbol, identify the data module in the grid symbol, and read the corresponding data information; if not, terminate the identification.
[0134] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition method is provided, which is used to recognize the above-mentioned fractal two-dimensional code, and adopts the following technical solution. The fractal two-dimensional code recognition method also includes: Read the data modules in a plurality of the fractal icons respectively; It is determined whether the multiple fractal icons belong to the same two-dimensional code. If so, the data modules in the multiple fractal icons are combined and expressed. If not, the data modules in each fractal icon are expressed separately.
[0135] According to one or more embodiments of the present disclosure, a fractal two-dimensional code recognition system is provided, which adopts the following technical solution, including: A display device, used to display the above-mentioned fractal two-dimensional code; An identification device, used for scanning and identifying the fractal two-dimensional code displayed on the display device; The server is used to send or receive the fractal two-dimensional code or the data of the fractal two-dimensional code.
[0136] According to one or more embodiments of the present disclosure, a computer device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0137] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0138] According to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0140] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A fractal two-dimensional code, characterized in that: include: Track lines, which have fractal shapes, are formed by dark and light modules arranged according to preset rules; as well as The coding area is surrounded by the track line, and data modules for expressing data information are arranged in the coding area.
2. The fractal two-dimensional code according to claim 1, characterized in that: The track line is formed by the dark-colored modules and the light-colored modules being arranged alternately.
3. The fractal two-dimensional code according to claim 1, characterized in that: The dark modules are arranged at the inflection points of the fractal shape of the track line.
4. The fractal two-dimensional code according to claim 1, characterized in that: The encoding area is also arranged with format information modules set according to preset positions.
5. The fractal two-dimensional code according to claim 1, characterized in that: The encoding region also has a header module and a tail module arranged therein, wherein the header module is located before the initial position of the data module arrangement, and the tail module is located after the end position of the data module arrangement.
6. A method for generating a fractal two-dimensional code, characterized in that: Used to generate a fractal two-dimensional code as claimed in any one of claims 1 to 5, the fractal two-dimensional code generation method comprising: Use fractal algorithms to construct design icons with fractal shapes; Determine the outline of the design icon, and convert the outline into a track line formed by arranging dark modules and light modules according to a preset rule; Gridding the design icon according to the track line to obtain a grid icon; The data module is filled in the grid icon to generate the fractal two-dimensional code.
7. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: Determining the outline of the design icon includes: Obtaining data to be stored in the fractal two-dimensional code; Calculate the coding area according to the data to be stored; Determining the area of the design icon according to the coding area; The contour line is determined according to the area of the design icon.
8. The method for generating a fractal two-dimensional code according to claim 7, characterized in that: The step of determining the area of the design icon according to the coding area includes: The design icon is enlarged or reduced according to the coding area so that the area of the design icon is not smaller than the coding area.
9. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: The step of converting the contour line into a track line formed by arranging dark modules and light modules according to a preset rule comprises: The track line is formed in a form in which the dark-colored modules and the light-colored modules are arranged alternately.
10. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: The step of gridding the design icon according to the track line to obtain a grid icon includes: The center points of the dark-colored modules and the light-colored modules of each track line are used as grid endpoints, and the design icon is divided into grids along the horizontal direction and the vertical direction respectively to obtain the grid icon.
11. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: The step of filling the data module in the grid icon to generate a fractal two-dimensional code comprises: At each grid intersection of the grid symbol, or inside each grid of the grid symbol, the data modules are filled in sequentially according to a preset rule to generate the fractal two-dimensional code.
12. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: The fractal two-dimensional code generation method also includes: Encoding the data to be stored in a single QR code into multiple data module groups; Correspondingly, a plurality of fractal icons having the fractal shape are provided; Fill the plurality of data module groups into the plurality of fractal icons respectively.
13. The method for generating a fractal two-dimensional code according to claim 6, characterized in that: The fractal two-dimensional code generation method also includes: Encoding the data to be stored of the multiple QR codes into multiple data module groups; Correspondingly, a plurality of fractal icons having the fractal shape are provided; Fill the plurality of data module groups into the plurality of fractal icons respectively.
14. A fractal two-dimensional code recognition method, characterized in that: Used to identify a fractal two-dimensional code as claimed in any one of claims 1 to 5, the fractal two-dimensional code recognition method comprises: According to the fractal algorithm used when generating the fractal two-dimensional code, the fractal symbol of the scanned area is identified; Determine whether the boundary line of the fractal symbol is a track line. If so, grid the fractal symbol according to the track line, obtain the grid symbol, identify the data module in the grid symbol, and read the corresponding data information; if not, terminate the identification.
15. The fractal two-dimensional code recognition method according to claim 14, characterized in that: The fractal two-dimensional code recognition method also includes: Read the data modules in a plurality of the fractal icons respectively; It is determined whether the multiple fractal icons belong to the same two-dimensional code. If so, the data modules in the multiple fractal icons are combined and expressed. If not, the data modules in each fractal icon are expressed separately.
16. A fractal two-dimensional code recognition system, characterized in that: include: A display device for displaying a fractal two-dimensional code as claimed in any one of claims 1 to 5; An identification device, used for scanning and identifying the fractal two-dimensional code displayed on the display device; The server is used to send or receive the fractal two-dimensional code or the data of the fractal two-dimensional code.
17. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 6 to 15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 6 to 15 are implemented.
19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 6 to 15 are implemented.
Citation Information
Patent Citations
Anti-counterfeiting label on basis of fractal image and anti-counterfeiting verification method
CN102708391A
Anti-fake tracing system based on database information graphs
CN104809619A
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