CN117195853A - Corona printing typesetting method and device, storage medium and electronic equipment - Google Patents

Corona printing typesetting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117195853A
CN117195853A CN202310945950.0A CN202310945950A CN117195853A CN 117195853 A CN117195853 A CN 117195853A CN 202310945950 A CN202310945950 A CN 202310945950A CN 117195853 A CN117195853 A CN 117195853A
Authority
CN
China
Prior art keywords
variable information
filled
template
printing
typesetting
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.)
Pending
Application number
CN202310945950.0A
Other languages
Chinese (zh)
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.)
Taizhou Hongye Certificate Manufacturing Co ltd
Original Assignee
Taizhou Hongye Certificate Manufacturing 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 Taizhou Hongye Certificate Manufacturing Co ltd filed Critical Taizhou Hongye Certificate Manufacturing Co ltd
Priority to CN202310945950.0A priority Critical patent/CN117195853A/en
Publication of CN117195853A publication Critical patent/CN117195853A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Record Information Processing For Printing (AREA)

Abstract

The application relates to a corona printing typesetting method, a device, a storage medium and electronic equipment, wherein the method comprises the following steps: obtaining a variable information set of a certificate to be corona-printed, wherein the variable information set is information of an object to be corona-printed, and comprises at least one variable information; determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled; and matching the fields to be filled corresponding to the variable information in the variable information set according to a preset rule, and adding the variable information to the corresponding fields to be filled in the printing typesetting template to obtain typesetting information of the printing certificate to be corona. The application has the effect of improving the printing and typesetting efficiency of the certificates.

Description

Corona printing typesetting method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of printing typesetting, in particular to a corona printing typesetting method, a corona printing typesetting device, a storage medium and electronic equipment.
Background
Corona printing technology is a printing method that uses electrostatic corona phenomenon to adsorb ink on the surface of paper. The printing process comprises the following steps: paper output, paper loading, paper feeding, ink feeding, printing and paper collection. The printing part forms an ink absorbing layer on the surface of a printing stock by utilizing an electrostatic field, the ink with charges moves to the position of the ink absorbing layer under the action of the electrostatic field, the ink is transferred to the surface of paper by utilizing pressure, and finally the paper is dried. The corona printing technology is applied to a plurality of fields, and most commonly is applied to various scenes of certificate printing, typesetting is needed before various certificates are printed, namely, visual information elements such as characters, pictures and graphics in the certificates are arranged and laid out on a certain layout, so that the finally printed certificates are attractive and elegant.
The existing printing typesetting mode of the certificate is as follows: firstly, determining typesetting layout of certificate contents, then designing layout and unified style according to the certificate contents, finally respectively manufacturing a plurality of certificates according to different issued objects of the certificates and uniformly printing, aiming at different certificate contents, different certificate issued objects, printing and typesetting are required to be performed in a targeted manner, and finally, the printing and typesetting efficiency of the certificates is lower.
Disclosure of Invention
In order to improve the printing and typesetting efficiency of certificates, the application provides a corona printing and typesetting method, a corona printing and typesetting device, a storage medium and electronic equipment.
In a first aspect of the present application, there is provided a corona printing typesetting method, comprising:
obtaining a variable information set of a certificate to be corona-printed, wherein the variable information set is information of an object to be corona-printed, and comprises at least one variable information;
determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled;
and matching the fields to be filled corresponding to the variable information in the variable information set according to a preset rule, and adding the variable information to the corresponding fields to be filled in the printing typesetting template to obtain typesetting information of the printing certificate to be corona.
By adopting the technical scheme, the variable information sets, namely, the information of the object to be issued by the corona printing certificate, are obtained, and then the matched printing typesetting templates are matched according to the variable information sets, and the printing typesetting templates corresponding to different variable information sets are different. Because the determined printing and typesetting template comprises the field to be filled, finally, matching the corresponding field to be filled in the printing and typesetting template for each piece of variable information in the variable information set, namely each piece of information of the issuing object, filling the variable information into the corresponding field to be filled, and finally obtaining typesetting information corresponding to the printing certificate to be corona-printed, thereby realizing quick typesetting of the certificate and improving the printing and typesetting efficiency of the certificate.
Optionally, the determining a corresponding printing typesetting template according to the variable information set specifically includes:
counting the first quantity of the variable information in the variable information set, and counting the second quantity of fields to be filled in each printing typesetting template in a preset template library;
screening target printing typesetting templates with the second number being consistent with the first number, and counting the total number of first characters which can be accommodated by the field to be filled in the target printing typesetting templates;
If the ratio of the total number of the second characters of the variable information set to the total number of the first characters is larger than a preset ratio, a printed template consistent with the target printing typesetting template is called, the printed variable information set corresponding to the printed template is compared with the variable information set, and the printed variable information set comprises at least one printed variable information; and if the information category corresponding to each printed variable information is consistent with the information category corresponding to each variable information, determining the target printing typesetting template as the variable information set to determine the corresponding printing typesetting template.
By adopting the technical scheme, the first quantity is consistent with the second quantity, the quantity of the reserved blank positions of the target printing typesetting template is identical with the quantity of the filled variable information, and the target printing typesetting template is high in possibility of the printing typesetting template corresponding to the variable information set. And then if the information category of each printed variable information of the printed template is consistent with the information category of each variable information, describing that the variable information set is the same as the template of the printed variable information set, and finally determining the target printing typesetting template more accurately to determine the corresponding printing typesetting template for the variable information set.
Optionally, the matching, according to a preset rule, the field to be filled corresponding to each piece of variable information in the variable information set specifically includes:
determining a corresponding variable information arrangement sequence according to the printing typesetting template corresponding to the variable information set;
sorting all the variable information in the variable information set according to the variable information arrangement sequence to obtain a sorted set;
and sequentially matching the fields to be filled corresponding to the variable information in the ordered set according to the front-back sequence of the fields to be filled in the printing typesetting template, wherein the sequence of the variable information in the ordered set is the forefront, and the sequence of the corresponding fields to be filled is the forefront.
By adopting the technical scheme, after the printing typesetting template is determined, the variable information arrangement sequence corresponding to the printing typesetting template is matched, the variable information arrangement sequence corresponds to the front-to-back sequence of the field to be filled in the printing typesetting template, and all the variable information in the variable information set is ordered according to the variable information arrangement sequence, so that all the variable information can be accurately matched with the correct field to be filled.
Optionally, the printing typesetting template further includes fixed template information, and the matching, according to a preset rule, the to-be-filled field corresponding to each piece of variable information in the variable information set specifically includes:
Counting the first character number of each variable information and the second character number which can be accommodated by each field to be filled;
if the number difference between the second character number and the first character number is smaller than a first difference threshold value, determining a field to be filled corresponding to the second character number as a field to be filled of variable information corresponding to the first character number;
and if the difference value between the second character number and the first character number is not smaller than a first difference threshold, acquiring a first word spacing of variable information corresponding to the first character number and a second word spacing of fixed template information, and determining whether a field to be filled corresponding to the second character number is the field to be filled of the variable information corresponding to the first character number according to the first word spacing and the second word spacing.
By adopting the technical scheme, the quantity difference value is smaller than the first difference value threshold value, so that the number of blank positions remained after the variable information is filled into the field to be filled is smaller, the filling effect is proper, and the field to be filled is the field to be filled corresponding to the variable information; if the number difference is not smaller than the first difference threshold, it is indicated that the number of blank positions remained after the variable information is filled into the field to be filled is more, and the number of blank positions are possibly not matched, then the word spacing of the variable information and the word spacing of the fixed template information are compared, and finally whether the variable information and the fixed template information are matched is judged, so that each variable information is accurately matched with the corresponding field to be filled.
Optionally, the determining, according to the first word spacing and the second word spacing, whether the field to be filled corresponding to the second number of characters is a field to be filled of variable information corresponding to the first number of characters specifically includes:
if the first word spacing is smaller than the second word spacing, the first difference threshold is increased to a second difference threshold;
if the number difference is smaller than the second difference threshold, determining that the field to be filled corresponding to the second character number is a field to be filled of variable information corresponding to the first character number;
and if the first word spacing is greater than or equal to the second word spacing, determining that the field to be filled corresponding to the second character number is not the field to be filled of the variable information corresponding to the first character number.
By adopting the technical scheme, if the first word spacing is smaller than the second word spacing, the fact that the blank positions remained after the variable information is filled into the field to be filled are more is indicated, and possibly because the word spacing of the variable information is too small, the first difference value threshold is increased to be a second difference value threshold, and then if the number ratio is smaller than the second difference value threshold, the field to be filled is finally determined to be the field to be filled corresponding to the variable information; otherwise, if the first word spacing is not smaller than the second word spacing, the variable information is more in blank positions left after filling the field to be filled when the word spacing is larger, and the variable information is directly determined that the variable information and the blank positions are not matched. Thereby realizing accurate matching of the fields to be filled.
Optionally, after the variable information is added to the corresponding field to be filled in the printing typesetting template to obtain the typeset information of the certificate to be corona-printed, the method further includes:
judging whether each piece of variable information is positioned at the middle position of the corresponding field to be filled;
and if the printing typesetting template is not positioned at the center position of the corresponding field to be filled, selecting a target center position point of any one piece of variable information, and horizontally moving the printing typesetting template so as to enable the center position point of the corresponding field to be filled to coincide with the target center position point.
By adopting the technical scheme, after the variable information is filled into the corresponding field to be filled, if the variable information is not in the central position of the field to be filled, and the printing effect of the certificate is possibly poor, a target central position point of the variable information is selected, the printing typesetting template is horizontally moved, and the central position point of the corresponding field to be filled is known to coincide with the target central position point, so that the typesetting effect is improved.
Optionally, the determining a corresponding printing typesetting template according to the variable information set specifically includes:
determining a first certificate class of the variable information set;
Matching the printing typesetting template corresponding to the first certificate type from a preset template matching table;
if a template adjustment instruction is received, adjusting the printing typesetting template corresponding to the variable information set to be a target typesetting template; counting the number of variable information sets of the same first certificate category in the target variable information sets corresponding to the target typesetting templates;
if the number is larger than the number threshold, establishing a corresponding relation between the first certificate category in the template matching table and the target typesetting template;
and if the number is not greater than the number threshold, adjusting the first certificate category of the variable information set in each target variable information set to be a second certificate category corresponding to the target typesetting template.
By adopting the technical scheme, the number is larger than the number threshold, and the fact that the printing typesetting templates matched by the variable information sets with more first certificate categories have errors is indicated, so that the first certificate categories and the target typesetting templates are in corresponding relation, and the follow-up identical certificate categories can be subjected to accurate template matching. If the number is not greater than the number threshold, the first certificate category of the variable information set is determined wrongly, and then the certificate category of the variable information set is adjusted to be a second certificate category corresponding to the target typesetting template, so that the variable information set matching template is more accurate.
In a second aspect of the present application, there is provided a corona printing typesetting apparatus, comprising:
the information acquisition module is used for acquiring a variable information set of the certificate to be corona-printed, wherein the variable information set is information of an object to be corona-printed certificate issuing and comprises at least one variable information;
the template determining module is used for determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled;
and the filling typesetting module is used for matching the field to be filled corresponding to each piece of variable information in the variable information set according to a preset rule, and adding each piece of variable information to the corresponding field to be filled in the printing typesetting template to obtain typesetting information of the printing certificate to be corona.
By adopting the technical scheme, after the information acquisition module acquires the variable information set of the certificate to be subjected to corona printing, the template determination module is used for matching the corresponding printing typesetting template according to the variable information set, and finally, each variable information is accurately matched with the corresponding field to be filled and filled into the corresponding field to be filled, so that typesetting information of the certificate to be subjected to corona printing is finally and rapidly obtained, and the printing typesetting efficiency of the certificate is improved.
In summary, the present application includes at least one of the following beneficial technical effects:
and obtaining a variable information set, namely, information of an object to be issued by the corona printing certificate, and then matching the matched printing typesetting templates according to the variable information set, wherein the printing typesetting templates corresponding to different variable information sets are different. Because the determined printing and typesetting template comprises the field to be filled, finally, matching the corresponding field to be filled in the printing and typesetting template for each piece of variable information in the variable information set, namely each piece of information of the issuing object, filling the variable information into the corresponding field to be filled, and finally obtaining typesetting information corresponding to the printing certificate to be corona-printed, thereby realizing quick typesetting of the certificate and improving the printing and typesetting efficiency of the certificate.
Drawings
Fig. 1 is a schematic flow chart of a corona printing typesetting method provided by an embodiment of the application;
FIG. 2 is a schematic diagram of a printing composition template according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of another corona printing typesetting method provided by an embodiment of the application;
fig. 4 is a schematic structural diagram of a corona printing typesetting device provided by an embodiment of the application;
Fig. 5 is a schematic structural diagram of another corona printing typesetting device according to an embodiment of the present application.
Reference numerals illustrate: 11. an information acquisition module; 12. a template determination module; 13. filling the typesetting module.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments.
In describing embodiments of the present application, words such as "exemplary," "such as" or "for example" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "illustrative," "such as" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "illustratively," "such as" or "for example," etc., is intended to present related concepts in a concrete fashion.
The application scene of the application is as follows: when printing certificates in batches, specific typesetting is required for different certificate contents, and because the issuing objects of the certificates are different, personal information of the issuing objects is also required to be respectively imported into the certificates, and then printing is performed one by one, so that the corona printing typesetting efficiency of the certificates is lower. The corona printing typesetting method provided by the application directly acquires the personal information of the certificate issuing object in batches, and rapidly matches the corresponding printing typesetting template, and matches the personal information of the certificate issuing object into the corresponding position in the printing typesetting template, so that the printing typesetting is rapidly completed, and finally batch rapid printing is performed.
Referring to fig. 1, an embodiment of the application discloses a flow diagram of a corona printing typesetting method, which can be realized by a computer program and can also be operated on a corona printing typesetting device based on von neumann system. The computer program can be integrated in an application or can be run as a stand-alone tool class application, and specifically comprises:
s101: a variable information set of the certificate to be corona printed is obtained.
Specifically, the certificate to be corona printed is a certificate which needs to be typeset, corona printed and issued. In the embodiment of the application, the certificate to be corona-printed is a scholarly certificate, and in other embodiments, the certificate to be corona-printed can also be a honor certificate or a graduation certificate. The variable information set corresponds to the object to be subjected to corona printing certificate issuing, is information of the object to be subjected to corona printing certificate issuing, and comprises at least one piece of variable information, and each piece of variable information corresponds to information of a single dimension of the object to be subjected to corona printing certificate issuing. For example, if the certificate to be corona printed is a baccarat certificate, the issuing object corresponding to the variable information set is a sheet xx, and the variable information set includes a plurality of personal information of the sheet xx, and is: { electronic information engineering (professional) 11/2001/4/birthday }, wherein xx and electronic information engineering are variable information. In other embodiments, the variable information set further includes an electronic photograph of the object to be corona printed with the certificate issue. It should be noted that, in the embodiment of the present application, one variable information set, that is, one individual information of the issuing object may be acquired at a time. In other embodiments, multiple sets of variable information may be acquired at once.
One possible way to obtain a set of variable information is: the variable information set imported by the terminal is received, and the terminal can be an electronic device such as a mobile phone, a tablet computer, an electronic book reader, a multimedia playing device, a wearable device, a Personal Computer (PC) and the like.
S102: and determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled.
In one implementation, counting a first number of variable information in a variable information set and counting a second number of fields to be filled in each printing typesetting template in a preset template library;
screening target printing typesetting templates with the second number being consistent with the first number, and counting the total number of first characters which can be accommodated in fields to be filled in the target printing typesetting templates;
if the ratio of the total number of the second characters to the total number of the first characters of the variable information set is larger than the preset ratio, a printed template consistent with the target printing typesetting template is called, the printed variable information set corresponding to the printed template is compared with the variable information set, and the printed variable information set comprises at least one printed variable information;
And if the information category corresponding to the printed variable information is consistent with the information category corresponding to the variable information, determining the target printing typesetting template as a variable information set to determine the corresponding printing typesetting template.
Specifically, as shown in fig. 2, the fixed typesetting template is used when the printing typesetting template is a printing certificate, and the printing typesetting template includes fields to be filled and also includes fixed template information, where the fields to be filled can be understood as a plurality of blank positions reserved in the printing typesetting template, namely, positions of contents to be filled. In addition, the field to be filled is removed from each printing typesetting template, and the rest is fixed template information. After the variable information set is determined, counting the first quantity of the variable information contained in the variable information set, and counting the second quantity of fields to be filled in each printing typesetting template in a preset template library, namely the quantity of reserved blank positions. If the first quantity is consistent with the second quantity, the quantity of the variable information to be filled into the printing typesetting templates is equal to the quantity of the reserved blank positions in the printing typesetting templates, the printing typesetting templates are screened out to serve as target printing typesetting templates, the preliminary screening is carried out on the printing typesetting templates matched with the variable information sets, the possibility that the target printing typesetting templates obtained through preliminary screening are the printing typesetting templates corresponding to the variable information sets is high, and further confirmation is needed.
Then, counting the total number of first characters which can be contained in all the fields to be filled in the target printing typesetting template, namely, the sum of the number of characters which can be contained in each field to be filled in, wherein one feasible way is to acquire the number of characters which can be contained in each field to be filled in: the source code of the target printing typesetting template is obtained through calling or can be obtained through MSSQL, which is the prior art and is not described herein. It should be noted that, the number of characters that each field to be filled can accommodate, i.e. the length of the field to be filled, the first total number of characters may also be understood as the total length of all the fields to be filled.
If the ratio of the total number of the second characters to the total number of the first characters of all the variable information in the variable information set is larger than a preset ratio, and the ratio and the preset ratio are smaller than 1, filling each variable information into the field to be filled, wherein the filling ratio in the reserved blank position is reasonable. And further confirming that the target printing typesetting template and the variable information set are in a corresponding relation. In other embodiments, a ratio of the second total number of words of all the variable information in the variable information set to the first total number of words of all the fields to be filled in the target printing typesetting template may be calculated, where the ratio is greater than a preset ratio, and the ratio and the preset ratio are both less than 1, so as to further confirm that the target printing typesetting template and the variable information set are in a corresponding relationship.
Finally, if the information category of each printed variable information in the printed variable information set corresponding to the printed template (the printing typesetting template of which the history has been printed) is consistent with the information category of each variable information, the target printing typesetting template can be finally determined to determine the corresponding printing typesetting template for the variable information set. For example, the information categories of each printed variable information are name, specialty and birthday, and the information categories of each variable information are name, specialty and birthday, and the information categories are consistent.
It should be noted that if the ratio is greater than 1, it is determined that the target printing typesetting template does not correspond to the variable information set if the blank positions reserved in the target printing typesetting template cannot be fully filled with all the variable information. And when the ratio is equal to 1, determining that the target printing typesetting template and the variable information set are in a corresponding relation.
S103: and matching the fields to be filled corresponding to each variable information in the variable information set according to a preset rule, and adding each variable information to the corresponding fields to be filled in the printing typesetting template to obtain typeset information of the certificate to be corona-printed.
In one implementation, determining a corresponding variable information arrangement sequence according to a printing typesetting template corresponding to the variable information set;
According to the variable information arrangement sequence, ordering all the variable information in the variable information set to obtain an ordered set;
according to the front-back sequence of each field to be filled in the printing typesetting template, sequentially matching the fields to be filled corresponding to each variable information in the ordered set, wherein the sequence of the variable information in the ordered set is the forefront, and the sequence of the corresponding fields to be filled is the forefront.
Specifically, after the printing typesetting template corresponding to the variable information set is determined, the variable information arrangement sequence corresponding to the variable information set is matched according to the printing typesetting template. One possible way of matching is: matching the corresponding variable information arrangement sequence from a preset arrangement sequence matching table, wherein the arrangement sequence matching table comprises different printing typesetting templates and the corresponding variable information arrangement sequence.
And then sequencing each piece of variable information in the variable information set according to the variable information sequence, and finally obtaining a sequenced set. Based on the front-to-back sequence of each field to be filled in the corresponding printing typesetting template, matching the fields to be filled corresponding to each variable information according to the sequence from front to back of the sequenced set, wherein the sequence of the variable information in the sequenced set is the forefront, and the sequence of the corresponding fields to be filled is the forefront. And finally, adding each variable information in the variable information set to the corresponding field to be filled in the printing typesetting template respectively, and forming typesetting information of the certificate to be corona-printed with the fixed template information in the printing typesetting template after filling all the fields to be filled. Thereby facilitating the subsequent direct corona printing according to the typeset information.
Referring to fig. 2, an embodiment of the present application discloses a schematic flow chart of another corona printing typesetting method, which can be implemented by a computer program or can be run on a corona printing typesetting device based on von neumann system. The computer program can be integrated in an application or can be run as a stand-alone tool class application, and specifically comprises:
s201: a variable information set of the certificate to be corona printed is obtained.
Specifically, reference may be made to step S101, which is not described herein.
S202: a first certificate class of the variable information set is determined.
S203: and matching the printing typesetting template corresponding to the first certificate type from a preset template matching table, wherein the printing typesetting template comprises fields to be filled.
Specifically, one feasible way to determine the certificate class is: inputting each variable information in the variable information set into a trained certificate type discrimination model, and outputting the certificate type discrimination model to obtain the certificate type corresponding to the variable information set, wherein the trained certificate type discrimination model can adopt a convolutional neural network model or a BP neural network model, further, training the convolutional neural network model through training samples, continuously adjusting model parameters, continuously converging the model, and finally obtaining the trained certificate type discrimination model. The training samples include different sets of variable information and corresponding certificate categories. In other embodiments, the certificate type corresponding to the variable information set may be input by the terminal. It should be noted that, the printing typesetting template includes fixed template information in addition to the fields to be filled.
After the certificate type is determined, the printing typesetting template corresponding to the certificate type is matched from a template matching table, wherein the template matching table comprises different certificate types and the corresponding printing typesetting templates.
S204: and if the template adjustment instruction is received, adjusting the printing typesetting template corresponding to the variable information set to be a target typesetting template.
S205: and counting the number of variable information sets of the same first certificate category in the target variable information sets corresponding to the target typesetting templates.
Specifically, if a template adjustment instruction is received, which indicates that the printing and typesetting template matched according to the first certificate category does not correspond to the variable information set, the printing and typesetting template corresponding to the variable information set is adjusted to be a target typesetting template. The template adjustment instruction is sent by a terminal, and the terminal can be an electronic device such as a smart phone or a Personal Computer (PC). The template adjustment instruction represents an instruction to adjust the current printing composition template to a target composition template.
And then, the history template matching record is called, and the quantity of variable information sets of the first certificate category in each target variable information set finally determined as the target typesetting template is counted, so that the condition of the quantity of variable information sets with template adjustment is determined.
S206: if the number is greater than the number threshold, establishing a corresponding relation between the first certificate category in the template matching table and the target typesetting template.
S207: and if the number is not greater than the number threshold, adjusting the first certificate type of the variable information set in each target variable information set to be a second certificate type corresponding to the target typesetting template.
Specifically, if the number is greater than the number threshold, the number threshold is a critical value for determining how many variable information sets are. The method includes that the number of variable information sets of the same first certificate type is large, namely, a template corresponding error exists in more variable information sets of the first certificate type, and further, the fact that the matching relation between the first certificate type and a currently corresponding printing typesetting template in a template matching table is deviated is explained, so that the corresponding relation between the first certificate type and a target typesetting template is established, and the printing typesetting template matched for the variable information sets is more accurate.
If the number is not greater than the number threshold, the number of sets of variable information that account for the same first certificate class is less, i.e., fewer sets of variable information for this first certificate class have template correspondence errors. And further, the situation that the determination error may exist for the first certificate category of a few variable information sets, and the matching relationship between the first certificate category and the currently corresponding printing typesetting template in the template matching table is not deviated, so that the first certificate category of the variable information sets in each target variable information set is uniformly adjusted to be the second certificate category corresponding to the target typesetting template. Thereby avoiding the situation that the certificate category matching error occurs again in the follow-up variable information set. Further, other variable information sets are acquired next time, and similarity comparison is carried out between the other variable information sets and the variable information sets, wherein one feasible mode is as follows: if the information category corresponding to the other variable information set is the same as the information category corresponding to the variable information set, the other variable information set is directly determined to be the second certificate category.
S208: and matching the fields to be filled corresponding to each variable information in the variable information set according to a preset rule, and adding each variable information to the corresponding fields to be filled in the printing typesetting template to obtain typeset information of the certificate to be corona-printed.
In an implementation manner, the matching the to-be-filled field corresponding to each variable information in the variable information set according to a preset rule specifically includes:
counting the first character number of each variable information and the second character number which can be accommodated by each field to be filled;
if the number difference between the second character number and the first character number is smaller than a first difference threshold value, determining a field to be filled corresponding to the second character number as a field to be filled of variable information corresponding to the first character number;
and under the condition that the second character number is not smaller than the first character number, if the difference value between the second character number and the first character number is not smaller than a first difference value threshold value, acquiring a first word interval of variable information corresponding to the first character number and a second word interval of fixed template information, and determining whether a field to be filled corresponding to the second character number is the field to be filled of the variable information corresponding to the first character number according to the first word interval and the second word interval.
Specifically, when the second character number is smaller than the first character number, the to-be-filled field is not filled with the variable information, and it is determined that the to-be-filled field does not correspond to the variable information, then the next to-be-filled field is selected to compare the character number with the variable information.
And under the condition that the second character number is not less than the first character number, the variable information can be filled in the field to be filled, then the quantity difference value between the second character number and the first character number is calculated, if the quantity difference value is less than a first difference threshold value, the filling proportion of the variable information after being filled in the field to be filled is reasonable, and a larger blank position does not appear, then the field to be filled corresponding to the second character number is determined to be the field to be filled in the variable information corresponding to the first character number.
If the number difference is not smaller than the first difference threshold, a larger blank position appears after the variable information is filled into the field to be filled, and the variable information possibly does not belong to the field to be filled and needs to be further confirmed, the first word spacing of the variable information and the second word spacing of the fixed template information in the corresponding printing typesetting template are respectively acquired. One possible word pitch acquisition approach is: the word spacing is obtained by the font module in Python. In other embodiments, word spacing may also be obtained by a getComputedStyle function.
Finally, according to the first word spacing and the second word spacing, determining whether the field to be filled corresponding to the second character number is a field to be filled of variable information corresponding to the first character number, wherein one possible determination mode is as follows:
if the first word spacing is smaller than the second word spacing, increasing the first difference threshold to the second difference threshold;
under the condition that the number difference is smaller than a second difference threshold, determining that a field to be filled corresponding to the second character number is a field to be filled of variable information corresponding to the first character number;
if the first word spacing is greater than or equal to the second word spacing, determining that the field to be filled corresponding to the second character number is not the field to be filled of the variable information corresponding to the first character number.
Specifically, if the first word pitch is smaller than the second word pitch, it means that the word pitch of the variable information is smaller than the word pitch of the fixed template information, so that the number of blank positions reserved after filling the field to be filled is larger, and not necessarily because the variable information is not matched with the field to be filled. The first difference threshold is increased to a second difference threshold. The second difference threshold is obtained by matching a distance difference between the second word distance and the first word distance from a preset difference threshold matching table, and the difference threshold matching table comprises the distance difference and a corresponding second difference threshold. Comparing the number difference value of the second character number and the first character number with a second difference value threshold value, and if the number difference value is smaller than the second difference value threshold value, indicating that the filling proportion of the variable information after filling the variable information into the field to be filled is reasonable, determining that the field to be filled corresponding to the second character number is the field to be filled of the variable information corresponding to the first character number; if the number difference is still not smaller than the second difference threshold, the corresponding variable information is not determined to be corresponding to the field to be filled.
Finally, if the first word spacing is greater than or equal to the second word spacing, and on the premise that more blank positions remain after the variable information is filled into the field to be filled, the word spacing of the variable information is greater than or equal to the word spacing of the field to be filled, which indicates that the variable information is not matched with the field to be filled.
In another implementation manner, step S208 further includes: judging whether each piece of variable information is positioned at the middle position of the corresponding field to be filled;
if the two types of the printing typesetting templates are not positioned at the center positions of the corresponding fields to be filled, selecting a target center position point of any one variable information, and horizontally moving the printing typesetting templates so that the center position point of the corresponding fields to be filled coincides with the target center position point.
Specifically, after the typesetting information is determined, the typesetting information is tried to be subjected to corona printing, at the moment, personnel interfere the typesetting information, the effect of a corona printing result is judged, and if the variable information is not centered and has position offset in the corona printing result, the typesetting needs to be adjusted again. Then receiving a centering adjustment instruction sent by the personnel terminal at the moment, and further judging that each piece of variable information is not positioned in the centering position of the corresponding field to be filled. Then selecting a target center point of any one of the variable information in the variable information set, one of the target center points being selected by: the selection is performed by a Python built-in function len and mathematical operation, which is the prior art and will not be described here. And finally, integrally moving the printing typesetting template corresponding to the variable information set to enable the central position point of the field to be filled corresponding to the variable information of the selected target central position point to coincide with the target central position point, and stopping moving operation, so that each variable information is located at the central position of the corresponding field to be filled, and the certificate printing effect is good.
The implementation principle of the corona printing typesetting method of the embodiment of the application is as follows: and obtaining a variable information set, namely, information of an object to be issued by the corona printing certificate, and then matching the matched printing typesetting templates according to the variable information set, wherein the printing typesetting templates corresponding to different variable information sets are different. Because the determined printing and typesetting template comprises the field to be filled, finally, matching the corresponding field to be filled in the printing and typesetting template for each piece of variable information in the variable information set, namely each piece of information of the issuing object, filling the variable information into the corresponding field to be filled, and finally obtaining typesetting information corresponding to the printing certificate to be corona-printed, thereby realizing quick typesetting of the certificate and improving the printing and typesetting efficiency of the certificate.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a corona printing typesetting device according to an embodiment of the present application. The application to corona printing typesetting devices may be implemented as all or part of the device by software, hardware, or a combination of both. The device 1 comprises an information acquisition module 11, a template determination module 12 and a filling typesetting module 13.
The information acquisition module 11 is configured to acquire a variable information set of the to-be-corona-printed certificate, where the variable information set is information of an object to be issued by the to-be-corona-printed certificate, and includes at least one variable information;
a template determining module 12, configured to determine a corresponding printing typesetting template according to the variable information set, where the printing typesetting template includes a field to be filled;
and the filling typesetting module 13 is used for matching the fields to be filled corresponding to each variable information in the variable information set according to a preset rule, and adding each variable information to the corresponding fields to be filled in the printing typesetting template to obtain typeset information of the certificate to be corona-printed.
Optionally, the template determining module 12 is specifically configured to:
counting the first quantity of variable information in a variable information set, and counting the second quantity of fields to be filled in each printing typesetting template in a preset template library;
screening target printing typesetting templates with the second number being consistent with the first number, and counting the total number of first characters which can be accommodated in fields to be filled in the target printing typesetting templates;
if the ratio of the total number of the second characters to the total number of the first characters of the variable information set is larger than the preset ratio, a printed template consistent with the target printing typesetting template is called, the printed variable information set corresponding to the printed template is compared with the variable information set, and the printed variable information set comprises at least one printed variable information;
And if the information category corresponding to the printed variable information is consistent with the information category corresponding to the variable information, determining the target printing typesetting template as a variable information set to determine the corresponding printing typesetting template.
Optionally, the filling typesetting module 13 is specifically configured to:
determining a corresponding variable information arrangement sequence according to the printing typesetting template corresponding to the variable information set;
according to the variable information arrangement sequence, ordering all the variable information in the variable information set to obtain an ordered set;
according to the front-back sequence of each field to be filled in the printing typesetting template, sequentially matching the fields to be filled corresponding to each variable information in the ordered set, wherein the sequence of the variable information in the ordered set is the forefront, and the sequence of the corresponding fields to be filled is the forefront.
Optionally, the filling typesetting module 13 is specifically further configured to:
counting the first character number of each variable information and the second character number which can be accommodated by each field to be filled;
if the number difference between the second character number and the first character number is smaller than a first difference threshold value, determining a field to be filled corresponding to the second character number as a field to be filled of variable information corresponding to the first character number;
And under the condition that the second character number is not smaller than the first character number, if the difference value between the second character number and the first character number is not smaller than a first difference value threshold value, acquiring a first word interval of variable information corresponding to the first character number and a second word interval of fixed template information, and determining whether a field to be filled corresponding to the second character number is the field to be filled of the variable information corresponding to the first character number according to the first word interval and the second word interval.
Optionally, the filling typesetting module 13 is specifically further configured to:
if the first word spacing is smaller than the second word spacing, increasing the first difference threshold to the second difference threshold;
under the condition that the number difference is smaller than a second difference threshold, determining that a field to be filled corresponding to the second character number is a field to be filled of variable information corresponding to the first character number;
if the first word spacing is greater than or equal to the second word spacing, determining that the field to be filled corresponding to the second character number is not the field to be filled of the variable information corresponding to the first character number.
Optionally, as shown in fig. 5, the apparatus 1 further includes a typesetting adjustment module 14, specifically configured to:
judging whether each piece of variable information is positioned at the middle position of the corresponding field to be filled;
If the two types of the printing typesetting templates are not positioned at the center positions of the corresponding fields to be filled, selecting a target center position point of any one variable information, and horizontally moving the printing typesetting templates so that the center position point of the corresponding fields to be filled coincides with the target center position point.
Optionally, the template determining module 12 is specifically configured to:
determining a first certificate class of the variable information set;
matching the printing typesetting template corresponding to the first certificate type from a preset template matching table;
if a template adjustment instruction is received, adjusting the printing typesetting template corresponding to the variable information set to be a target typesetting template;
counting the number of variable information sets of the same first certificate category in the target variable information sets corresponding to each target typesetting template; if the number is greater than the number threshold, establishing a corresponding relation between the first certificate category in the template matching table and the target typesetting template;
and if the number is not greater than the number threshold, adjusting the first certificate type of the variable information set in each target variable information set to be a second certificate type corresponding to the target typesetting template.
It should be noted that, when executing the corona printing typesetting method, the corona printing typesetting device provided in the foregoing embodiment only performs an illustration by using the division of the foregoing functional modules, in practical application, the foregoing functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the corona printing typesetting device and the corona printing typesetting method provided in the foregoing embodiments belong to the same concept, which embody detailed implementation processes and are not described herein.
The embodiment of the application also discloses a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor, and the corona printing typesetting method of the embodiment is adopted.
The computer program may be stored in a computer readable medium, where the computer program includes computer program code, where the computer program code may be in a source code form, an object code form, an executable file form, or some middleware form, etc., and the computer readable medium includes any entity or device capable of carrying the computer program code, a recording medium, a usb disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, etc., where the computer readable medium includes, but is not limited to, the above components.
Wherein, through the computer readable storage medium, a corona printing typesetting method of the above embodiment is stored in the computer readable storage medium and is loaded and executed on a processor, so as to facilitate the storage and application of the method.
The embodiment of the application also discloses an electronic device, wherein a computer program is stored in a computer readable storage medium, and when the computer program is loaded and executed by a processor, the corona printing typesetting method is adopted.
The electronic device may be an electronic device such as a desktop computer, a notebook computer, or a cloud server, and the electronic device includes, but is not limited to, a processor and a memory, for example, the electronic device may further include an input/output device, a network access device, a bus, and the like.
The processor may be a Central Processing Unit (CPU), or of course, according to actual use, other general purpose processors, digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), ready-made programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and the general purpose processor may be a microprocessor or any conventional processor, etc., which is not limited in this respect.
The memory may be an internal storage unit of the electronic device, for example, a hard disk or a memory of the electronic device, or may be an external storage device of the electronic device, for example, a plug-in hard disk, a Smart Memory Card (SMC), a secure digital card (SD), or a flash memory card (FC) provided on the electronic device, or the like, and may be a combination of the internal storage unit of the electronic device and the external storage device, where the memory is used to store a computer program and other programs and data required by the electronic device, and the memory may be used to temporarily store data that has been output or is to be output, which is not limited by the present application.
The corona printing typesetting method of the embodiment is stored in the memory of the electronic equipment and is loaded and executed on the processor of the electronic equipment, so that the corona printing typesetting method is convenient to use.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.

Claims (10)

1. A corona printing typesetting method, the method comprising:
obtaining a variable information set of a certificate to be corona-printed, wherein the variable information set is information of an object to be corona-printed, and comprises at least one variable information;
Determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled;
and matching the fields to be filled corresponding to the variable information in the variable information set according to a preset rule, and adding the variable information to the corresponding fields to be filled in the printing typesetting template to obtain typesetting information of the printing certificate to be corona.
2. The corona printing typesetting method according to claim 1, wherein said determining a corresponding printing typesetting template according to said variable information set comprises:
counting the first quantity of the variable information in the variable information set, and counting the second quantity of fields to be filled in each printing typesetting template in a preset template library;
screening target printing typesetting templates with the second number being consistent with the first number, and counting the total number of first characters which can be accommodated by the field to be filled in the target printing typesetting templates;
if the ratio of the total number of the second characters of the variable information set to the total number of the first characters is larger than a preset ratio, a printed template consistent with the target printing typesetting template is called, the printed variable information set corresponding to the printed template is compared with the variable information set, the printed variable information set comprises at least one printed variable information, and the ratio and the preset ratio are smaller than 1;
And if the information category corresponding to each printed variable information is consistent with the information category corresponding to each variable information, determining the target printing typesetting template as the variable information set to determine the corresponding printing typesetting template.
3. The corona printing typesetting method according to claim 1, wherein the matching the to-be-filled field corresponding to each variable information in the variable information set according to a preset rule specifically comprises:
determining a corresponding variable information arrangement sequence according to the printing typesetting template corresponding to the variable information set;
sorting all the variable information in the variable information set according to the variable information arrangement sequence to obtain a sorted set;
and sequentially matching the fields to be filled corresponding to the variable information in the ordered set according to the front-back sequence of the fields to be filled in the printing typesetting template, wherein the sequence of the variable information in the ordered set is the forefront, and the sequence of the corresponding fields to be filled is the forefront.
4. The corona printing typesetting method according to claim 1, wherein the printing typesetting template further comprises fixed template information, and the matching of the fields to be filled corresponding to each variable information in the variable information set according to a preset rule specifically comprises:
Counting the first character number of each variable information and the second character number which can be accommodated by each field to be filled;
if the number difference between the second character number and the first character number is smaller than a first difference threshold value, determining a field to be filled corresponding to the second character number as a field to be filled of variable information corresponding to the first character number;
and if the difference value between the second character number and the first character number is not smaller than a first difference threshold, acquiring a first word spacing of variable information corresponding to the first character number and a second word spacing of fixed template information, and determining whether a field to be filled corresponding to the second character number is the field to be filled of the variable information corresponding to the first character number according to the first word spacing and the second word spacing.
5. The method according to claim 4, wherein determining whether the field to be filled corresponding to the second number of characters is a field to be filled of variable information corresponding to the first number of characters according to the first word pitch and the second word pitch specifically includes:
If the first word spacing is smaller than the second word spacing, the first difference threshold is increased to a second difference threshold;
if the number difference is smaller than the second difference threshold, determining that the field to be filled corresponding to the second character number is a field to be filled of variable information corresponding to the first character number;
and if the first word spacing is greater than or equal to the second word spacing, determining that the field to be filled corresponding to the second character number is not the field to be filled of the variable information corresponding to the first character number.
6. The corona printing typesetting method according to claim 1, wherein after adding each piece of variable information to a corresponding field to be filled in the printing typesetting template to obtain the typeset information of the certificate to be corona printed, the method further comprises:
judging whether each piece of variable information is positioned at the middle position of the corresponding field to be filled;
and if the printing typesetting template is not positioned at the center position of the corresponding field to be filled, selecting a target center position point of any one piece of variable information, and horizontally moving the printing typesetting template so as to enable the center position point of the corresponding field to be filled to coincide with the target center position point.
7. The corona printing typesetting method according to claim 1, wherein said determining a corresponding printing typesetting template according to said variable information set comprises:
determining a first certificate class of the variable information set;
matching the printing typesetting template corresponding to the first certificate type from a preset template matching table;
if a template adjustment instruction is received, adjusting the printing typesetting template corresponding to the variable information set to be a target typesetting template;
counting the number of variable information sets of the same first certificate category in the target variable information sets corresponding to the target typesetting templates;
if the number is larger than the number threshold, establishing a corresponding relation between the first certificate category in the template matching table and the target typesetting template;
and if the number is not greater than the number threshold, adjusting the first certificate category of the variable information set in each target variable information set to be a second certificate category corresponding to the target typesetting template.
8. A corona printing typesetting device, comprising:
the information acquisition module (11) is used for acquiring a variable information set of the to-be-corona printing certificate, wherein the variable information set is information of an object to be issued by the to-be-corona printing certificate and comprises at least one variable information;
A template determining module (12) for determining a corresponding printing typesetting template according to the variable information set, wherein the printing typesetting template comprises fields to be filled;
and the filling typesetting module (13) is used for matching the field to be filled corresponding to each piece of variable information in the variable information set according to a preset rule, and adding each piece of variable information to the corresponding field to be filled in the printing typesetting template to obtain typesetting information of the certificate to be corona-printed.
9. A computer readable storage medium having a computer program stored therein, characterized in that the method according to any of claims 1-7 is employed when the computer program is loaded and executed by a processor.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, characterized in that the method according to any of claims 1-7 is used when the computer program is loaded and executed by the processor.
CN202310945950.0A 2023-07-29 2023-07-29 Corona printing typesetting method and device, storage medium and electronic equipment Pending CN117195853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310945950.0A CN117195853A (en) 2023-07-29 2023-07-29 Corona printing typesetting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310945950.0A CN117195853A (en) 2023-07-29 2023-07-29 Corona printing typesetting method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117195853A true CN117195853A (en) 2023-12-08

Family

ID=89004252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310945950.0A Pending CN117195853A (en) 2023-07-29 2023-07-29 Corona printing typesetting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117195853A (en)

Similar Documents

Publication Publication Date Title
CN109829453B (en) Method and device for recognizing characters in card and computing equipment
CN109784235A (en) Method for automatically inputting, device, computer equipment and the storage medium of paper form
US20210049711A1 (en) Method of automatically transmitting data information and device of automatically transmitting data information
CN110619115B (en) Template creating method and device, electronic equipment and storage medium
CN115391439B (en) Document data export method, device, electronic equipment and storage medium
CN110837796A (en) Image processing method and device
CN110781856A (en) Heterogeneous face recognition model training method, face recognition method and related device
CN115601473A (en) Printed matter typesetting system and method based on intelligent recognition
CN111462388A (en) Bill inspection method and device, terminal equipment and storage medium
KR101951910B1 (en) An E-book Production System Using Automatic Placement Of Illustration And Text
CN113066223A (en) Automatic invoice verification method and device
CN117195853A (en) Corona printing typesetting method and device, storage medium and electronic equipment
CN110705229B (en) Editing class list arrangement recommendation method and device
CN114040012B (en) Information query pushing method and device and computer equipment
CN112508193B (en) Deep learning platform
CN112699634B (en) Typesetting processing method of electronic book, electronic equipment and storage medium
CN111783066B (en) Character recognition method, system, computer equipment and storage medium
CN113988020A (en) Engineering technical label book compiling method, device, equipment and storage medium
CN111259806B (en) Face area identification method, device and storage medium
CN114021716A (en) Model training method and system and electronic equipment
CN109934232A (en) Vehicle identification method, computer installation and computer readable storage medium
CN113343968A (en) Multi-template certificate rapid verification method, system, medium and device
CN112183520A (en) Intelligent data information processing method and device, electronic equipment and storage medium
CN111401137A (en) Method and device for identifying certificate column
CN110163203B (en) Character recognition method, device, storage medium and computer equipment

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