Printing method, printing device and storage medium

By setting up multiple printhead groups in the printing device, each using a different type of ink, and combining media recognition and coordinate information, the problem of single ink type in existing devices is solved, enabling efficient printing of multiple ink types, reducing costs and improving print quality.

CN119636270BActive Publication Date: 2025-10-28TAI LI DE SHI DA YIN JI JIANG MEN YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411550831.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-10-28
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

Existing printing equipment typically only supports one type of ink, requiring users to have multiple devices to meet the printing needs of different inks, resulting in low printing efficiency and increased machine costs.

Method used

A printing device is equipped with multiple printhead groups, each using a different type of ink. By identifying the type of printing media and coordinate information, the appropriate printhead group is selected for printing, thus enabling printing with multiple types of ink.

Benefits of technology

It enables printing needs for different types of inks to be met on a single device, improving printing efficiency, reducing machine costs, and enhancing print quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119636270B_ABST
    Figure CN119636270B_ABST
Patent Text Reader

Abstract

The printing method provided in this application is applied to a printing device including a printhead module, which has multiple printhead groups using different inks. The printing method includes: acquiring the content to be printed and its coordinate information in the printing medium; determining the printing area based on the coordinate information; identifying the printing medium type of the printing area; determining the printing ink information based on the printing medium type; and controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information. After determining the printing area for printing the content to be printed based on its coordinate information in the printing medium, the printing medium type is determined. The printing ink information can then be determined based on the printing medium type, and multiple printhead groups of the printing device can be called for printing based on the printing ink information. Using a separate device, the needs for printing with different types of printing media can be met, saving costs, improving efficiency, and enhancing print quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of printing technology, and in particular to a printing method, apparatus and storage medium. Background Technology

[0002] Currently, the conventional pigment inks used in inkjet printing modules for ID card production are of two types: ultraviolet (UV) curing inks and water-based inks. UV inks offer the advantage of high stability; their unique UV LED curing method allows for almost instant curing of the printed image, resulting in excellent printing quality on smooth polymer resin cards. Water-based inks, used in paper-based ID card printing, offer advantages such as high brightness, strong tinting strength, and fast drying speed, while also having lower production costs.

[0003] However, to meet the diverse needs of users, since current printing devices generally only support one type of ink, when printing tasks that require different inks are needed, users need to prepare multiple inkjet printers that support different types of inks for each printing medium or requirement, resulting in low printing efficiency and increased machine equipment costs. Summary of the Invention

[0004] This application provides a printing method, apparatus, and storage medium, the main purpose of which is to enable multi-type ink printing functions through a separate device, thereby saving costs, improving efficiency, and enhancing print quality.

[0005] In a first aspect, embodiments of this application provide a printing method applied to a printing device, the printing device including a printhead module, the printhead module being provided with multiple printhead groups using different inks;

[0006] The printing method includes:

[0007] Obtain the content to be printed and its coordinate information in the printing medium, and determine the printing area based on the coordinate information;

[0008] Identify the printing media type of the printing area, and determine the printing ink information based on the printing media type;

[0009] Based on the printing ink information, the printhead module is controlled to select the corresponding printhead group to print the content to be printed.

[0010] According to some printing methods provided in the embodiments of this application, identifying the printing medium type of the printing area includes:

[0011] A first image of the printing area is obtained, and media feature information is extracted from the first image to obtain the media feature information of the printing area.

[0012] Based on the media characteristic information, the printing media type of the printing area is identified.

[0013] According to some printing methods provided in embodiments of this application, the printing device further includes an image acquisition module and a light sensor, wherein acquiring a first image of the printing area includes:

[0014] The light sensor is invoked to acquire light information of the image acquisition environment, and the image acquisition parameters of the image acquisition module are adjusted according to the light information.

[0015] The image acquisition module, after adjusting the image acquisition parameters, is invoked to acquire the first image.

[0016] According to some printing methods provided in the embodiments of this application, the step of extracting media feature information from the first image to obtain the media feature information of the printing area includes:

[0017] Edge features and shape features are extracted from the printed area in the first image to obtain edge feature information and shape feature information of the printed area;

[0018] Based on the edge feature information and the shape feature information, the first image is separated into a background image to obtain the target image of the printing area;

[0019] Color and texture features are extracted from the target image to obtain the medium feature information of the printing area.

[0020] According to some printing methods provided in the embodiments of this application, identifying the printing media type of the printing area based on the media feature information includes:

[0021] A pre-trained media recognition model is invoked to identify the media in the printed area based on the media feature information, thereby obtaining the printing media type of the printed area;

[0022] The process of training the medium recognition model includes the following steps:

[0023] Obtain media samples and sample labels;

[0024] The medium identification model is trained using the medium samples to obtain the training results;

[0025] Based on the training results and the sample labels, the training loss value is obtained;

[0026] The model parameters of the medium recognition model are corrected based on the training loss value.

[0027] According to some printing methods provided in the embodiments of this application, before controlling the printhead module to select the corresponding printhead group to print the content to be printed, the printing method further includes:

[0028] Based on the image content of the first image, the offset information of the printing area is identified;

[0029] Based on the offset information, the content to be printed is controlled to rotate and offset in order to align with the printing area.

[0030] According to some printing methods provided in the embodiments of this application, the printing area includes a first printing sub-area and a second printing sub-area; the printing ink information includes first printing ink information and second printing ink information, wherein the first printing ink information corresponds to the printing medium type of the first printing sub-area, and the second printing ink information corresponds to the printing medium type of the second printing sub-area; the printhead group includes a first printhead group and a second printhead group.

[0031] The step of controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information includes:

[0032] The first printhead group is invoked to use the first printing ink corresponding to the first printing ink information to print in the first printing sub-area;

[0033] The second printhead group is invoked to use the second printing ink corresponding to the second printing ink information to print in the second printing sub-area.

[0034] According to some printing methods provided in the embodiments of this application, obtaining the content to be printed and the coordinate information of the content to be printed in the printing medium includes:

[0035] Obtain the angular coordinate information of the printing medium and establish a coordinate system;

[0036] The content to be printed is arranged in the coordinate system, and the coordinate information of the content to be printed in the coordinate system is determined.

[0037] Secondly, embodiments of this application provide a printing device, including:

[0038] At least one processor;

[0039] At least one memory for storing at least one program;

[0040] The printing method as described in the first aspect of the embodiments of this application is implemented when at least one of the programs is executed by at least one of the processors.

[0041] Thirdly, embodiments of this application provide a computer-readable storage medium storing a processor-executable computer program, which, when executed by a processor, is used to implement the printing method as described in the first aspect of embodiments of this application.

[0042] The embodiments of this application include at least the following beneficial effects:

[0043] The printing method provided in this application is applied to a printing device including a printhead module, which has multiple printhead groups using different inks. The printing method includes: acquiring the content to be printed and its coordinate information in the printing medium; identifying the printing area based on the coordinate information; identifying the printing medium type of the printing area; determining printing ink information based on the printing medium type; and controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information. By determining the printing area for printing the content based on its coordinate information in the printing medium, and then determining its printing medium type, the printing ink information can be determined based on the printing medium type. Multiple printhead groups of the printing device can then be called for printing based on the printing ink information. Using a separate device, the needs for printing with different types of printing media can be met, saving costs, improving efficiency, and enhancing print quality.

[0044] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description

[0045] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0046] Figure 1 This is a schematic diagram illustrating the steps of a printing method provided in an embodiment of this application;

[0047] Figure 2 This is a schematic diagram illustrating the specific steps of step S110 in the embodiments of this application;

[0048] Figure 3 This is a schematic diagram illustrating a step for determining the type of printing media provided in an embodiment of this application;

[0049] Figure 4 This is a schematic diagram illustrating the steps of extracting media feature information according to an embodiment of this application;

[0050] Figure 5This is a schematic diagram of the shape of a printing area provided in an embodiment of this application;

[0051] Figure 6 This is a schematic diagram illustrating the pre-training steps of a media recognition model provided in an embodiment of this application;

[0052] Figure 7 This is a schematic diagram of the structure of a printing device provided in an embodiment of this application. Detailed Implementation

[0053] The present application will be further described below with reference to the accompanying drawings and specific embodiments. The described embodiments should not be considered as limitations on the present application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present application.

[0054] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0056] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0057] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, pre-trained model technology, operating / interactive systems, and mechatronics. Pre-trained models, also known as large models or foundational models, can be widely applied to downstream tasks in various AI fields after fine-tuning. AI software technologies mainly include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0058] "Printing media" generally refers to the material a printer uses to output documents or images. Depending on the application, printing media can take many forms; common printing media include:

[0059] 1. Paper: This includes general office paper suitable for most everyday printing tasks; glossy paper for printing photos that require high resolution; matte paper suitable for artistic or professional photo printing because it reduces glare; card stock for making invitations, greeting cards, etc.; and photo paper specially designed for high-quality photo printing, available in different thicknesses and gloss levels.

[0060] 2. Transparent film: Commonly used to create slides for projectors or transparent charts for presentations;

[0061] 3. Fabrics and textiles: Special printers can be used to print designs on fabrics, commonly seen in personalized T-shirts, flags, etc.

[0062] 4. Metal, wood, plastic, etc.: Some professional industrial-grade printers can print directly on these surfaces, suitable for specific industries such as manufacturing and decoration.

[0063] Each type of printing media has its optimal printing settings, including print resolution and ink type, to ensure the best possible final print quality.

[0064] Printing inks mainly include water-based inks, solvent-based inks, and UV inks. Water-based inks are commonly used in inkjet printers in homes and offices, suitable for printing long-term preserved documents and photos on paper media. They offer advantages such as high brightness, strong coloring power, fast drying, and low cost. Solvent-based inks are mainly used in wide-format printers, suitable for signage and outdoor advertising, and have good resistance to ultraviolet light and water. UV-cured inks have high stability, and their unique ultraviolet LED curing method can cure printed images almost instantly, achieving good printing results on smooth polymer resin cards.

[0065] Currently, the conventional pigment inks used in inkjet printing modules for ID card production are of two types: ultraviolet (UV) curing inks and water-based inks. UV inks offer the advantage of high stability; their unique UV LED curing method allows for almost instant curing of the printed image, resulting in excellent printing quality on smooth polymer resin cards. Water-based inks, used in paper-based ID card printing, offer advantages such as high brightness, strong tinting strength, and fast drying speed, while also having lower production costs.

[0066] However, to meet the diverse needs of users, since current printing devices generally only support one type of ink, when printing tasks that require different inks are needed, users need to prepare multiple inkjet printers that support different types of inks for each printing medium or requirement, resulting in low printing efficiency and increased machine equipment costs.

[0067] Based on this, embodiments of this application provide a printing method, a printing device, and a storage medium, aiming to enable printing on multiple media using a separate printing device, improve the efficiency of printing with different types of inks, and reduce machine costs. First, the printing method provided by embodiments of this application will be introduced.

[0068] Please refer to Figure 1 This is a schematic diagram illustrating the steps of a printing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the printing method provided in this application embodiment is applied to a printing device, which includes a printhead module and a printhead module having multiple printhead groups using different inks; the printing method may include, but is not limited to, steps S110 to S130.

[0069] Step S110: Obtain the content to be printed and its coordinates in the printing medium, and determine the printing area based on the coordinates.

[0070] It is understood that the content to be printed in this embodiment is the content that needs to be printed. The specific content is set by the user. When printing, it is necessary to determine the position of the content to be printed on the printing medium before proceeding with subsequent processing steps. Therefore, this embodiment determines the printing area of ​​the content to be printed on the printing medium through step S110.

[0071] Please refer to Figure 2 The diagram below illustrates the specific steps of step S110 in this embodiment of the application. Figure 2 As shown in the embodiments of this application, step S110, obtaining the content to be printed and the coordinate information of the content to be printed in the printing medium, may include, but is not limited to, steps S111 and S112:

[0072] Step S111: Obtain the angular coordinate information of the printing medium and establish a coordinate system;

[0073] Step S112: Arrange the content to be printed in the coordinate system and determine the coordinate information of the content to be printed in the coordinate system.

[0074] For example, in some feasible embodiments of this application, the actual size of the printing medium is first obtained, and the angular coordinate information is set according to the actual size of the printing medium; for example, if a standard A4 size (210mm*297mm) paper is used as the printing medium, and the origin (0,0) is set as the lower left corner of the printing medium, a coordinate system is established, and then four angular coordinate information are obtained at once:

[0075] Bottom left corner coordinates: (0, 0);

[0076] Bottom right corner coordinates: (210, 0);

[0077] Top left corner coordinates: (0, 297);

[0078] Top right corner coordinates: (210, 297).

[0079] After establishing the coordinate system, the content to be printed is laid out within the coordinate system. Assuming the content to be printed is 90mm*55mm in size and is located in the center of the printing medium, its position is calculated during the layout:

[0080] The center coordinates of the printing medium in the coordinate system are: (210 / 2, 297 / 2) = (105, 148.5);

[0081] The coordinates of the top left corner of the content to be printed are: (center point X coordinate - width of content to be printed / 2, center point Y coordinate - height of content to be printed / 2) = (105 - 45, 148.5 - 27.5) = (60, 121).

[0082] Once the coordinates of the top-left corner of the content to be printed are obtained, all the coordinate information of the content to be printed in the coordinate system can be determined.

[0083] It should be noted that the size of the printing medium used in this embodiment can be set according to actual needs, and is not fixed to the A4 size given in the embodiment. Irregularly shaped printing media can also be used. When using irregularly shaped printing media, its angular coordinates are obtained first to establish a coordinate system, and then the content to be printed is laid out. This embodiment does not impose too many restrictions on the size and shape of the printing medium.

[0084] For example, in a feasible embodiment of this application, when using a circular printing medium, on the one hand, the bottom point can be used as the origin of the coordinate system to obtain the angular coordinates of the lowest point, highest point, leftmost point and rightmost point respectively, and a coordinate system can be established; on the other hand, the diameter can be used as the side length to make a square, with the center point of the square as the center of the circular printing medium, and then the lower left corner of the square can be used as the origin to obtain the coordinates of the four corners of the square and establish a coordinate system.

[0085] Step S110 allows for the quick determination of the printing area of ​​the content to be printed on the printing medium based on the coordinate information of the printing medium. This enables the identification of the medium type of the printing area and the selection of the appropriate ink for printing. After completing step S110, step S120 is then performed.

[0086] Step S120: Identify the printing media type of the printing area and determine the printing ink information based on the printing media type.

[0087] It is understood that in the embodiments of this application, the printing media type of the printing area includes a variety of printing media, and each printing media type has its corresponding optimal printing ink type. By determining the printing ink information, the printhead group using the corresponding ink can be controlled to print when printing the content to be printed.

[0088] Please refer to Figure 3 This is a schematic diagram illustrating a step for determining the type of printing media according to an embodiment of this application. In this embodiment, identifying the type of printing media in the printing area may include, but is not limited to, steps S121 and S122:

[0089] Step S121: Obtain the first image of the printing area, extract the media feature information from the first image, and obtain the media feature information of the printing area;

[0090] Step S122: Identify the type of printing media in the printing area based on the media characteristic information.

[0091] The first image of the printing area can be directly acquired by the image acquisition module, which is located in the printing device. The image acquisition module can be a device or component integrated inside the printing device, used to capture image data on the printing medium. It can be a high-precision camera to obtain high-definition image information.

[0092] For example, in this embodiment of the application, the printing device may include an image acquisition module and a light sensor, and step S121 may include the following steps:

[0093] The light sensor is used to obtain the light information of the image acquisition environment, and the image acquisition parameters of the image acquisition module are adjusted according to the light information.

[0094] The image acquisition module with adjusted image acquisition parameters is invoked to obtain the first image.

[0095] It should be noted that, in this embodiment, the light sensor is used to detect changes in light intensity. Specifically, it can be a photodiode, a photoresistor, or an optocoupler. In order to ensure that a clear first image can be obtained in the printing environment, a light sensor is set up to acquire light information.

[0096] Specifically, in a feasible embodiment of this application, if the first image is acquired in low light conditions, the light information of the acquisition environment obtained by the light sensor indicates that the light is low. In this case, the image acquisition parameters of the image acquisition module are adjusted according to the light information. Specifically, the sensitivity or the amount of light entering the image can be increased to avoid the image being too dark and resulting in unclear image features. On the other hand, if the light information of the acquisition environment indicates that the light is too bright, the image acquisition parameters of the image acquisition module are adjusted accordingly. Specifically, the sensitivity or the amount of light entering the image can be decreased to avoid the image being overexposed due to excessive light and thus unable to extract image features.

