Detailed Description
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 is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present application and in the foregoing figures, 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 or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of an inkjet printing method for a printed circuit board according to an embodiment of the present application, where the method may be performed by an inkjet printing apparatus for a printed circuit board, and the apparatus may be implemented in hardware and/or software. As shown in fig. 1, the method includes:
step S101, an original vector diagram to be printed is obtained, and the type of the original vector diagram is identified and determined.
Specifically, in this embodiment, after the original vector image is obtained, the type of the original vector image is identified, and when it is determined that the original vector image includes a specified element, for example, a closed shape, the closed shape is extremely easy to undergo ink fusion when performing subsequent printing, so that the interiors of the closed shapes are all fused, and the recognition of the printing result is difficult.
Optionally, identifying the original vector image to determine the type of the original vector image includes: obtaining a vector diagram type list, wherein the vector diagram type list comprises the corresponding relation between a vector diagram and a type; inquiring from the vector diagram type list according to the original vector diagram to obtain the type corresponding to the original vector diagram; the queried type is taken as the type of the original vector diagram.
Optionally, before identifying the original vector diagram and determining the type of the original vector diagram, the method further includes: obtaining sample data, wherein the sample data comprises a corresponding relation between a vector diagram and a type; training through sample data to obtain a type identification model; identifying the original vector diagram to determine the type of the original vector diagram comprises the following steps: inputting the original vector diagram into a type recognition model; and identifying the original vector diagram through a type identification model, and determining the type of the original vector diagram according to the identification result.
The types of the original vector diagrams comprise characters or symbols, and various modes can be adopted when the types of the original vector diagrams are identified, wherein the first mode is to acquire the types of the original vector diagrams by querying a vector diagram type list; the second way is to identify the type of the original vector image by a pre-trained type identification model, and the specific way of obtaining the type of the original vector image is not limited in this embodiment.
In a specific implementation, when the type of the original vector diagram is acquired by adopting a mode of inquiring the vector diagram type list, particularly, the vector diagram type list is acquired, and the corresponding relation between the vector diagram and the type is contained in the vector diagram type list, so that after the original vector diagram is acquired, the type of the original vector diagram can be quickly acquired through inquiring the vector diagram type list, each vector diagram with relatively high printing times is contained in the vector diagram type list, and the types of each vector diagram particularly comprise two types of characters or symbols. Table 1 below is an example of a table of acquired vector diagram type classes:
TABLE 1
However, table 1 is merely an example, and the specific contents of the vector diagram included in table 1 are not limited in this embodiment.
In another specific implementation, in this embodiment, the training of the model may be performed by using sample data marked with a correspondence between the vector image and the type, and the type recognition model may be obtained through training, where a BP neural network algorithm may be used in performing the training, and the type of the obtained type recognition model may be specifically a BP neural network model. Therefore, after the type recognition model is obtained through training, the original vector diagram can be recognized through the type recognition model, so that the type of the original vector diagram can be quickly obtained. For example, when the original vector diagram "4" is input into the type recognition model, the type of the original vector diagram can be quickly obtained to be text.
In step S102, when it is determined that the specified element is included in the original vector diagram, primitive reduction processing is performed on the original vector diagram according to the type to acquire an adjustment vector diagram.
Optionally, performing primitive reduction processing on the original vector diagram according to the type to obtain an adjustment vector diagram, including: when the type is determined to be a text, acquiring the current font of the original vector diagram; acquiring a target font simplified than the current font from a font library, and carrying out font replacement on an original vector image according to the target font to acquire an updated vector image; and determining an adjustment vector diagram according to the updated vector diagram.
Optionally, determining the adjustment vector diagram according to the updated vector diagram includes: judging whether the updated vector diagram further comprises a closed shape, if so, adjusting the closed shape in the updated vector diagram into an open shape to obtain an adjusted vector diagram, otherwise, directly taking the updated vector diagram as the adjusted vector diagram.
Specifically, in this embodiment, after the original vector diagram is obtained, the original vector diagram is checked to determine whether a specified element, such as a closed shape, is included in the original vector diagram. When it is determined that the closed shape is included in the original vector image, primitive reduction processing is performed on the original vector image according to the type to acquire an adjustment vector image. When the type of the original vector diagram is determined to be text, for example, when the original vector diagram is "4", since a closed triangle exists and the type is text, the current font of the original vector diagram is acquired, and a target font simplified than the current font is acquired from a font library, for example, the updated vector diagram is acquired by changing the font of the original vector diagram according to the acquired target font, thus, the updated vector diagram can be obtained, the upper vertex angle of the closed triangle in the updated vector diagram is opened, and thus the closed triangle is converted into an open shape, and in this case, the updated vector diagram is directly used as an adjustment vector diagram. It can be seen that the adjustment vector image has a reduced number of primitives for the region to be printed relative to the original vector image, and thus the primitive density for the region to be printed has also been reduced. In addition, for the original vector diagram of the text type, there may be a case that the closed shape cannot be canceled even if the font is changed, in which case it is necessary to newly adjust the closed shape in the updated vector diagram to the open shape to obtain the adjusted vector diagram. From the above, it can be known that, for the original vector diagram of the text type, since the font changing mode is simpler and more convenient, the font changing can be performed first, and when the closed shape is cancelled indirectly by the font changing mode, the subsequent adjustment of the closed shape is not needed, thereby improving the adjustment efficiency.
Optionally, performing primitive reduction processing on the original vector diagram according to the type to obtain an adjustment vector diagram, including: when the type is determined to be a symbol, directly adjusting the closed shape in the original vector diagram to be an open shape; and obtaining an adjustment vector diagram according to the adjustment result.
Optionally, directly adjusting the closed shape in the original vector diagram to an open shape includes: determining an open position for the closed shape in the original vector diagram; the closed shape is opened in the open position to adjust the closed shape to the open shape.
When the type of the original vector diagram is determined to be a symbol, the symbol has no concept of font relative to the text, so that the change of the closed shape cannot be realized by a font changing mode, and therefore, an open position needs to be determined on the closed shape, and the closed shape is opened at the open position so as to be adjusted to the open shape. The principle of the open position selection is that the basic meaning of the original vector diagram is not affected when the open position is opened, for example, when the original vector diagram is formed by two adjacent closed shapes, the connection place of the two closed shapes cannot be used as the open position because if the open position is opened, the meaning of the original vector diagram is completely changed. Of course, the present embodiment is merely an example, and the user may set the selection mode of the opening position in advance according to the actual requirement, and the present embodiment is not limited thereto.
Step S103, converting the adjustment vector diagram into a bitmap, and performing inkjet printing of the printed circuit board according to the bitmap.
Specifically, in this embodiment, after the adjustment vector image is obtained, since the density of the pixels in the area to be printed in the adjustment vector image is reduced, after the adjustment vector image is converted into the bitmap, the density of the pixels in the area to be printed in the bitmap is also reduced correspondingly, so when the inkjet printing of the printed circuit board is performed according to the converted bitmap, the density of the pixels in the area to be printed is reduced, the intensity of ink fusion can be effectively reduced, the printing effect of the image is improved, the identifiability of the printing result is obviously enhanced, and the situation that "0" is printed to "1" is avoided. When converting the vector image into the bitmap, a plurality of conversion modes may be adopted, and the embodiment is not limited to a specific conversion mode, and the conversion process from the vector image to the bitmap is not an important point of the present application, so that a detailed description is not provided in the embodiment.
According to the embodiment of the application, when the original vector image is determined to comprise the closed shape, the original vector image is subjected to the primitive reduction processing to obtain the adjustment vector image and then is converted into the bitmap, and the pixels to be printed in the corresponding bitmap are reduced under the condition of primitive reduction, so that the interference of the ink-jet printing characteristics such as ink fusion on the printing result is reduced, and the recognition of the printing result is improved.
Example two
Fig. 2 is a flowchart of an inkjet printing method for a printed circuit board according to a second embodiment of the present application, where the embodiment is based on the above embodiment, and after performing inkjet printing on the printed circuit board according to a bitmap, the method further includes: and detecting the ink jet printing result of the printed circuit board. The same terms as those of the above embodiments are not repeated herein. As shown in fig. 2, the method includes:
step S201, an original vector diagram to be printed is obtained, and the type of the original vector diagram is identified and determined.
Optionally, identifying the original vector image to determine the type of the original vector image includes: obtaining a vector diagram type list, wherein the vector diagram type list comprises the corresponding relation between a vector diagram and a type; inquiring from the vector diagram type list according to the original vector diagram to obtain the type corresponding to the original vector diagram; the queried type is taken as the type of the original vector diagram.
Optionally, before identifying the original vector diagram and determining the type of the original vector diagram, the method further includes: obtaining sample data, wherein the sample data comprises a corresponding relation between a vector diagram and a type; training through sample data to obtain a type identification model; identifying the original vector diagram to determine the type of the original vector diagram comprises the following steps: inputting the original vector diagram into a type recognition model; and identifying the original vector diagram through a type identification model, and determining the type of the original vector diagram according to the identification result.
In step S202, when it is determined that the specified element is included in the original vector diagram, primitive reduction processing is performed on the original vector diagram according to the type to acquire an adjustment vector diagram.
Optionally, performing primitive reduction processing on the original vector diagram according to the type to obtain an adjustment vector diagram, including: when the type is determined to be a text, acquiring the current font of the original vector diagram; acquiring a target font simplified than the current font from a font library, and carrying out font replacement on an original vector image according to the target font to acquire an updated vector image; and determining an adjustment vector diagram according to the updated vector diagram.
Optionally, determining the adjustment vector diagram according to the updated vector diagram includes: judging whether the updated vector diagram further comprises a closed shape, if so, adjusting the closed shape in the updated vector diagram into an open shape to obtain an adjusted vector diagram, otherwise, directly taking the updated vector diagram as the adjusted vector diagram.
Optionally, performing primitive reduction processing on the original vector diagram according to the type to obtain an adjustment vector diagram, including: when the type is determined to be a symbol, directly adjusting the closed shape in the original vector diagram to be an open shape; and obtaining an adjustment vector diagram according to the adjustment result.
Optionally, directly adjusting the closed shape in the original vector diagram to an open shape includes: determining an open position for the closed shape in the original vector diagram; the closed shape is opened in the open position to adjust the closed shape to the open shape.
Step S203, converting the adjustment vector diagram into a bitmap, and performing inkjet printing of the printed circuit board according to the bitmap.
In step S204, the inkjet printing result of the printed circuit board is detected.
In this embodiment, after the inkjet printing of the printed circuit board is performed according to the bitmap, the inkjet printing result is detected, and the specific detection mode may be to score the printing result by an image recognition mode, where the clearer the inkjet printing result, the higher the corresponding score. In this embodiment, an alarm score is preset, and when it is determined that the score corresponding to the result of inkjet printing is smaller than the alarm score, it is indicated that the effect of inkjet printing on the current bitmap is extremely poor, and it is difficult for the user to perform effective recognition. The reasons for the above may be that the process of adjusting the vector image is wrong, or that the manner of converting the vector image into a bitmap is wrong, or that the printing apparatus is malfunctioning, and the reasons for the above result are not limited in this embodiment.
When the score corresponding to the ink-jet printing result is smaller than the early warning score, alarm information is generated and displayed for the user to check, so that the user can conveniently and timely maintain equipment or software according to the alarm information, and the accuracy of the ink-jet printing result is further improved.
According to the embodiment of the application, when the original vector image is determined to comprise the closed shape, the original vector image is subjected to the primitive reduction processing to obtain the adjustment vector image and then is converted into the bitmap, and the pixels to be printed in the corresponding bitmap are reduced under the condition of primitive reduction, so that the interference of the ink-jet printing characteristics such as ink fusion on the printing result is reduced, and the recognition of the printing result is improved.
Example III
Fig. 3 is a schematic structural diagram of an inkjet printing apparatus for a printed circuit board according to a third embodiment of the present application. As shown in fig. 3, the apparatus includes: a type determination module 310, an adjustment vector diagram acquisition module 320, and a printing module 330.
A type determining module 310, configured to obtain an original vector diagram to be printed, and identify the original vector diagram to determine a type of the original vector diagram, where the type includes text or symbols;
an adjustment vector diagram obtaining module 320, configured to, when it is determined that the original vector diagram includes a specified element, perform primitive reduction processing on the original vector diagram according to a type to obtain an adjustment vector diagram, where the specified element includes a closed shape;
and the printing module 330 is used for converting the adjustment vector diagram into a bitmap and performing inkjet printing of the printed circuit board according to the bitmap.
Optionally, the type determining module is configured to obtain a vector diagram type list, where the vector diagram type list includes a correspondence between a vector diagram and a type;
inquiring from the vector diagram type list according to the original vector diagram to obtain the type corresponding to the original vector diagram;
the queried type is taken as the type of the original vector diagram.
Optionally, the device further comprises a type recognition model acquisition module, which is used for acquiring sample data, wherein the sample data comprises a corresponding relation between the vector diagram and the type;
training through sample data to obtain a type identification model;
the type determining module is used for inputting the original vector diagram into a type recognition model;
and identifying the original vector diagram through a type identification model, and determining the type of the original vector diagram according to the identification result.
Optionally, the adjustment vector diagram obtaining module is configured to obtain a current font of the original vector diagram when the type is determined to be text;
acquiring a target font simplified than the current font from a font library, and carrying out font replacement on an original vector image according to the target font to acquire an updated vector image;
and determining an adjustment vector diagram according to the updated vector diagram.
Optionally, the adjustment vector diagram obtaining module is further configured to determine whether the updated vector diagram further includes a closed shape, if so, adjust the closed shape in the updated vector diagram to an open shape to obtain an adjustment vector diagram,
otherwise, the updated vector diagram is directly used as an adjustment vector diagram.
Optionally, the adjustment vector diagram obtaining module is configured to directly adjust a closed shape in the original vector diagram to an open shape when the type is determined to be a symbol;
and obtaining an adjustment vector diagram according to the adjustment result.
Optionally, the adjustment vector diagram acquisition module is further configured to determine an open position for the closed shape in the original vector diagram;
the closed shape is opened in the open position to adjust the closed shape to the open shape.
The inkjet printing device for the printed circuit board provided by the embodiment of the application can execute the inkjet printing method for the printed circuit board provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM12 and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the inkjet printing method of a printed circuit board.
In some embodiments, the inkjet printing method of the printed circuit board may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the inkjet printing method of a printed circuit board described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the inkjet printing method of the printed circuit board in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present application are achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.