CN110802943B - Two-dimensional code printing retreat method and system, server and medium - Google Patents

Two-dimensional code printing retreat method and system, server and medium Download PDF

Info

Publication number
CN110802943B
CN110802943B CN201911296883.4A CN201911296883A CN110802943B CN 110802943 B CN110802943 B CN 110802943B CN 201911296883 A CN201911296883 A CN 201911296883A CN 110802943 B CN110802943 B CN 110802943B
Authority
CN
China
Prior art keywords
unit
adjacent
dimensional code
white
code printing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911296883.4A
Other languages
Chinese (zh)
Other versions
CN110802943A (en
Inventor
张琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fangzheng Zhushi Wuhan Technology Development Co ltd
Original Assignee
Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fangzheng Zhushi Wuhan Technology Development Co ltd filed Critical Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority to CN201911296883.4A priority Critical patent/CN110802943B/en
Publication of CN110802943A publication Critical patent/CN110802943A/en
Application granted granted Critical
Publication of CN110802943B publication Critical patent/CN110802943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41FPRINTING MACHINES OR PRESSES
    • B41F33/00Indicating, counting, warning, control or safety devices
    • B41F33/16Programming systems for automatic control of sequence of operations

Abstract

According to the two-dimensional code printing retreat method and system, the server and the medium, whether the unit adjacent to the same side direction of the diagonal line of the current judging unit is the white unit is taken as the judging basis, the error correction is carried out on the width of one side of the adjacent white unit of the current judging unit, the problem that the numerical value after the two-dimensional code printing is inaccurate due to printing machine errors and ink diffusion is solved, the black unit can avoid the white unit adjacent to the black unit in the printing process, and the printing effect is guaranteed.

Description

Two-dimensional code printing retreat method and system, server and medium
Technical Field
The invention relates to the technical field of two-dimensional code printing, in particular to a two-dimensional code printing backoff method and system, a server and a medium.
Background
The two-dimensional bar code/two-dimensional code (2-dimensional bar code) records data symbol information by using black and white alternate graphs which are distributed on a plane (two-dimensional direction) according to a certain rule by using a certain specific geometric figure; the concept of '0' and '1' bit stream forming the internal logic foundation of the computer is skillfully utilized in code establishment, a plurality of geometric shapes corresponding to binary systems are used for representing character numerical value information, and the information is automatically read through an image input device or an optoelectronic scanning device so as to realize automatic information processing: it has some commonality of barcode technology: each code system has its specific character set; each character occupies a certain width; has certain checking function and the like. Meanwhile, the method also has the function of automatically identifying information of different rows and processing the graph rotation change points. However, in the process of printing the two-dimensional code, due to the machine reason, if the two-dimensional code is printed according to the normal two-dimensional code, ink diffusion can occur to cause the inaccuracy of the unit of the two-dimensional code, so that the problem that the two-dimensional code can not be identified is caused.
Disclosure of Invention
In view of this, embodiments of the present invention provide a two-dimensional code printing backoff method and system, a server, and a medium, so that a black unit can backoff a white unit adjacent to the black unit in a printing process, thereby ensuring a printing effect.
In a first aspect of the embodiments of the present invention, a two-dimensional code printing backoff method is provided, where the two-dimensional code printing backoff method includes the following steps:
setting an error empirical value;
traversing each unit of the two-dimensional code according to rows and columns;
and according to the traversal order, correcting the error of the width of one side of the adjacent white unit of the current judging unit by taking whether the unit adjacent to the current judging unit in the same side direction of the diagonal line is the white unit as a judgment basis.
In a second aspect of the embodiments of the present invention, a two-dimensional code printing backoff system is provided, where the two-dimensional code printing backoff system includes the following functional modules:
an error setting module configured to set an error empirical value;
the unit traversing module is configured to traverse each unit of the two-dimensional code according to rows and columns;
and the error correction module is configured to correct the error of the width of one side of the adjacent white unit of the current judgment unit according to the traversal order by taking whether the unit adjacent to the current judgment unit in the same side direction of the diagonal line is the white unit as a judgment basis.
In a third aspect of the embodiments of the present invention, there is provided a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the two-dimensional code printing backoff method when executing the computer program.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the two-dimensional code printing backoff method described above.
According to the two-dimensional code printing retreat method and system, the server and the medium, whether the unit adjacent to the same side direction of the diagonal line of the current judging unit is the white unit is taken as the judging basis, the error correction is carried out on the width of one side of the adjacent white unit of the current judging unit, the problem that the numerical value after the two-dimensional code printing is inaccurate due to printing machine errors and ink diffusion is solved, the black unit can avoid the white unit adjacent to the black unit in the printing process, and the printing effect is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flow chart of a two-dimensional code printing backoff method according to an embodiment of the present invention;
fig. 2 is a schematic view of two-dimensional code printing provided in an embodiment of the present invention;
fig. 3 is a functional block diagram of a two-dimensional code printing backoff system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a two-dimensional code printing backoff method provided in an embodiment of the present invention includes the following steps:
s1, setting an error empirical value;
s2, traversing each unit of the two-dimensional code according to rows and columns;
and S3, according to the traversal order, based on whether the unit adjacent to the current judgment unit in the same side direction of the diagonal line is a white unit, performing error correction on the width of the current judgment unit on the side adjacent to the white unit.
Specifically, firstly, an error empirical value is set according to experience, then, preferably, each unit in the two-dimensional code matrix is traversed sequentially from left to right and from top to bottom, and whether the unit adjacent to the unit in the same side direction of the diagonal line of the current judging unit is a white unit is judged; the adjacent units in the same side direction of the diagonal line comprise three adjacent units, namely a left adjacent unit, an upper adjacent unit and a left upper adjacent unit of the current judging unit; or three adjacent units of the left side, the lower side and the lower left corner of the current judging unit; or three adjacent units on the right side, the upper side and the upper right corner of the current judging unit; or the right, lower and lower right corner of the current judging unit. According to the conventional sequence from left to right and from top to bottom, the units adjacent to each other in the same side direction of the diagonal line in the embodiment of the present invention preferably include three adjacent units, namely the right side, the lower side and the lower right corner of the current judgment unit.
The two-dimensional code is a matrix composed of 0 and 1 in computer data, wherein 0 represents a white unit, 1 represents a black unit, whether three adjacent units of the right side, the lower side and the lower right corner of the current judging unit are white units or not is sequentially judged according to the above judging basis according to the traversal sequence, namely whether the three adjacent units are 0 or not, if the three adjacent units of the right side, the lower side or the lower right corner of the current judging unit are 0, namely representing the white units, an error empirical value is subtracted by the width of one side of the adjacent white units of the current judging unit.
For example, if the current judgment cell is a cell in i rows and j columns in the matrix array, such as the cell a in fig. 2, it is judged whether the right adjacent cell of the cell a is a white cell, that is, whether matrix [ i ] [ j +1] data is 0, if the right adjacent cell of the cell a is a white cell, the lateral width of the cell a is subtracted by the error empirical value to obtain the accurate printing width of the cell a, and as shown in fig. 2, the width of the error empirical value is cut off on the right of the cell a, that is, the area a.
For example, in the B cell in fig. 2, it is determined whether the lower adjacent cell of the B cell is a white cell, that is, whether matrix [ i +1] [ j ] data is 0, if it is 0, the lower adjacent cell of the B cell represents that the lower adjacent cell of the B cell is a white cell, the error empirical value is subtracted from the longitudinal width of the B cell to obtain the accurate printing width of the B cell, and as shown in fig. 2, the width of the error empirical value, that is, the B-region area, is cut off from the lower edge of the B cell.
There is also a case that, if, in the cells adjacent to the current judgment cell in the same side direction of the diagonal line, the cells adjacent to the current judgment cell in the horizontal and vertical directions are not all white cells, but the cells adjacent to the current judgment cell in the diagonal line are white cells, a square block with an error empirical value in length and width needs to be cut out on the vertex angle of the current judgment cell relative to the cells adjacent to the diagonal line. For example, the C cell in fig. 2 is determined whether matrix [ i +1] [ j +1] data is 0, and if the matrix [ i +1] [ j +1] data is 0, it represents that the diagonally adjacent cell of the C cell is a white cell, then a square block with the length and width both being error empirical values is cut out in the lower right corner of the C cell, i.e., a C-region area.
According to the two-dimensional code printing retreat method, whether the unit adjacent to the white unit in the same side direction of the diagonal line of the current judging unit is the white unit is taken as a judging basis, error correction is carried out on the width of one side of the adjacent white unit of the current judging unit, the problem that the numerical value is inaccurate after the two-dimensional code is printed due to printing machine errors and ink diffusion is solved, the black unit can retreat from the white unit adjacent to the black unit in the printing process, and the printing effect is guaranteed.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The above mainly describes a two-dimensional code printing backoff method, and a two-dimensional code printing backoff system will be described in detail below.
Fig. 4 shows a functional block diagram of a two-dimensional code printing retraction system according to an embodiment of the present invention. As shown in fig. 4, the two-dimensional code printing retraction system includes the following functional modules:
an error setting module 10 configured to set an error empirical value;
the unit traversing module 20 is configured to traverse each unit of the two-dimensional code according to rows and columns;
and the error correction module 30 is configured to correct the error of the width of the adjacent white unit side of the current judgment unit according to the traversal order by taking whether the unit adjacent to the current judgment unit in the same side direction of the diagonal line is the white unit as a judgment basis.
Fig. 4 is a schematic diagram of a server structure for two-dimensional code printing backoff according to an embodiment of the present invention. The server is a device for providing computing services, and generally refers to a computer with high computing power, which is provided to a plurality of users through a network. As shown in fig. 4, the server 4 of this embodiment includes: a memory 41, a processor 42 and a system bus 43, said memory 41 comprising an executable computer program 411 stored thereon, it being understood by a person skilled in the art that the terminal device structure shown in fig. 4 does not constitute a limitation of the terminal device, and may comprise more or less components than those shown, or may combine certain components, or a different arrangement of components.
The following specifically describes each constituent component of the terminal device with reference to fig. 4:
the memory 41 may be used to store software programs and modules, and the processor 42 executes various functional applications and data processing of the terminal by operating the software programs and modules stored in the memory 41. The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
An executable computer program 411 including a two-dimensional code printing backoff method on the memory 41, wherein the executable computer program 411 may be divided into one or more modules/units, which are stored in the memory 41 and executed by the processor 42 to complete the transmission of the notification and obtain the notification implementation process, and the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used for describing the execution process of the computer program 411 in the server 4. For example, the computer program 411 may be divided into an acquisition module, a comparison module, a concatenation module and a sending module.
The processor 42 is a control center of the server, connects various parts of the entire terminal device with various interfaces and lines, performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 41 and calling data stored in the memory 41, thereby monitoring the terminal as a whole. Alternatively, processor 42 may include one or more processing units; preferably, the processor 42 may integrate an application processor, which primarily handles operating systems, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 42.
The system bus 43 is used to connect functional units inside the computer, and can transmit data information, address information, and control information, and may be, for example, a PCI bus, an ISA bus, a VESA bus, or the like. The instructions of the processor 42 are transmitted to the memory 41 through the bus, the memory 41 feeds back data to the processor 42, and the system bus 43 is responsible for data and instruction interaction between the processor 42 and the memory 41. Of course, the system bus 43 may also access other devices such as network interfaces, display devices, etc.
The server at least includes a CPU, a chipset, a memory, a disk system, and the like, and other components are not described herein again.
In the embodiment of the present invention, the executable computer program executed by the processor 42 included in the terminal is specifically: a two-dimensional code printing backoff method comprises the following steps:
setting an error empirical value;
traversing each unit of the two-dimensional code according to rows and columns;
and according to the traversal order, correcting the error of the width of one side of the adjacent white unit of the current judging unit by taking whether the unit adjacent to the current judging unit in the same side direction of the diagonal line is the white unit as a judgment basis.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A two-dimensional code printing backoff method is characterized by comprising the following steps:
setting an error empirical value;
traversing each unit of the two-dimensional code according to rows and columns;
and according to the traversal order, correcting the error of the width of one side of the adjacent white unit of the current judging unit by taking whether the unit adjacent to the current judging unit in the same side direction of the diagonal line is the white unit as a judgment basis.
2. The two-dimensional code printing backoff method according to claim 1, wherein the cells adjacent to each other in the same side direction of the diagonal line comprise three adjacent cells on the left side, the upper side and the upper left corner of the current judgment cell; or three adjacent units of the left side, the lower side and the lower left corner of the current judging unit; or three adjacent units on the right side, the upper side and the upper right corner of the current judging unit; or the right, lower and lower right corner of the current judging unit.
3. The two-dimensional code printing backoff method according to claim 1, wherein if the cell adjacent to the current determination cell in the same side direction of the diagonal is a white cell, the error correction is performed on the width of the current determination cell on the side adjacent to the white cell.
4. The two-dimensional code printing backoff method according to claim 1, wherein the error correction is performed by subtracting an error empirical value from a width of a side of the current determination unit adjacent to the white unit.
5. The two-dimensional code printing backoff method of claim 1,
if the adjacent units in the same side direction of the diagonal of the current judging unit are not white units, but the adjacent units in the diagonal are white units, square squares with the length and the width being error empirical values need to be cut off on the opposite vertex angles of the current judging unit and the adjacent units in the diagonal.
6. The two-dimensional code printing retreat system is characterized by comprising the following functional modules:
an error setting module configured to set an error empirical value;
the unit traversing module is configured to traverse each unit of the two-dimensional code according to rows and columns;
and the error correction module is configured to correct the error of the width of one side of the adjacent white unit of the current judgment unit according to the traversal order by taking whether the unit adjacent to the current judgment unit in the same side direction of the diagonal line is the white unit as a judgment basis.
7. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the two-dimensional code printing backoff method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the steps of the two-dimensional code printing backoff method according to any one of claims 1 to 5.
CN201911296883.4A 2019-12-16 2019-12-16 Two-dimensional code printing retreat method and system, server and medium Active CN110802943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911296883.4A CN110802943B (en) 2019-12-16 2019-12-16 Two-dimensional code printing retreat method and system, server and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911296883.4A CN110802943B (en) 2019-12-16 2019-12-16 Two-dimensional code printing retreat method and system, server and medium

Publications (2)

Publication Number Publication Date
CN110802943A CN110802943A (en) 2020-02-18
CN110802943B true CN110802943B (en) 2021-01-29

Family

ID=69493263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911296883.4A Active CN110802943B (en) 2019-12-16 2019-12-16 Two-dimensional code printing retreat method and system, server and medium

Country Status (1)

Country Link
CN (1) CN110802943B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305895A (en) * 1999-12-03 2001-08-01 伊马治公司 Easy-to-make printer and its application method
CN1329328A (en) * 2000-04-14 2002-01-02 精工爱普生株式会社 Printing method for two-dimensional code symbol, printer, drive and memory medium
DE202005000255U1 (en) * 2005-01-08 2005-03-17 Francotyp Postalia Ag print Setup
CN1919604A (en) * 2005-08-25 2007-02-28 精工爱普生株式会社 Printing device, printing method and image processing device, image processing method
CN101197909A (en) * 2006-12-07 2008-06-11 佳能株式会社 Image processing apparatus, printing apparatus and image processing method
CN101234563A (en) * 2007-01-29 2008-08-06 精工爱普生株式会社 Method of printing two-dimensional code and ink jet printer
US20090072035A1 (en) * 2007-09-19 2009-03-19 Canon Finetech Inc. Barcode generation system, barcode generation program, printing device, and test chart
EP2381426A1 (en) * 2010-04-23 2011-10-26 Neopost Technologies Method for high-resolution printing of a post mark
CN106056188A (en) * 2016-07-20 2016-10-26 无锡新光印标识科技有限公司 Micro-texture anti-counterfeit identification method
CN106891619A (en) * 2017-03-18 2017-06-27 宁波亿诺维信息技术有限公司 A kind of Quick Response Code print system and two-dimensional code generation method
CN107403218A (en) * 2017-07-04 2017-11-28 福建新大陆电脑股份有限公司 The method of bar code ink conversion

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017097586A (en) * 2015-11-24 2017-06-01 セイコーエプソン株式会社 Printing image generation method and printing image generator

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305895A (en) * 1999-12-03 2001-08-01 伊马治公司 Easy-to-make printer and its application method
CN1329328A (en) * 2000-04-14 2002-01-02 精工爱普生株式会社 Printing method for two-dimensional code symbol, printer, drive and memory medium
DE202005000255U1 (en) * 2005-01-08 2005-03-17 Francotyp Postalia Ag print Setup
CN1919604A (en) * 2005-08-25 2007-02-28 精工爱普生株式会社 Printing device, printing method and image processing device, image processing method
CN101197909A (en) * 2006-12-07 2008-06-11 佳能株式会社 Image processing apparatus, printing apparatus and image processing method
CN101234563A (en) * 2007-01-29 2008-08-06 精工爱普生株式会社 Method of printing two-dimensional code and ink jet printer
US20090072035A1 (en) * 2007-09-19 2009-03-19 Canon Finetech Inc. Barcode generation system, barcode generation program, printing device, and test chart
EP2381426A1 (en) * 2010-04-23 2011-10-26 Neopost Technologies Method for high-resolution printing of a post mark
CN106056188A (en) * 2016-07-20 2016-10-26 无锡新光印标识科技有限公司 Micro-texture anti-counterfeit identification method
CN106891619A (en) * 2017-03-18 2017-06-27 宁波亿诺维信息技术有限公司 A kind of Quick Response Code print system and two-dimensional code generation method
CN107403218A (en) * 2017-07-04 2017-11-28 福建新大陆电脑股份有限公司 The method of bar code ink conversion

Also Published As

Publication number Publication date
CN110802943A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
US9070034B2 (en) Method and system for correcting QR code image
CN111985459B (en) Table image correction method, apparatus, electronic device and storage medium
US11645357B2 (en) Convolution operation method and apparatus, computer device, and computer-readable storage medium
CN103530431A (en) Data processing method and device for webpage clicking amount statistics
CN102023843A (en) Function calling method and device as well as smart card
CN112085056A (en) Target detection model generation method, device, equipment and storage medium
CN110802943B (en) Two-dimensional code printing retreat method and system, server and medium
CN101464916B (en) Device attribute computing method for integrated circuit layout
CN111862343A (en) Three-dimensional reconstruction method, device and equipment and computer readable storage medium
CN112766256B (en) Grating phase diagram processing method and device, electronic equipment and storage medium
CN111026682B (en) Data access method and device of board card chip and computer readable storage medium
CN113343797A (en) Information extraction method and device, terminal equipment and computer readable storage medium
CN110569005B (en) Multi-row and multi-column laser printing method and device, storage medium and terminal equipment
CN111080148A (en) Net value calculation method and device of ERP system, electronic equipment and storage medium
CN110096555B (en) Table matching processing method and device for distributed system
CN113867862B (en) List page layout method and computing device
CN117115380B (en) Multi-source spatial data processing method and system
CN117195846B (en) Expert table management method, system, storage medium and equipment
CN113627351B (en) Matching method, device, computer equipment and storage medium for financial accounting subjects
CN112580638B (en) Text detection method and device, storage medium and electronic equipment
CN112306922B (en) Multi-data-to-multi-port arbitration method and related device
US20210287582A1 (en) Graphical indicator
CN111388994B (en) Method, device, equipment and storage medium for processing virtual props in game
CN110956697B (en) Memory optimization method, medium, terminal and device based on laser slam
CN117787187A (en) Template extraction method, template extraction device, computer device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant