CN116702703A - Automatic typesetting method and electronic equipment - Google Patents

Automatic typesetting method and electronic equipment Download PDF

Info

Publication number
CN116702703A
CN116702703A CN202310732946.6A CN202310732946A CN116702703A CN 116702703 A CN116702703 A CN 116702703A CN 202310732946 A CN202310732946 A CN 202310732946A CN 116702703 A CN116702703 A CN 116702703A
Authority
CN
China
Prior art keywords
printing
information
typesetting
size
product
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
CN202310732946.6A
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202310732946.6A priority Critical patent/CN116702703A/en
Publication of CN116702703A publication Critical patent/CN116702703A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application provides an automatic typesetting method and electronic equipment, wherein the method comprises the following steps: acquiring product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is a printing template printed with a printing drawing; determining printing content and a target printing format on a printing template according to the product information; determining the size and arrangement information of the printing content according to the target printing format and the size information, typesetting the printing content according to the size and the arrangement information of the printing content, and obtaining a printing drawing; according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing; and under the condition that the printing drawing does not accord with the standard, marking the non-accord position in the printing drawing, and displaying the printing drawing marked with the non-accord position and the drawing inspection standard on a display screen.

Description

Automatic typesetting method and electronic equipment
Technical Field
The application relates to the technical field of printing, in particular to an automatic typesetting method and electronic equipment.
Background
The national standard and certification are approved and audited in the prior art, such as the specifications of the prior products, the marks of nameplates and printed products, are mainly manually recorded and compiled through Adobe Illustrator, CDR and other software, but the problem of printed product errors is easy to occur because the standards are not well understood in the process of generation or negligence exists in the process of working by manpower. Meanwhile, when the manual verification is carried out, the verification speed and the accuracy are difficult to ensure, and the specific reasons are as follows:
1) The mark label comparison related in the evaluation quality control mainly uses personnel visual inspection and manual comparison as main, works repeatedly, limits the overall test efficiency, and belongs to the plate with more problems in the test.
2) Authentication approval review: the task is heavy, the flow steps are more, the personnel visual inspection and manual comparison are mainly adopted, the related printed matters are more and more, and the issuing efficiency is limited.
Therefore, how to improve the generation efficiency of the printed matter is a technical problem to be solved in the prior art.
Disclosure of Invention
The application mainly aims to provide an automatic typesetting method and electronic equipment, which at least solve the problem of low generation efficiency of printed matters in the prior art.
In order to achieve the above object, according to an aspect of the present application, there is provided an automatic typesetting method comprising: acquiring product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing; determining printing content and a target printing format on the printing template according to the product information; determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing; according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing; and under the condition that the printing drawing does not accord with the standard, marking a non-accord position in the printing drawing, and displaying the printing drawing marked with the non-accord position and the drawing inspection standard on a display screen.
Optionally, acquiring the size information of the printing template includes: under the condition that the printing template exists in a preset area, controlling an image acquisition device to acquire initial image information comprising the printing template; extracting edges of the initial image information to obtain an image of the printing template; determining the number of pixels occupied by the printing template according to the image of the printing template; and determining the size information according to the pixel number and the image resolution of the image acquisition device.
Optionally, the printed content includes text and an object, the object includes at least one of a graph, a table, and a symbol, and determining size and arrangement information of the printed content according to the target printing format and the size information includes: determining a text region, a font of the text, typesetting of the text in the text region and an object region according to the target printing format; determining the word size of the words according to the word area, the words, the word patterns of the words, the typesetting of the words in the word area and the size information; and determining the size of the object according to the object area.
Optionally, the text includes a keyword and a non-keyword, where the keyword is different from a word size and/or a font of the non-keyword, and typesetting the printed content according to the size of the printed content and the arrangement information to obtain the printing drawing, and the method includes: according to the typesetting and the word size and the word shape of the non-key words, arranging the words in the word area; arranging the objects in the object area according to the size of the objects; and adjusting the word size and/or the character shape of the keywords in the character area to obtain the printing drawing.
Optionally, after identifying a non-conforming location in the printing drawing and displaying the printing drawing and the drawing inspection standard with the non-conforming location identified on a display screen, the method further includes: displaying a first editing area at a predetermined position of the printing drawing in response to a second predetermined operation acting at the predetermined position, the predetermined position including the non-conforming position; and replacing the information of the predetermined position with modified information in response to a modification operation acting on the first editing area.
Optionally, determining whether the printing drawing meets the standard according to the drawing inspection standard and the printing drawing includes: determining an inspection keyword according to the drawing inspection standard; determining whether the check keyword exists in the printing drawing; under the condition that the inspection keywords exist in the printing drawing, determining that the printing drawing meets the standard; and under the condition that the check key word does not exist in the printing drawing, determining that the printing drawing does not accord with the standard.
Optionally, in the case that the printing drawing meets the standard, the method further includes: displaying the printing drawing, the drawing inspection standard and a first selection identifier on the display screen, wherein the first selection identifier is an identifier for representing whether to upload and/or store the printing drawing; the printing paper is uploaded and/or stored in response to a third predetermined operation acting on the first selection indicator.
Optionally, before determining the print content on the printing template and the target printing format according to the product information, the method further comprises: creating an initial printing format and a plurality of typesetting annotations, wherein the initial printing format comprises a plurality of typesetting areas; establishing a mapping relation between each typesetting region and the typesetting annotation in a set style of a plurality of products, wherein the plurality of products comprise the target product; generating a printing format corresponding to each product according to the mapping relation and the initial printing format, wherein the printing formats comprise the target printing format; and sending the plurality of printing formats to a preset address, wherein the preset address comprises a preset mailbox.
Optionally, the printed matter comprises a product nameplate, the product information comprises a product model and/or a product code, and the target printing format comprises a target typesetting format and a target layout format.
According to another aspect of the present application, there is provided an electronic apparatus including: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing any of the methods.
By applying the technical scheme, the application provides an automatic typesetting method which can automatically typeset the printing content according to the product information and the size information of the printing template to obtain the printing drawing of the product; in addition, the application also automatically detects the generated printing drawing, determines whether the generated printing drawing meets the standard requirement, marks the non-conforming position of the printing drawing and displays the marked printing drawing and drawing inspection standard under the condition of non-conforming, thereby facilitating personnel review and modification of the non-conforming position, realizing automatic detection and automatic test of the printing drawing and solving the problem of lower printing product generation efficiency caused by manually arranging and inspecting the printing drawing in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
fig. 1 is a block diagram showing a hardware configuration of a mobile terminal performing an automatic typesetting method according to an embodiment of the present application;
Fig. 2 shows a schematic flow chart of an automatic typesetting method according to an embodiment of the present application;
FIG. 3 illustrates a workflow diagram for automatic typesetting provided in accordance with an embodiment of the application;
fig. 4 shows a block diagram of an automatic typesetting apparatus according to an embodiment of the present application.
Wherein the above figures include the following reference numerals:
102. a processor; 104. a memory; 106. a transmission device; 108. and an input/output device.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described in the background art, the generation efficiency of the printed matter in the prior art is low, and in order to solve the technical problems as described above, the embodiment of the application provides an automatic typesetting method and electronic equipment.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal of an automatic typesetting method according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to an automatic typesetting method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In the present embodiment, an automatic typesetting method is provided that operates on a mobile terminal, a computer terminal, or a similar computing device, it should be noted that the steps illustrated in the flowcharts of the drawings may be performed in a computer system such as a set of computer-executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of an automatic typesetting method according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:
step S201, obtaining product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
specifically, the product information may be any suitable information that makes the target product different from other products, such as information of a product name, a product model number, a product code, or a product ID number. Such printed matter includes, but is not limited to, printed matter such as product specifications, nameplates, books, newspapers, and the like.
Step S202, determining the printing content and the target printing format on the printing template according to the product information;
Specifically, different target products correspond to different product information, and the printing content and the printing format used in printing are different. The target printing format comprises a typesetting format and a layout format, wherein the typesetting format is a typesetting style preset according to the needs of a user, the typesetting style is the attribute of a typesetting plate in a typesetting area, the attribute comprises the initial position of the typesetting plate, the border color of the typesetting plate and the like, typesetting data are not preset in a typesetting template, and after the typesetting template is selected, typesetting can be carried out on the typesetting data according to the typesetting style of the typesetting template; the layout format set is a set of relative position relations among the layout blocks in the layout template, the set of relative position relations among the layout blocks is a set of attributes which are set by a user according to mutual positions and are adjusted among the layout blocks in the layout format, and the user can self-define and select any layout format in the layout format set to perform pre-typesetting.
Step S203, determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
Specifically, the printed content may include text, graphics, images, tables, and the like, and when the printed content includes text, the size of the printed content is the font size of the text, and the arrangement information is typesetting data of the text; when the printed content includes at least one of a graph, an image and a table, the size of the printed content is the size of the graph, the image and the table, and the arrangement information is the typesetting data of the graph, the typesetting data of the image and the typesetting data of the table.
Step S204, according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
specifically, the drawing inspection standard is standard information for determining whether the printing drawing of the target product is acceptable.
Step S205, when the printing drawing does not meet the standard, marking a non-meeting position in the printing drawing, and displaying the printing drawing marked with the non-meeting position and the drawing inspection standard on a display screen.
Through the above embodiment, first, product information of a target product and size information of a printing template are acquired; then determining the printing content and the target printing format printed on the printing template according to the product information; then determining the size and arrangement information of the printing content according to the obtained printing content, the target printing format and the size information, and typesetting the printing content according to the size and arrangement information; then, drawing inspection standards of the target product are called, and the printing drawing and the drawing inspection standards are compared to determine whether the printing drawing meets the standards; and finally, when determining that the printing drawing does not accord with the standard, marking the non-accord position and displaying the marked printing drawing and drawing inspection standard on a display screen, so that an inspector can intuitively check whether the printing drawing does not accord with the standard. The application provides an automatic typesetting method, which can automatically typeset printing contents according to product information and size information of a printing template to obtain a printing drawing of a product; in addition, the application also automatically detects the generated printing drawing, determines whether the generated printing drawing meets the standard requirement, marks the non-conforming position of the printing drawing and displays the marked printing drawing and drawing inspection standard under the condition of non-conforming, thereby facilitating personnel review and modification of the non-conforming position, realizing automatic detection and automatic test of the printing drawing and solving the problem of lower printing product generation efficiency caused by manually arranging and inspecting the printing drawing in the prior art.
In the actual application process, the method for obtaining the product information may be: controlling the display screen to display a second selection identifier, wherein the second selection identifier characterizes the identifier of the information for selecting the product; displaying a first drop-down menu in response to a fourth predetermined operation acting on the second selection indicator, the first drop-down menu including information selection items of a plurality of products; the product information of the target product is obtained in response to a fifth predetermined operation acting on the information selection item. By setting the first drop-down menu option, the product information is determined according to the selection of the related personnel, and the operation convenience of the related personnel is ensured.
Besides the mode of displaying the second selection mark on the display screen, the second editing area can be displayed on the display screen, related personnel input information of a required product in the second editing area, and the product information is read in response to the input operation. This can further ensure flexibility in the entry of product information. Of course, besides the product information obtained by man-machine interaction operation of related personnel on the display screen, the application can also receive the product information sent by other equipment, namely, the related personnel can send the product information by operating other equipment.
Likewise, the manner of obtaining the size information of the printing template may be: controlling the display screen to display a third selection mark, wherein the third selection mark represents the mark for selecting the size information of the printing template; displaying a second drop-down menu in response to a sixth predetermined operation acting on the third selection indicator, the second drop-down menu including a plurality of printed template size selections; the above-mentioned size information is obtained in response to a seventh predetermined operation acting on the above-mentioned size selection item. By setting the second drop-down menu option, the size of the printing template is determined according to the selection of the related personnel, and the operation convenience of the related personnel is ensured.
In addition to displaying the third selection identifier on the display screen, a third editing area may be displayed on the display screen, and the relevant personnel may input information of a desired product in the third editing area, and read the product information in response to the input operation. This can further ensure flexibility in the entry of product information. Of course, besides the product information obtained by man-machine interaction operation of related personnel on the display screen, the application can also receive the size information sent by other equipment, namely the related personnel can send the size information by operating the other equipment.
Wherein the fourth, fifth, sixth and seventh predetermined operations may each include one of: clicking, double clicking, long pressing, sliding, hooking and the like.
In order to further relieve manpower and further reduce the manpower cost in the typesetting printing process, in an alternative, obtaining the size information of the printing template includes: under the condition that the preset area exists in the printing template, controlling the image acquisition equipment to acquire initial image information comprising the printing template; extracting edges of the initial image information to obtain an image of the printing template; determining the number of pixels occupied by the printing template according to the image of the printing template; the size information is determined based on the number of pixels and the image resolution of the image capturing device. According to the embodiment, the size of the printing template is obtained by processing the image information of the printing template through an image recognition technology, manual input or manual selection of the size of the printing template is not needed, the liberation of manpower is further realized, and the manpower cost is further reduced.
In order to ensure that the obtained size information is accurate, the preset area is set to be an area opposite to the image acquisition equipment.
According to another exemplary embodiment of the present application, the print content includes text and an object, the object includes at least one of a graphic, a table, and a symbol, and determining size and arrangement information of the print content according to the target print layout and the size information includes: determining a character area, a character shape of the character and typesetting of the character in the character area according to the target printing format; determining the font size of the characters according to the character area, the characters, the fonts of the characters and the typesetting of the characters in the character area and the size information; and determining the size of the object according to the object area. According to the embodiment, the text region, the object region, the text font and the text typesetting are obtained according to the target printing format, the size of the object matched with the size of the object region is determined, the text size matched with the typesetting and the size is determined according to the size of the text typesetting and the size of the printing template, automatic determination of the text size is realized, automatic typesetting of printing contents according to the printing format requirement is further realized, the typesetting of the typeset printing drawing is further ensured to meet the format requirement of a product, the generation quality of the printing drawing is ensured to be higher, meanwhile, manual typesetting is not needed, manpower is further liberated, and the manpower cost is reduced.
Specifically, the typesetting of the characters in the character area comprises which character is the last character of each row and/or each column, or comprises which character is the first character of each row and/or each column, so that automatic line division of the characters is realized.
In order to further ensure that the automatic typesetting scheme can meet the requirements, in one embodiment, the text includes keywords and non-keywords, the keywords are different from the non-keywords in word number and/or font, and the typesetting is performed on the printed content according to the size of the printed content and the arrangement information to obtain the printed drawing, where the typesetting includes:
step S2031: arranging the characters in the character area according to the typesetting and the character sizes and the character shapes of the non-key words;
step S2032: arranging the objects in the object area according to the sizes of the objects;
step S2033: and adjusting the word size and/or the character shape of the keywords in the text region to obtain the printing drawing.
In the above embodiment, since the keywords and the non-keywords in the printed content generally cross, and in order to highlight the keywords, the size of the non-keywords may be smaller than the size of the keywords.
Of course, besides the above manner, the specific implementation manner of typesetting the above printed content according to the size of the above printed content and the above arrangement information to obtain the above printed drawing may also be: according to the typesetting, the word size and the font of the keywords and the word size and the font of the non-keywords, the keywords and the non-keywords are arranged in the word area; and arranging the objects in the object area according to the sizes of the objects.
The above-described glyphs include information such as, but not limited to, the font type of the text (e.g., song Ti, regular script, clerical script, microsoft black, etc.), the glyphs (e.g., regular, inclined, bolded, inclined + bolded, etc.), and the color of the text.
When the printed matter is a nameplate, the nameplate generally includes a warning sign graphic and a warning sign, the number of the warning sign is increased and the warning sign is thickened in order to project the warning sign graphic and the warning sign, and the warning sign graphic is generally arranged at the upper right corner of the nameplate.
The order of the steps S2031 and S2032 is not limited to the steps S2031 and S2032, and the steps S2032 and S2031 may be performed first. Similarly, the execution order of step S2032 and step S2033 is not limited to the execution of step S2032 before step S2033, and step S2033 may be executed before step S2032.
In the application, after the non-conforming position is marked in the printing drawing and the printing drawing marked with the non-conforming position and the drawing inspection standard are displayed on a display screen, the method further comprises the steps of: displaying a first editing area at a predetermined position including the non-conforming position in response to a second predetermined operation acting at the predetermined position of the printing drawing; and replacing the information of the predetermined position with modified information in response to a modification operation acting on the first editing area. The non-conforming position is modified through man-machine interaction, so that the modified printing drawing is guaranteed to conform to drawing inspection standards and is qualified, the generation efficiency of the qualified printing drawing is further improved, and meanwhile, the higher accuracy of the printing drawing is further guaranteed.
Specifically, the second predetermined operation may be a double-click operation using the thinker library to implement replacement and modification of contents such as text and graphics.
Because the problem of missed judgment may exist in the actual comparison process, besides the non-conforming position, the preset position also comprises other positions except the non-conforming position, so that when the missed judgment occurs, related personnel can also correct the non-conforming position which is not detected by the scheme through manual modification.
In a specific application process, the place where the printing drawing is wrong is mainly content error, and for this case, in another alternative embodiment of the present application, determining whether the printing drawing meets the standard according to the drawing inspection standard and the printing drawing includes: determining an inspection keyword according to the drawing inspection standard; determining whether the check key word exists in the printing drawing; under the condition that the inspection keywords exist in the printing drawing, determining that the printing drawing meets the standard; and determining that the printing drawing does not accord with the standard under the condition that the checking key word does not exist in the printing drawing. The embodiment realizes automatic detection of the position with high error rate in the printing drawing, further ensures that the finally determined printing drawing is correct, has higher quality, and reduces the time and labor cost spent in manual detection.
The inspection keywords are obtained by summarizing the characters which are easy to make mistakes in the actual typesetting of the printed matters of the products, the inspection keywords comprise the frequently made mistakes keyword information, and the keywords corresponding to different products are different. Of course, there may be errors in printing formats, graphic positions, graphic numbers, graphic sizes, and other factors in addition to the above-mentioned text errors, and thus, in addition to the above-mentioned schemes, determining whether the above-mentioned printing drawing meets the standard according to the above-mentioned drawing inspection standard and the above-mentioned printing drawing may further include: extracting at least part of the following information from the printing drawing to obtain extracted information: the number of graphics, the position of graphics, the size of graphics, the position of characters, the number of characters, the overlapping condition between graphics and the overlapping condition of characters; comparing the extracted information with the drawing inspection standard, and determining that the printing drawing accords with the standard under the condition that the extracted information is the same as the corresponding item in the drawing inspection standard; and under the condition that the extracted information is different from the corresponding item of the drawing inspection standard sheet, determining that the printing drawing does not accord with the standard.
When the extracted information includes the number of graphics, the number of graphics whose corresponding item in the drawing inspection standard is the same as that of other extracted information, and will not be described in detail here.
Specifically, the above-mentioned comparison process for determining whether the check keyword exists in the printing drawing may be implemented by using logic judgment sentences such as Ruby and python.
In order to further ensure the correctness of the finally determined printing drawing, in particular, in the case that the printing drawing meets the standard, the method further comprises: displaying the printing drawing, the drawing inspection standard and a first selection mark on the display screen, wherein the first selection mark is used for representing whether to upload and/or store the printing drawing; and uploading and/or storing the printing drawing in response to a third predetermined operation acting on the first selection mark. In this embodiment, after the printing drawing is detected to be qualified, the printing drawing, the drawing inspection standard and the first selection identifier are displayed on the display screen, so that related personnel can manually check the printing drawing for the second time compared with the drawing inspection standard, the problem of missed judgment is avoided, the typesetting quality of the printing drawing is further ensured to be higher, and after the fact that the printing drawing is determined to be non-problematic, the qualified printing drawing is uploaded to the system or stored locally through operating the first selection identifier.
Specifically, the first, second, and third predetermined operations described above may each include one of: clicking, double clicking, long pressing, sliding, hooking and the like.
According to some other embodiments of the application, before determining the print content on the printing template and the target printing format according to the product information, the method further comprises: creating an initial printing format and a plurality of typesetting notes, wherein the initial printing format comprises a plurality of typesetting areas; establishing a mapping relation between each typesetting region and each typesetting annotation in a set style of a plurality of products, wherein the plurality of products comprise the target product; generating a printing format corresponding to each product according to the mapping relation and the initial printing format, wherein the printing formats comprise the target printing format; and sending the printing formats to a preset address, wherein the preset address comprises a preset mailbox. By the method, the automatic construction of the printing format set is realized, the problems of low efficiency, complicated signature and examination flow, slow issuing and the like of manually compiling the printing format set are effectively avoided, the degree of automation of the typesetting and printing process is further improved, and the labor cost is further reduced.
The preset mailbox is a mailbox of an auditor of the printing format, and the auditor can conveniently generate a preview view of the printing format by sending the generated printing format to the mailbox of the auditor, so that the printing format is checked, and the printing format is stored in a printing format library under the condition that the checking is free of problems, so that the subsequent automatic typesetting is convenient to call; when the problem is checked, the printing format is directly and manually adjusted or modified, and the adjusted or modified printing format is stored in a printing format library.
Besides the preset mailbox, the preset address can also be a cloud end, and the auditor obtains the printing format by accessing the cloud end.
In addition, the product information, the corresponding printing content, the corresponding printing format and the corresponding drawing inspection standard of each product are all stored in documents in the format of HTML/XML and the like in an associated mode, and after the product is determined, the corresponding printing content and the corresponding printing format of the corresponding product in the third party library can be automatically extracted or called through inputting the product information. Determining the printing content and the target printing format on the printing template according to the product information, wherein the method comprises the following steps: and calling the printing content corresponding to the product information and the target printing format from the document by using websites such as BS4 (Beautiful Soup), requests (HTTP library) and the like. According to the product information, retrieving drawing inspection standards corresponding to the target product from a database may include: and calling the drawing inspection standard corresponding to the product information from the document by using websites such as BS4 and Requests.
According to the scheme for calling the information in the document through the third party library, different third party libraries can be accessed in a cross-platform mode through an interface provided in an OS module of Python.
In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the following describes the implementation process of the automatic typesetting method of the present application in detail with reference to specific embodiments.
Example 1
The embodiment relates to an automatic typesetting method for nameplates, which can be operated on terminal equipment such as a computer, a tablet and the like, as shown in fig. 3, and comprises the following steps:
step S1: selecting a product category: setting a product selection drop-down menu, and selecting a product category; or inputting a finished product code and/or model number corresponding to the product;
step S2: automatic identification of nameplate size or manual input size: the camera can be installed, the nameplate is placed in the fixed area, the picture is taken of the nameplate, and the specific size of the nameplate is calculated according to the pixel number and the resolution of the nameplate; or an input box can be arranged to manually input the size information of the nameplate;
step S3: extracting nameplate information according to the product category: for similar nameplate information of similar products, selecting a product category, automatically extracting/calling nameplate information of corresponding product category of a third party library and related warning marks, wherein the technical route called by the third party library is to establish the third party library by utilizing BS4 and Requests websites;
Step S4: automatically distributing font sizes and arrangement: according to the size of the nameplate and contents such as contents in nameplate information, typesetting and word number, the corresponding font size is automatically selected, and automatic branching is performed according to typesetting contents;
step S5: highlighting distribution for alert identification: in order to highlight the warning mark and other contents, the related slogan can automatically enlarge the word size according to the requirement, and the thickening treatment is carried out; the picture of the warning is placed at the right upper corner of the nameplate, and the important emphasis is carried out;
step S6: automatic detection after typesetting: searching key information of regular expression recognition in PLM/BNN6 and other websites, and comparing the recognition information with a search result by utilizing Ruby and Python logic judgment sentences;
step S7: and (5) performing manual auditing: for the non-conforming position, the non-conforming position can be double-clicked by the thinker library to realize the replacement and modification of the contents such as characters, graphics and the like;
step S8: and uploading and storing the checked printing drawing by the system and downloading the printing drawing.
Example 2
The application also provides a method for generating the printing format, which comprises the following steps:
step S11: creating an initial printing format, namely creating a layout block divided into a plurality of typesetting areas, and setting a style set acting on the layout block;
Step S12: establishing mapping relations between each typesetting region and typesetting annotation (Tag) in different set patterns, wherein the mapping relations between typesetting regions and typesetting annotation (Tag) in different patterns can be set for complex application according to typesetting data environment and application rules;
step S13: generating a printing format corresponding to each set style according to the mapping relation;
step S14: automatically submitting the print format to a mailbox of related personnel, producing a preview view, and then manually adjusting the related personnel according to the requirement.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides an automatic typesetting device, and the automatic typesetting device can be used for executing the automatic typesetting method provided by the embodiment of the application. The device is used for realizing the above embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The automatic typesetting device provided by the embodiment of the application is described below.
Fig. 4 is a schematic view of an automatic typesetting apparatus according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
an obtaining unit 10, configured to obtain product information and size information of a printing template, where the product information is information of a target product identified by a print corresponding to the printing template on which a printing drawing is printed;
specifically, the product information may be any suitable information that makes the target product different from other products, such as information of a product name, a product model number, a product code, or a product ID number. Such printed matter includes, but is not limited to, printed matter such as product specifications, nameplates, books, newspapers, and the like.
A first determining unit 20 for determining the printing content and the target printing format on the printing template according to the product information;
specifically, different target products correspond to different product information, and the printing content and the printing format used in printing are different. The target printing format comprises a typesetting format and a layout format, wherein the typesetting format is a typesetting style preset according to the needs of a user, the typesetting style is the attribute of a typesetting plate in a typesetting area, the attribute comprises the initial position of the typesetting plate, the border color of the typesetting plate and the like, typesetting data are not preset in a typesetting template, and after the typesetting template is selected, typesetting can be carried out on the typesetting data according to the typesetting style of the typesetting template; the layout format set is a set of relative position relations among the layout blocks in the layout template, the set of relative position relations among the layout blocks is a set of attributes which are set by a user according to mutual positions and are adjusted among the layout blocks in the layout format, and the user can self-define and select any layout format in the layout format set to perform pre-typesetting.
A second determining unit 30, configured to determine size and arrangement information of the print content according to the target print layout and the size information, and typeset the print content according to the size and arrangement information of the print content, so as to obtain the print drawing;
specifically, the printed content may include text, graphics, images, tables, and the like, and when the printed content includes text, the size of the printed content is the font size of the text, and the arrangement information is typesetting data of the text; when the printed content includes at least one of a graph, an image and a table, the size of the printed content is the size of the graph, the image and the table, and the arrangement information is the typesetting data of the graph, the typesetting data of the image and the typesetting data of the table.
A retrieving unit 40, configured to retrieve drawing inspection standards corresponding to the target product from a database according to the product information, and determine whether the printing drawing meets the standards according to the drawing inspection standards and the printing drawing;
specifically, the drawing inspection standard is standard information for determining whether the printing drawing of the target product is acceptable.
And an identification unit 50 for identifying a non-conforming location in the printing drawing and displaying the printing drawing and the drawing inspection standard, in which the non-conforming location is identified, on a display screen, in the case where the printing drawing does not conform to the standard.
Through the above embodiment, the product information of the target product and the size information of the printing template are acquired through the acquisition unit; determining the printing content and the target printing format printed on the printing template according to the product information through a first determining unit; determining the size and arrangement information of the printing content according to the obtained printing content, the target printing format and the size information through a second determining unit, and typesetting the printing content according to the size and arrangement information; the drawing inspection standard of the target product is called through the calling unit, and the printing drawing and the drawing inspection standard are compared to determine whether the printing drawing meets the standard; when the printing drawing is determined to be out of compliance with the standard through the identification unit, the non-compliance position is identified, and the identified printing drawing and drawing inspection standard are displayed on the display screen, so that an inspector can intuitively check whether the printing drawing is out of compliance with the standard. The application provides an automatic typesetting device which can automatically typeset printing contents according to product information and size information of a printing template to obtain a printing drawing of a product; in addition, the application also automatically detects the generated printing drawing, determines whether the generated printing drawing meets the standard requirement, marks the non-conforming position of the printing drawing and displays the marked printing drawing and drawing inspection standard under the condition of non-conforming, thereby facilitating personnel review and modification of the non-conforming position, realizing automatic detection and automatic test of the printing drawing and solving the problem of lower printing product generation efficiency caused by manually arranging and inspecting the printing drawing in the prior art.
In the actual application process, the method for obtaining the product information may be: controlling the display screen to display a second selection identifier, wherein the second selection identifier characterizes the identifier of the information for selecting the product; displaying a first drop-down menu in response to a fourth predetermined operation acting on the second selection indicator, the first drop-down menu including information selection items of a plurality of products; the product information of the target product is obtained in response to a fifth predetermined operation acting on the information selection item. By setting the first drop-down menu option, the product information is determined according to the selection of the related personnel, and the operation convenience of the related personnel is ensured.
Besides the mode of displaying the second selection mark on the display screen, the second editing area can be displayed on the display screen, related personnel input information of a required product in the second editing area, and the product information is read in response to the input operation. This can further ensure flexibility in the entry of product information. Of course, besides the product information obtained by man-machine interaction operation of related personnel on the display screen, the application can also receive the product information sent by other equipment, namely, the related personnel can send the product information by operating other equipment.
Likewise, the manner of obtaining the size information of the printing template may be: controlling the display screen to display a third selection mark, wherein the third selection mark represents the mark for selecting the size information of the printing template; displaying a second drop-down menu in response to a sixth predetermined operation acting on the third selection indicator, the second drop-down menu including a plurality of printed template size selections; the above-mentioned size information is obtained in response to a seventh predetermined operation acting on the above-mentioned size selection item. By setting the second drop-down menu option, the size of the printing template is determined according to the selection of the related personnel, and the operation convenience of the related personnel is ensured.
In addition to displaying the third selection identifier on the display screen, a third editing area may be displayed on the display screen, and the relevant personnel may input information of a desired product in the third editing area, and read the product information in response to the input operation. This can further ensure flexibility in the entry of product information. Of course, besides the product information obtained by man-machine interaction operation of related personnel on the display screen, the application can also receive the size information sent by other equipment, namely the related personnel can send the size information by operating the other equipment.
Wherein the fourth, fifth, sixth and seventh predetermined operations may each include one of: clicking, double clicking, long pressing, sliding, hooking and the like.
In order to further release the manpower and thereby further reduce the manpower cost in the typesetting printing process, in an alternative, the obtaining unit includes: the control module is used for controlling the image acquisition equipment to acquire initial image information comprising the printing template under the condition that the printing template exists in a preset area; the first extraction module is used for carrying out edge extraction on the initial image information to obtain an image of the printing template; the first determining module is used for determining the number of pixels occupied by the printing template according to the image of the printing template; and the second determining module is used for determining the size information according to the pixel number and the image resolution of the image acquisition device. According to the embodiment, the size of the printing template is obtained by processing the image information of the printing template through an image recognition technology, manual input or manual selection of the size of the printing template is not needed, the liberation of manpower is further realized, and the manpower cost is further reduced.
In order to ensure that the obtained size information is accurate, the preset area is set to be an area opposite to the image acquisition equipment.
According to another exemplary embodiment of the present application, the printed content includes text and an object including at least one of a graphic, a table, and a symbol, and the second determining unit includes: a third determining module, configured to determine a text region, a font of the text, a typesetting of the text in the text region, and a target region according to the target printing format; a fourth determining module, configured to determine a font size of the text according to the text region, the text, the font of the text, the typesetting of the text in the text region, and the size information; and a fifth determining module, configured to determine the size of the object according to the object area. According to the embodiment, the text region, the object region, the text font and the text typesetting are obtained according to the target printing format, the size of the object matched with the size of the object region is determined, the text size matched with the typesetting and the size is determined according to the size of the text typesetting and the size of the printing template, automatic determination of the text size is realized, automatic typesetting of printing contents according to the printing format requirement is further realized, the typesetting of the typeset printing drawing is further ensured to meet the format requirement of a product, the generation quality of the printing drawing is ensured to be higher, meanwhile, manual typesetting is not needed, manpower is further liberated, and the manpower cost is reduced.
Specifically, the typesetting of the characters in the character area comprises which character is the last character of each row and/or each column, or comprises which character is the first character of each row and/or each column, so that automatic line division of the characters is realized.
In order to further ensure that the automatic typesetting scheme can meet such requirements, in one embodiment, the text includes keywords and non-keywords, where the keywords are different from the non-keywords in terms of word number and/or font, and the second determining unit includes:
the first arrangement module is used for arranging the characters in the character area according to the typesetting and the character sizes and the character shapes of the non-key words;
the second arrangement module is used for arranging the objects in the object area according to the sizes of the objects;
and the adjusting module is used for adjusting the word size and/or the character shape of the keywords in the word area to obtain the printing drawing.
In the above embodiment, since the keywords and the non-keywords in the printed content generally cross, and in order to highlight the keywords, the size of the non-keywords may be smaller than the size of the keywords.
Of course, besides the above manner, the specific implementation manner of typesetting the above printed content according to the size of the above printed content and the above arrangement information to obtain the above printed drawing may also be: according to the typesetting, the word size and the font of the keywords and the word size and the font of the non-keywords, the keywords and the non-keywords are arranged in the word area; and arranging the objects in the object area according to the sizes of the objects.
The above-described glyphs include information such as, but not limited to, the font type of the text (e.g., song Ti, regular script, clerical script, microsoft black, etc.), the glyphs (e.g., regular, inclined, bolded, inclined + bolded, etc.), and the color of the text.
When the printed matter is a nameplate, the nameplate generally includes a warning sign graphic and a warning sign, the number of the warning sign is increased and the warning sign is thickened in order to project the warning sign graphic and the warning sign, and the warning sign graphic is generally arranged at the upper right corner of the nameplate.
In the present application, the above device further comprises: a first display unit configured to identify a non-conforming position in the printing drawing, and display, on a display screen, the printing drawing identified with the non-conforming position and the drawing inspection standard, a first editing area at a predetermined position including the non-conforming position in response to a second predetermined operation acting at the predetermined position of the printing drawing; and a replacement unit configured to replace the information of the predetermined position with modified information in response to a modification operation acting on the first editing area. The non-conforming position is modified through man-machine interaction, so that the modified printing drawing is guaranteed to conform to drawing inspection standards and is qualified, the generation efficiency of the qualified printing drawing is further improved, and meanwhile, the higher accuracy of the printing drawing is further guaranteed.
Specifically, the second predetermined operation may be a double-click operation using the thinker library to implement replacement and modification of contents such as text and graphics.
Because the problem of missed judgment may exist in the actual comparison process, besides the non-conforming position, the preset position also comprises other positions except the non-conforming position, so that when the missed judgment occurs, related personnel can also correct the non-conforming position which is not detected by the scheme through manual modification.
In a specific application process, the place where the printing drawing is wrong is mainly content mistake, and for this case, in another alternative embodiment of the present application, the calling unit includes: a sixth determining module, configured to determine an inspection keyword according to the drawing inspection standard; a seventh determining module, configured to determine whether the check keyword exists in the printing drawing; an eighth determining module, configured to determine that the printing drawing meets a standard when the inspection keyword exists in the printing drawing; and a ninth determining module, configured to determine that the printing drawing does not meet the standard if the inspection keyword does not exist in the printing drawing. The embodiment realizes automatic detection of the position with high error rate in the printing drawing, further ensures that the finally determined printing drawing is correct, has higher quality, and reduces the time and labor cost spent in manual detection.
The inspection keywords are obtained by summarizing the characters which are easy to make mistakes in the actual typesetting of the printed matters of the products, the inspection keywords comprise the frequently made mistakes keyword information, and the keywords corresponding to different products are different. Of course, there may be errors in printing formats, graphic positions, number of graphics, graphic sizes, and other factors in addition to the above-described text errors, and thus, the above-described calling unit may further include, in addition to the above-described scheme: the second extraction module is used for extracting at least part of the following information from the printing drawing to obtain the extracted information: the number of graphics, the position of graphics, the size of graphics, the position of characters, the number of characters, the overlapping condition between graphics and the overlapping condition of characters; the comparison module is used for comparing the extracted information with the drawing inspection standard, and determining that the printing drawing accords with the standard under the condition that the extracted information is the same as the corresponding item in the drawing inspection standard; and a tenth determining module, configured to determine that the printing drawing does not meet the standard if the extracted information is not identical to the corresponding item of the drawing inspection standard sheet.
When the extracted information includes the number of graphics, the number of graphics whose corresponding item in the drawing inspection standard is the same as that of other extracted information, and will not be described in detail here.
Specifically, the above-mentioned comparison process for determining whether the check keyword exists in the printing drawing may be implemented by using logic judgment sentences such as Ruby and python.
In order to further ensure the correctness of the finally determined printing drawing, the device specifically further comprises: the second display unit is used for displaying the printing drawing, the drawing inspection standard and a first selection mark on the display screen under the condition that the printing drawing accords with the standard, wherein the first selection mark is a mark for representing whether the printing drawing is uploaded and/or stored; and the uploading unit is used for uploading and/or storing the printing drawing in response to a third preset operation acted on the first selection mark. In this embodiment, after the printing drawing is detected to be qualified, the printing drawing, the drawing inspection standard and the first selection identifier are displayed on the display screen, so that related personnel can manually check the printing drawing for the second time compared with the drawing inspection standard, the problem of missed judgment is avoided, the typesetting quality of the printing drawing is further ensured to be higher, and after the fact that the printing drawing is determined to be non-problematic, the qualified printing drawing is uploaded to the system or stored locally through operating the first selection identifier.
Specifically, the first, second, and third predetermined operations described above may each include one of: clicking, double clicking, long pressing, sliding, hooking and the like.
According to some other embodiments of the application, the apparatus further comprises: a creation unit configured to create an initial printing format and a plurality of typesetting annotations before determining the printing content and the target printing format on the printing template according to the product information, the initial printing format including a plurality of typesetting areas; the setting unit is used for setting the mapping relation between each typesetting region and the typesetting annotation in the setting patterns of a plurality of products, wherein the products comprise the target products; the generating unit is used for generating a printing format corresponding to each product according to the mapping relation and the initial printing format, wherein the printing formats comprise the target printing format; and the sending unit is used for sending the printing formats to a preset address, wherein the preset address comprises a preset mailbox. By the method, the automatic construction of the printing format set is realized, the problems of low efficiency, complicated signature and examination flow, slow issuing and the like of manually compiling the printing format set are effectively avoided, the degree of automation of the typesetting and printing process is further improved, and the labor cost is further reduced.
The preset mailbox is a mailbox of an auditor of the printing format, and the auditor can conveniently generate a preview view of the printing format by sending the generated printing format to the mailbox of the auditor, so that the printing format is checked, and the printing format is stored in a printing format library under the condition that the checking is free of problems, so that the subsequent automatic typesetting is convenient to call; when the problem is checked, the printing format is directly and manually adjusted or modified, and the adjusted or modified printing format is stored in a printing format library.
Besides the preset mailbox, the preset address can also be a cloud end, and the auditor obtains the printing format by accessing the cloud end.
In addition, the product information, the corresponding printing content, the corresponding printing format and the corresponding drawing inspection standard of each product are all stored in documents in the format of HTML/XML and the like in an associated mode, and after the product is determined, the device can automatically extract or call the corresponding printing content and the corresponding printing format of the corresponding product in the third party library through inputting the product information. Determining the printing content and the target printing format on the printing template according to the product information, wherein the method comprises the following steps: and calling the printing content corresponding to the product information and the target printing format from the document by using websites such as BS4 (Beautiful Soup), requests (HTTP library) and the like. According to the product information, retrieving drawing inspection standards corresponding to the target product from a database may include: and calling the drawing inspection standard corresponding to the product information from the document by using websites such as BS4 and Requests.
According to the scheme for calling the information in the document through the third party library, different third party libraries can be accessed in a cross-platform mode through an interface provided in an OS module of Python.
The automatic typesetting device comprises a processor and a memory, wherein the acquisition unit, the first determination unit, the second determination unit, the calling unit, the identification unit and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions. The modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problem of low generation efficiency of the printed matter in the prior art is at least solved by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, which comprises a stored program, wherein the program is controlled to control equipment where the computer readable storage medium is located to execute the automatic typesetting method.
Specifically, the automatic typesetting method includes:
step S201, obtaining product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
step S202, determining the printing content and the target printing format on the printing template according to the product information;
step S203, determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
step S204, according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
Step S205, when the printing drawing does not meet the standard, marking a non-meeting position in the printing drawing, and displaying the printing drawing marked with the non-meeting position and the drawing inspection standard on a display screen.
The embodiment of the invention provides a processor, which is used for running a program, wherein the automatic typesetting method is executed when the program runs.
Specifically, the automatic typesetting method includes:
step S201, obtaining product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
step S202, determining the printing content and the target printing format on the printing template according to the product information;
step S203, determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
step S204, according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
Step S205, when the printing drawing does not meet the standard, marking a non-meeting position in the printing drawing, and displaying the printing drawing marked with the non-meeting position and the drawing inspection standard on a display screen.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes at least the following steps when executing the program:
step S201, obtaining product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
step S202, determining the printing content and the target printing format on the printing template according to the product information;
step S203, determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
step S204, according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
Step S205, when the printing drawing does not meet the standard, marking a non-meeting position in the printing drawing, and displaying the printing drawing marked with the non-meeting position and the drawing inspection standard on a display screen.
The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with at least the following method steps:
step S201, obtaining product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
step S202, determining the printing content and the target printing format on the printing template according to the product information;
step S203, determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
step S204, according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
Step S205, when the printing drawing does not meet the standard, marking a non-meeting position in the printing drawing, and displaying the printing drawing marked with the non-meeting position and the drawing inspection standard on a display screen.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
the application provides an automatic typesetting method, which can automatically typeset printing contents according to product information and size information of a printing template to obtain a printing drawing of a product; in addition, the application also automatically detects the generated printing drawing, determines whether the generated printing drawing meets the standard requirement, marks the non-conforming position of the printing drawing and displays the marked printing drawing and drawing inspection standard under the condition of non-conforming, thereby facilitating personnel review and modification of the non-conforming position, realizing automatic detection and automatic test of the printing drawing and solving the problem of lower printing product generation efficiency caused by manually arranging and inspecting the printing drawing in the prior art.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. An automatic typesetting method, comprising:
acquiring product information and size information of a printing template, wherein the product information is information of a target product of a corresponding mark of a printed matter, and the printed matter is the printing template printed with a printing drawing;
determining printing content and a target printing format on the printing template according to the product information;
determining the size and arrangement information of the printing content according to the target printing format and the size information, and typesetting the printing content according to the size and the arrangement information of the printing content to obtain the printing drawing;
according to the product information, drawing inspection standards corresponding to the target product are called from a database, and whether the printing drawing accords with the standards is determined according to the drawing inspection standards and the printing drawing;
And under the condition that the printing drawing does not accord with the standard, marking a non-accord position in the printing drawing, and displaying the printing drawing marked with the non-accord position and the drawing inspection standard on a display screen.
2. The method of claim 1, wherein obtaining dimensional information of the printing template comprises:
under the condition that the printing template exists in a preset area, controlling an image acquisition device to acquire initial image information comprising the printing template;
extracting edges of the initial image information to obtain an image of the printing template;
determining the number of pixels occupied by the printing template according to the image of the printing template;
and determining the size information according to the pixel number and the image resolution of the image acquisition device.
3. The method of claim 1, wherein the printed content comprises text and objects, the objects comprising at least one of graphics, tables, and symbols, and wherein determining the size and arrangement information of the printed content based on the target print layout and the size information comprises:
determining a text region, a font of the text, typesetting of the text in the text region and an object region according to the target printing format;
Determining the word size of the words according to the word area, the words, the word patterns of the words, the typesetting of the words in the word area and the size information;
and determining the size of the object according to the object area.
4. A method according to claim 3, wherein the text comprises keywords and non-keywords, the keywords being different from the non-keywords in word size and/or font, and typesetting the printed content according to the size of the printed content and the arrangement information to obtain the printed drawing, comprising:
according to the typesetting and the word size and the word shape of the non-key words, arranging the words in the word area;
arranging the objects in the object area according to the size of the objects;
and adjusting the word size and/or the character shape of the keywords in the character area to obtain the printing drawing.
5. The method of any one of claims 1 to 4, wherein after identifying a non-conforming location in the printed drawing and displaying the printed drawing and the drawing inspection standard with the non-conforming location identified on a display screen, the method further comprises:
Displaying a first editing area at a predetermined position of the printing drawing in response to a second predetermined operation acting at the predetermined position, the predetermined position including the non-conforming position;
and replacing the information of the predetermined position with modified information in response to a modification operation acting on the first editing area.
6. The method of any one of claims 1 to 4, wherein determining whether the printing drawing meets a standard based on the drawing inspection standard and the printing drawing comprises:
determining an inspection keyword according to the drawing inspection standard;
determining whether the check keyword exists in the printing drawing;
under the condition that the inspection keywords exist in the printing drawing, determining that the printing drawing meets the standard;
and under the condition that the check key word does not exist in the printing drawing, determining that the printing drawing does not accord with the standard.
7. The method according to any one of claims 1 to 4, wherein in case the printing drawing is standard, the method further comprises:
displaying the printing drawing, the drawing inspection standard and a first selection identifier on the display screen, wherein the first selection identifier is an identifier for representing whether to upload and/or store the printing drawing;
The printing paper is uploaded and/or stored in response to a third predetermined operation acting on the first selection indicator.
8. The method according to any one of claim 1 to 4, wherein, in the step of obtaining the product information,
before determining the print content on the printing template and the target printing format, the method further comprises:
creating an initial printing format and a plurality of typesetting annotations, wherein the initial printing format comprises a plurality of typesetting areas;
establishing a mapping relation between each typesetting region and the typesetting annotation in a set style of a plurality of products, wherein the plurality of products comprise the target product;
generating a printing format corresponding to each product according to the mapping relation and the initial printing format, wherein the printing formats comprise the target printing format;
and sending the plurality of printing formats to a preset address, wherein the preset address comprises a preset mailbox.
9. The method of any one of claims 1 to 4, wherein the printed matter comprises a product nameplate, the product information comprises a product model and/or a product code, and the target print layout comprises a target layout and a target layout.
10. An electronic device, comprising: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-9.
CN202310732946.6A 2023-06-19 2023-06-19 Automatic typesetting method and electronic equipment Pending CN116702703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310732946.6A CN116702703A (en) 2023-06-19 2023-06-19 Automatic typesetting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310732946.6A CN116702703A (en) 2023-06-19 2023-06-19 Automatic typesetting method and electronic equipment

Publications (1)

Publication Number Publication Date
CN116702703A true CN116702703A (en) 2023-09-05

Family

ID=87840800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310732946.6A Pending CN116702703A (en) 2023-06-19 2023-06-19 Automatic typesetting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116702703A (en)

Similar Documents

Publication Publication Date Title
US10915788B2 (en) Optical character recognition using end-to-end deep learning
JP6507472B2 (en) Processing method, processing system and computer program
US10671805B2 (en) Digital processing and completion of form documents
EP3712812A1 (en) Recognizing typewritten and handwritten characters using end-to-end deep learning
US9400806B2 (en) Image triggered transactions
US9418315B1 (en) Systems, methods, and computer readable media for extracting data from portable document format (PDF) files
CN110751143A (en) Electronic invoice information extraction method and electronic equipment
CN105631393A (en) Information recognition method and device
US9298685B2 (en) Automatic creation of multiple rows in a table
US10482170B2 (en) User interface for contextual document recognition
CN108334484B (en) Data entry method and device
US20210133645A1 (en) Automated generation of documents and labels for use with machine learning systems
CN107193467B (en) Method and equipment for displaying intelligent pen writing content
JP2019079347A (en) Character estimation system, character estimation method, and character estimation program
CN107908843B (en) Management system based on drawing of map label information
CN109656652B (en) Webpage chart drawing method, device, computer equipment and storage medium
CN113779656A (en) Stamping method, electronic file platform and computer readable storage medium
CN112199929A (en) Form processing method and device, storage medium and electronic equipment
CN107168635A (en) Information demonstrating method and device
CN116702703A (en) Automatic typesetting method and electronic equipment
CN115828856A (en) Test paper generation method, device, equipment and storage medium
CN114724170A (en) BOM generation method and device, electronic equipment and storage medium
CN111046096A (en) Method and device for generating image-text structured information
CN110457659B (en) Clause document generation method and terminal equipment
CN112784780B (en) Review method, review device, computer equipment 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