[0097] In this embodiment, the image sensor is a device capable of acquiring image information. Specifically, a CCD sensor, a CMOS sensor, or an area scan camera or other image acquisition device can be used as the image sensor. After the image acquisition parameters are adjusted, the image acquisition module can acquire the first image of the printing area. The first image can be an image of the printing medium that directly corresponds to the printing area, or it can be an image of part of the printing medium that includes the printing area.

[0098] Once the first image of the printing area is acquired, the media information can be extracted from the first image.

[0099] For example, please refer to Figure 4 This is a schematic diagram illustrating the steps of extracting medium feature information according to an embodiment of this application, as shown below. Figure 4 As shown, in one embodiment of this application, media feature information is extracted from the first image to obtain media feature information of the printed area, which may include, but is not limited to, steps S210 to S230:

[0100] Step S210: Extract edge features and shape features from the printed area in the first image to obtain edge feature information and shape feature information of the printed area.

[0101] Step S220: Separate the background image from the first image based on edge feature information and shape feature information to obtain the target image of the printing area.

[0102] Step S230: Extract color and texture features from the target image to obtain media feature information of the printing area.

[0103] It should be noted that in some embodiments of this application, the edge features of the printing area in the first image are the edges of the content to be printed, and the shape features of the printing area are the shape corresponding to the printing area. For example, when printing content such as a work ID photo, a specific area is delineated in the printing medium. Figure 5 As shown in the figure, the printed area in case 1 is rectangular in shape, and the edge features of the printed area are the edges formed by the printed area and the non-printed area. In this case, by identifying the edge features and shape features of the printed area, the edge feature information of the printed area is the edge of the rectangle, and the shape feature information is the rectangle. In case 2, the printed area is circular in shape, and the edge features of the printed area are the corresponding arcs. In this case, by identifying the edge features and shape features of the printed area, the edge feature information of the printed area is the arc, and the shape feature information is the circle.

[0104] In this embodiment of the application, all images except the printing area are background images. After identifying the edge feature information and shape feature information of the printing area, the target image of the printing area can be directly separated. Then, color features and texture features are further extracted from the target image to obtain the medium feature information of the printing area.

[0105] It is understandable that the media characteristics of different printing areas are different, so the printing media can be distinguished by these characteristics. For example, when the printing media is plastic card, the resulting texture characteristics will be relatively smooth; when leather is used as the printing media, the corresponding leather color can be obtained as the color characteristic information, and the texture characteristics will be the same as the texture of the leather.

[0106] It should be noted that, in the embodiments of this application, the determination of the media type of the printing area is accomplished using an artificial intelligence model. The method for obtaining the printing media type may include, but is not limited to: calling a pre-trained media recognition model, identifying the media of the printing area based on media feature information, and obtaining the printing media type of the printing area.

[0107] The pre-trained media recognition model can use image recognition models and machine learning or deep learning to identify the type of printing media in the printed area, effectively identifying the media type and characteristics within the printed area. This method not only improves the accuracy and speed of recognition but also enhances the system's intelligence and adaptability.

[0108] For example, the medium recognition model used in the embodiments of this application can use a convolutional neural network, including an input layer, a convolutional layer, a normalization layer, a pooling layer, a fully connected layer, and an output layer.

[0109] First, the medium feature information is received through the input layer. The medium feature information may include, but is not limited to, texture feature information and color feature information.

[0110] Secondly, the input medium feature information is convolved by a convolutional layer, and a series of small filters are slid across the input image to extract local features in the image.

[0111] Secondly, the feature map is normalized by a normalization layer, and each data point is standardized to reduce the internal covariate bias, accelerate the convergence speed, and improve the generalization ability of the model.

[0112] Then, the spatial dimension of the feature map is reduced by the pooling layer, the size of the feature map is reduced by downsampling, while important features are preserved and overfitting is reduced. Max pooling selects the maximum value of each pooling window as the output, while average pooling takes the average value.

[0113] Finally, the feature maps generated by the convolutional layers are flattened into one-dimensional vectors by fully connected layers, and then classified or regressed by fully connected neural networks.

[0114] The final output layer produces the final classification result, outputting the obtained print media type.

[0115] Pre-trained media recognition models are typically built upon existing image recognition frameworks, such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs). The specific neural network architecture can be selected based on actual needs, and this application does not impose excessive restrictions on the neural network architecture. After the media recognition model is built, it needs to be pre-trained to obtain a media recognition model that can accurately identify media types.

[0116] For example, please refer to Figure 6 This is a schematic diagram illustrating the pre-training steps of a media recognition model provided in an embodiment of this application, as shown below. Figure 6 As shown in the embodiments of this application, the process of training the medium recognition model may include, but is not limited to, steps S310 and S340:

[0117] Step S310: Obtain the medium sample and sample label;

[0118] Step S320: Train the media recognition model using media samples to obtain the training results;

[0119] Step S330: Obtain the training loss value based on the training results and sample labels;

[0120] Step S340: Correct the model parameters of the medium recognition model based on the training loss value.

[0121] It is understood that in this embodiment, the medium sample refers to an image sample of the printed medium. Each medium sample has a corresponding sample label, which represents the medium type information. The medium recognition model is pre-trained using the medium samples and sample labels. The sample images can include image samples of various different types of media, and the number of samples can be set by the user.

[0122] In this embodiment of the application, after obtaining the medium sample and sample label, preprocessing is required. Specific preprocessing operations may include, but are not limited to:

[0123] Image format standardization: Convert all images to the same format and size, such as 224*224 pixels;

[0124] Grayscale / color conversion: Converting grayscale images to color images to identify color features, or converting color images to grayscale images to better process texture features;

[0125] Normalization: Normalizes the pixel values ​​of an image to the range [0, 1] to aid in model training.

[0126] The medium sample is input into the medium recognition model. After processing by the medium recognition model, the training result is obtained. The training result represents the medium type identified by the medium recognition model for the image sample.

[0127] Once the training results are obtained, the training loss value is calculated based on the training results and the sample labels.

[0128] For example, the training loss value can be determined using the cross-entropy loss method, with the following steps:

[0129] The predicted probability distribution p for model classification is obtained through forward propagation;

[0130] Then, cross-entropy loss is calculated using the predicted probability p and the sample label, as follows:

[0131] L(p,y)=−y*log(p)−(1−y)log(1−p);

[0132] Where L(p,y) is the cross-entropy loss.

[0133] Based on the cross-entropy loss function, the gradient of the loss with respect to the model parameters is calculated, and then the corrected medium recognition model is updated through backpropagation.

[0134] Through pre-training, a pre-trained media recognition model that meets the requirements is obtained, which is used to identify the media type and the printing media type of the printing area.

[0135] Once the printing media type is obtained, the printing ink information can be determined based on the printing media type, and step S130 can be executed.

[0136] Step S130: Based on the printing ink information, control the printhead module to select the corresponding printhead group to print the content to be printed.

[0137] It should be noted that, in this embodiment, the printing area includes a first printing sub-area and a second printing sub-area; the printing ink information includes first printing ink information and second printing ink information, wherein the first printing ink information corresponds to the printing media type of the first printing sub-area and the second printing ink information corresponds to the printing media type of the second printing sub-area; the printhead group includes a first printhead group and a second printhead group;

[0138] The printing media of the first and second printing sub-regions in the printing area are not the same. In this embodiment, some printing media use composite materials. Therefore, two or more different media types are used on the printing media at the same time, so it is necessary to distinguish between different printing areas.

[0139] The first and second print ink information are instructions given to the printhead assembly to print when printing in a sub-region. They include information about the ink used. The ink information included in the first and second print ink information is different, and the first print ink information corresponds to the printing media type of the first sub-region, while the second print ink information corresponds to the printing media type of the second sub-region. When the obtained printing area is the first sub-region, the first print ink information can be determined based on its printing media type; similarly, the second print ink information can be determined. Different print ink information controls different printhead assemblies for printing.

[0140] For example, in this embodiment of the application, controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information includes:

[0141] The first printhead group is invoked to use the first printing ink corresponding to the first printing ink information to print in the first printing sub-area;

[0142] The second printhead group is invoked to use the second printing ink corresponding to the second printing ink information to print in the second printing sub-area.

[0143] Specifically, in a feasible embodiment of this application, the first printing ink is a water-based ink, and the second printing ink is a UV-based ink. When the printing area is identified as the first printing sub-area, the first printhead group is invoked to use the first printing ink corresponding to the first printing ink information to print in the first printing sub-area. At this time, the first printhead group is a water-based ink printhead group, and the medium type of the first printing sub-area can be ordinary paper. When the printing area is identified as the second printing sub-area, the second printhead group is invoked to use the second printing ink corresponding to the second printing ink information to print in the second printing sub-area. At this time, the second printhead group is a UV-based ink printhead group, and the medium type of the second printing sub-area can be a polymer resin material.

[0144] It should be noted that, in one embodiment of this application, the printhead group may further include a third printhead group, the printing area may include a third printing sub-area, the printing ink information includes third printing ink information, and the printing medium type of the third printing ink information corresponds to that of the third printing sub-area.

[0145] The third printhead group can be customized by the user, allowing for flexible use of inks according to user needs, such as anti-counterfeiting inks. The third printing sub-area is also user-defined; its position can be fixed and printed on every print run after user customization, or it can be set to print randomly. The printing process of the third printhead group is controlled by the third printing ink information corresponding to the printing media type of the third printing sub-area.

[0146] For example, in one feasible embodiment of this application, the user sets that a circular anti-counterfeiting mark with a diameter of 5mm needs to be printed in the upper left corner of the printing medium during all printing. At this time, the 5mm diameter area in the upper left corner of the printing medium is the third printing sub-area. During printing, after determining the type of printing medium here, the third printing ink information corresponding to the type of medium in the third printing sub-area is generated, and the third printhead group is controlled to print.

[0147] By dividing the printing area into a first printing sub-area and a second printing sub-area, and determining the printing media corresponding to the first printing sub-area and the second printing sub-area respectively, first printing ink information corresponding to the printing media of the first printing sub-area and second printing ink information corresponding to the printing media of the second printing sub-area are generated. The first printhead group is called for printing based on the first printing ink information, and the second printhead group is called for printing based on the second printing ink information. This allows the printing process to meet the user's needs for printing composite printing media. Printing can be completed with a separate machine, improving printing efficiency and saving printing machine costs.

[0148] By setting the third printhead group, the third printing sub-area, and the third printing ink information corresponding to the media type of the third printing sub-area, users' customized printing needs can be met, and anti-counterfeiting printing effects can be achieved.

[0149] It should be noted that before the printhead control module selects the corresponding printhead group to print the content to be printed, the printing method also includes:

[0150] Based on the image content of the first image, identify the offset information of the printing area;

[0151] Based on the offset information, the content to be printed is rotated and offset to align with the printing area.

[0152] It is understood that, in this embodiment of the application, considering that when placing the printing medium, there may be positional deviation due to placement errors, such as rotational or movement deviation of the printing medium, this embodiment of the application needs to achieve the correction effect by aligning the content to be printed with the printing area of ​​the content to be printed in the printing medium.

[0153] For example, in one embodiment of this application, by acquiring the image content of the first image, the offset information of the printing area is identified. The offset information includes the movement offset information and rotation offset information of the printing area. Specifically, assuming that a positional offset occurs when the printing medium is placed, the printing area of ​​the content to be printed in the printing medium is offset upward by 3mm from the standard position and rotates clockwise by 30°. Based on the determined coordinate information, the offset information is determined, and the offset information of the printing area is identified as (X-axis coordinate of the printing area, Y-axis coordinate of the printing area + 3mm). The 30° clockwise rotation, assuming that the coordinates of the upper left corner of the content to be printed are (60, 121), then the coordinates of the upper left corner of the corrected content to be printed are (60, 124). The 30° clockwise rotation completes the rotation offset of the content to be printed and aligns it with the printing area.

[0154] This application embodiment achieves correct printing of the content to be printed by correcting the offset information before printing, thus avoiding increased printing costs caused by incorrect printing position.

[0155] The printing method, apparatus, and storage medium provided in this application embodiment are applied to a printing device including a printhead module, the printhead module being configured with multiple printhead groups using different inks. The printing method includes: acquiring the content to be printed and the coordinate information of the content in the printing medium; identifying the printing area based on the coordinate information; identifying the printing medium type of the printing area; determining printing ink information based on the printing medium type; and controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information. By determining the printing area for printing the content based on the coordinate information of the content in the printing medium and then determining its printing medium type, the printing ink information can be determined based on the printing medium type. Multiple printhead groups of the printing device can then be called for printing based on the printing ink information. Using a separate device, the needs for printing with different types of printing media can be met, saving costs, improving efficiency, and enhancing print quality.

[0156] like Figure 7 As shown, this application embodiment provides a printing device 700, including:

[0157] At least one processor 710;

[0158] At least one memory 720 is used to store at least one program;

[0159] The printing method as described in the embodiments of this application is implemented when at least one of the programs is executed by at least one of the processors.

[0160] This application also discloses a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the electronic device to perform the danger warning method as described above.

[0161] This application also discloses a computer-readable storage medium storing a processor-executable computer program, which, when executed by a processor, is used to implement the aforementioned danger warning method.

[0162] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0163] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0164] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.

[0165] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0166] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0167] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0168] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0169] The step numbers in the above method embodiments are set only for ease of explanation and do not impose any restrictions on the order of the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

Claims

1. A printing method applied to a printing device, the printing device including a printhead module, the printhead module being provided with a plurality of printhead groups using different inks; The printing method includes: Obtain the content to be printed and its coordinate information in the printing medium, and determine the printing area based on the coordinate information; A first image of the printed area is obtained, and edge features and shape features are extracted from the first image to obtain edge feature information and shape feature information of the printed area; Based on the edge feature information and the shape feature information, the first image is separated into a background image to obtain the target image of the printing area; Color and texture features are extracted from the target image to obtain the medium feature information of the printing area; A pre-trained media recognition model is invoked to identify the media in the printed area based on the media feature information, thereby obtaining the printing media type of the printed area; Determine the printing ink information based on the type of printing media; Based on the printing ink information, the printhead module is controlled to select the corresponding printhead group to print the content to be printed; The process of training the medium recognition model includes the following steps: Obtain media samples and sample labels; The medium identification model is trained using the medium samples to obtain the training results; Based on the training results and the sample labels, the training loss value is obtained; The model parameters of the medium recognition model are corrected based on the training loss value.

2. The printing method according to claim 1, characterized in that, The printing device further includes an image acquisition module and a light sensor, wherein acquiring a first image of the printing area includes: The light sensor is invoked to acquire light information of the image acquisition environment, and the image acquisition parameters of the image acquisition module are adjusted according to the light information. The image acquisition module with the adjusted image acquisition parameters is invoked to acquire the first image.

3. The printing method according to claim 1, characterized in that, Before the printhead module selects the corresponding printhead group to print the content to be printed, the printing method further includes: Based on the image content of the first image, the offset information of the printing area is identified; Based on the offset information, the content to be printed is controlled to rotate and offset in order to align with the printing area.

4. The printing method according to claim 1, characterized in that, The printing area includes a first printing sub-area and a second printing sub-area; the printing ink information includes first printing ink information and second printing ink information, wherein the first printing ink information corresponds to the printing media type of the first printing sub-area, and the second printing ink information corresponds to the printing media type of the second printing sub-area; the printhead group includes a first printhead group and a second printhead group. The step of controlling the printhead module to select the corresponding printhead group to print the content to be printed based on the printing ink information includes: The first printhead group is invoked to use the first printing ink corresponding to the first printing ink information to print in the first printing sub-area; The second printhead group is invoked to use the second printing ink corresponding to the second printing ink information to print in the second printing sub-area.

5. The printing method according to claim 1, characterized in that, The process of obtaining the content to be printed and its coordinates in the printing medium includes: Obtain the angular coordinate information of the printing medium and establish a coordinate system; The content to be printed is arranged in the coordinate system, and the coordinate information of the content to be printed in the coordinate system is determined.

6. A printing device, characterized in that, include: At least one processor; At least one memory for storing at least one program; The printing method as described in any one of claims 1 to 5 is implemented when at least one of the programs is executed by at least one of the processors.

7. A computer-readable storage medium, characterized in that, It contains a processor-executable computer program, which, when executed by a processor, is used to implement the printing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Printing system, print medium specifying method, and medium information providing device

    US20220159140A1

  • Print condition setting method and print condition setting system

    US20220305804A1