Printing method, printing apparatus, and computer-readable storage medium

By using a deep learning model to analyze the probability of printing errors in printing commands and adjusting printing parameters, the problem of poor printing results caused by printing command errors was solved, achieving the effect of reducing the error rate and improving printing quality.

CN115934010BActive Publication Date: 2026-08-04SHENZHEN QIANHAI BAIDI NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN QIANHAI BAIDI NETWORK CO LTD
Filing Date
2023-01-05
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing printing methods suffer from poor print quality and a high error rate when printing commands malfunction, failing to meet user needs.

Method used

By using a pre-trained deep learning model, the printing anomaly probability values ​​of each printing dimension of the image to be printed corresponding to the printing instruction are analyzed, and the printing parameters are adjusted according to these probability values ​​to generate and print the target image to be printed.

Benefits of technology

It reduced the printing error rate, improved printing quality, and met the actual needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934010B_ABST
    Figure CN115934010B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a printing method, a printing device and a computer readable storage medium, which are used for printing while reducing the printing error rate. The method comprises the following steps: obtaining a target printing instruction, generating a to-be-printed image corresponding to the printing instruction according to the printing instruction, inputting the to-be-printed image into a pre-trained deep learning model, obtaining printing abnormal probability values of each printing dimension of the to-be-printed image output by the deep learning model, determining a target printing dimension in each printing dimension according to the printing abnormal probability values of each printing dimension, adjusting the printing parameters of the target printing dimension of the target printing instruction according to the printing abnormal probability value of the target printing dimension for each target printing dimension, obtaining the adjusted printing parameters of each target printing dimension, generating a target to-be-printed image according to the adjusted printing parameters of each target printing dimension, and printing the target to-be-printed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of printing, and more specifically to printing methods, printing devices, and computer-readable storage media. Background Technology

[0002] With the development of printing services, there is an increasing need to print according to printing instructions.

[0003] The existing printing method involves obtaining a printing instruction, which can be obtained via a network or through hardware communication transmission. After obtaining the printing instruction, printing is performed according to the printing instruction.

[0004] However, this printing method prints directly according to the printing instructions. When the printing instructions are wrong, the printed image will also be wrong. For example, due to network or hardware reasons, the printing instructions may be wrong. Cloud printing and traditional express waybill printing may result in missing orders, data loss, poor printing quality, etc. Some actual printing effects cannot meet the user's needs. For example, user paper problems may lead to poor printing quality, light printing density, or mismatched paper causing printing misalignment. Therefore, the existing printing based on printing instructions has a high error rate. Summary of the Invention

[0005] This application provides a printing method, printing device, and computer-readable storage medium that enable printing while reducing the printing error rate.

[0006] In a first aspect, embodiments of this application provide a printing method, including:

[0007] Obtain the target print command;

[0008] Generate the image to be printed corresponding to the print instruction according to the print instruction;

[0009] The image to be printed is input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed, output by the deep learning model.

[0010] The target printing dimension is determined among the printing dimensions based on the printing anomaly probability values ​​of each printing dimension.

[0011] For each target printing dimension, the printing parameters of the target printing command are adjusted according to the printing anomaly probability value of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target image to be printed is then generated and printed according to the adjusted printing parameters of each target printing dimension.

[0012] Optionally, before inputting the image to be printed into the pre-trained deep learning model, the method further includes:

[0013] Obtain a target image sample to be printed; wherein, the target image sample to be printed includes printable information samples corresponding to each printing dimension;

[0014] For each printing dimension, the printing anomaly probability value of the information sample to be printed in that printing dimension is obtained, and the printing anomaly probability value is marked on the printed image sample.

[0015] The target image sample to be printed is input into a deep learning model to obtain the predicted printing anomaly probability values ​​of each printing dimension of the target image sample to be printed, as output by the deep learning model.

[0016] The loss between the predicted printing anomaly probability value of each printing dimension and the labeled printing anomaly probability value of each printing dimension is calculated based on the regression loss function. When the loss satisfies the convergence condition, the trained deep learning model is obtained.

[0017] Optionally, obtaining the target image sample to be printed includes:

[0018] Obtain the first image sample to be printed;

[0019] The first image sample to be printed is subjected to image augmentation processing to obtain the target image sample to be printed.

[0020] Optionally, after adjusting the printing parameters of the target printing instruction for the target printing dimension based on the printing anomaly probability value of the target printing dimension to obtain adjusted printing parameters for each target printing dimension, generating a target image to be printed based on the adjusted printing parameters for each target printing dimension, and printing the target image to be printed, the method further includes:

[0021] Obtain the target image printed based on the target image to be printed;

[0022] The process of obtaining the target image sample to be printed includes:

[0023] If the target image meets the preset printing image conditions, then the target image to be printed is used as the target image to be printed sample.

[0024] Optionally, generating the image to be printed corresponding to the print instruction according to the print instruction includes:

[0025] Determine the printing parameters corresponding to each printing dimension of the printing instruction and the printing information corresponding to each printing parameter;

[0026] The image to be printed is generated based on the printing information corresponding to each of the printing parameters.

[0027] Optionally, determining the target printing dimension based on the printing anomaly probability values ​​of each printing dimension includes:

[0028] For each printing dimension, if the printing anomaly probability value of the printing dimension is greater than or equal to the preset probability threshold value corresponding to the printing dimension, then the printing dimension is determined as the target printing dimension.

[0029] Optionally, the printing anomaly probability values ​​for each printing dimension include:

[0030] Abnormal output probability values ​​and / or recipient name abnormal probability values ​​and / or sender name abnormal probability values ​​and / or recipient address abnormal probability values ​​and / or sender address abnormal probability values ​​and / or missing contact information probability values ​​and / or paper offset parameter abnormal probability values ​​and / or font too large probability values ​​and / or font too small probability values ​​and / or network abnormal probability values ​​and / or density too dark probability values ​​and / or density too light probability values, etc.

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

[0032] The acquisition unit is used to acquire the target print instruction;

[0033] A generation unit is used to generate an image to be printed corresponding to the printing instruction according to the printing instruction;

[0034] The input unit is used to input the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model.

[0035] The determining unit is used to determine the target printing dimension in each printing dimension based on the printing anomaly probability value of each printing dimension;

[0036] An adjustment unit is used to adjust the printing parameters of the target printing instruction for each target printing dimension based on the printing anomaly probability value of the target printing dimension, thereby obtaining the adjusted printing parameters of each target printing dimension, and generating a target image to be printed based on the adjusted printing parameters of each target printing dimension, and printing the target image to be printed.

[0037] Thirdly, embodiments of this application provide a printing device, including: a processor and a memory;

[0038] The processor is configured to communicate with the memory and execute instructions in the memory to perform the aforementioned printing method.

[0039] Optionally, the printing device may be a computer device, including:

[0040] Central processing unit, memory, input / output interfaces, wired or wireless network interfaces, and power supply;

[0041] The memory is either a short-term storage memory or a persistent storage memory;

[0042] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the aforementioned printing method.

[0043] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the aforementioned printing method.

[0044] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the aforementioned printing method.

[0045] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: A target printing instruction can be obtained; a printable image corresponding to the printing instruction can be generated based on the printing instruction; the printable image can be input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the printable image output by the deep learning model; the target printing dimension can be determined in each printing dimension based on the printing anomaly probability values ​​of each printing dimension; for each target printing dimension, the printing parameters of the target printing dimension of the target printing instruction can be adjusted based on the printing anomaly probability values ​​of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension; the target printable image can be generated based on the adjusted printing parameters of each target printing dimension; and the target printable image can be printed. The printing parameters that need adjustment for the printing instruction can be determined and adjusted through a deep learning model, and then printing can be performed according to the printing instruction after adjusting the printing parameters, thus reducing the error rate when printing is performed according to the printing instruction when an error occurs. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the architecture of a printing system disclosed in an embodiment of this application;

[0047] Figure 2 This is a schematic flowchart of a printing method disclosed in an embodiment of this application;

[0048] Figure 3This is a flowchart illustrating another printing method disclosed in an embodiment of this application;

[0049] Figure 4 This is a schematic diagram of the structure of a printing device disclosed in an embodiment of this application;

[0050] Figure 5 This is a schematic diagram of the structure of another printing device disclosed in an embodiment of this application;

[0051] Figure 6 This is a schematic diagram of the structure of another printing device disclosed in the embodiments of this application. Detailed Implementation

[0052] This application provides a printing method, printing device, and computer-readable storage medium for printing while reducing the printing error rate.

[0053] Please see Figure 1 The architecture of the printing system in this application embodiment includes:

[0054] Terminal device 101 and printing device 102. When printing, terminal device 101 can connect to printing device 102. Terminal device 101 can send printing instructions to printing device 102. Printing device 102 can determine the printing anomaly probability value of each printing dimension based on the printing instructions, and adjust the printing parameters of each dimension according to the printing anomaly probability value of each printing dimension, so as to print the image according to the adjusted printing parameters.

[0055] based on Figure 1 Please refer to the printing system shown. Figure 2 , Figure 2 This is a flowchart illustrating a printing method disclosed in an embodiment of this application. The method includes:

[0056] 201. Obtain the target print command.

[0057] In this embodiment, when printing, the target printing instruction can be obtained.

[0058] 202. Generate the image to be printed corresponding to the print instruction based on the print instruction.

[0059] After obtaining the target print instruction, the corresponding image to be printed can be generated based on the print instruction.

[0060] 203. Input the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed, as output by the deep learning model.

[0061] After generating the image to be printed corresponding to the printing instruction based on the printing instruction, the image to be printed can be input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model.

[0062] 204. Determine the target printing dimension based on the printing anomaly probability values ​​of each printing dimension.

[0063] After inputting the image to be printed into a pre-trained deep learning model and obtaining the printing anomaly probability values ​​for each printing dimension of the image output by the deep learning model, the target printing dimension can be determined based on these probabilities. It is understandable that the method for determining the target printing dimension based on the printing anomaly probability values ​​for each printing dimension could be: if the printing anomaly probability value for each printing dimension is greater than or equal to a preset probability threshold corresponding to that dimension, then that printing dimension is determined as the target printing dimension. Other reasonable methods could also be used, and specific methods are not limited here.

[0064] 205. For each target printing dimension, adjust the printing parameters of the target printing dimension of the target printing command according to the printing anomaly probability value of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. Generate the target image to be printed according to the adjusted printing parameters of each target printing dimension and print the target image to be printed.

[0065] After determining the target printing dimension based on the printing anomaly probability value of each printing dimension, the printing parameters of the target printing command for the target printing dimension can be adjusted according to the printing anomaly probability value of each target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target image to be printed is then generated and printed based on the adjusted printing parameters of each target printing dimension.

[0066] In this embodiment, a target printing instruction can be obtained, a printable image corresponding to the printing instruction can be generated, the printable image can be input into a pre-trained deep learning model, and the printing anomaly probability values ​​of each printing dimension of the printable image output by the deep learning model can be obtained. Based on the printing anomaly probability values ​​of each printing dimension, the target printing dimension can be determined in each printing dimension. For each target printing dimension, the printing parameters of the target printing dimension of the target printing instruction can be adjusted according to the printing anomaly probability values ​​of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target printable image can be generated and printed according to the adjusted printing parameters of each target printing dimension, thereby reducing the printing error rate.

[0067] In this embodiment of the application, there are various methods for inputting the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed from the output of the deep learning model. Figure 2 The printing methods shown are described below, and one of them is described in detail below.

[0068] In this embodiment, when printing, the target printing instruction can be obtained.

[0069] For details, please refer to Figure 3 , Figure 3 This is a flowchart illustrating another printing method disclosed in an embodiment of this application. Figure 3 It is known that the printing device (intelligent error-correcting printing control device, online cloud server) can be set to online service mode and offline service mode. The method to obtain the target printing instruction can be to obtain the network data packet (valid data assembly packet) sent by the smart terminal through the IPv4 / IPv6 network (such as Wi-Fi 6, network cable, etc. to communicate with the network module of the printing device), or it can be to obtain the network data packet (valid data assembly packet) sent by the smart terminal through a non-IPv4 / IPv6 network. After obtaining the network data packet, the network data packet can be parsed to obtain the target printing instruction. The target printing instruction can include, but is not limited to, CPCL, TSPL, ZPL and other instructions.

[0070] After obtaining the target print instruction, the corresponding image to be printed can be generated based on the print instruction.

[0071] One method for generating the image to be printed corresponding to the printing instruction can be to first determine the printing parameters corresponding to each printing dimension of the printing instruction and the printing information corresponding to each printing parameter, and then generate the image to be printed based on the printing information corresponding to each printing parameter.

[0072] After generating the image to be printed corresponding to the printing instruction based on the printing instruction, the image to be printed can be input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model.

[0073] For details, please continue reading. Figure 3 The method of inputting the image to be printed into a pre-trained deep learning model can be performed by a deep learning processor.

[0074] The printing anomaly probability values ​​for each printing dimension can be, for example, an abnormal output probability value and / or an abnormal recipient name probability value and / or an abnormal sender name probability value and / or an abnormal recipient address probability value and / or an abnormal sender address probability value and / or a missing contact information probability value and / or an abnormal paper offset parameter probability value and / or a font that is too large probability value and / or a font that is too small probability value and / or a network anomaly probability value and / or a density that is too dark probability value and / or a density that is too light probability value, etc., and the specific values ​​are not limited here.

[0075] After inputting the image to be printed into a pre-trained deep learning model and obtaining the printing anomaly probability values ​​of each printing dimension of the image to be printed from the output of the deep learning model, the target printing dimension can be determined in each printing dimension based on the printing anomaly probability values ​​of each printing dimension.

[0076] One method for determining the target printing dimension based on the printing anomaly probability value of each printing dimension is to determine the printing dimension as the target printing dimension if the printing anomaly probability value of each printing dimension is greater than or equal to the preset probability value threshold corresponding to the printing dimension.

[0077] After determining the target printing dimension based on the printing anomaly probability value of each printing dimension, the printing parameters of the target printing command for the target printing dimension can be adjusted according to the printing anomaly probability value of each target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target image to be printed is then generated and printed based on the adjusted printing parameters of each target printing dimension.

[0078] For details, please continue reading. Figure 3 ,Depend on Figure 3 It is known that the printing parameters can be corrected based on the output and results of the deep learning processor (the deep learning processor on the cloud server) to obtain the adjusted printing parameters for each target printing dimension. Then, the printing data is output based on the adjusted printing parameters for each target printing dimension to print the target image to be printed.

[0079] For example, the executable printing instructions in this application embodiment are mainly general-purpose printing instructions such as ZPL, TSPL, and CPCL. When the model predicts paper offset parameters, adjustments can be made based on the predicted parameters and the corresponding printing instruction type. Specific parameters are described in the general documentation for each printing instruction, and the same applies to print density. When a network anomaly is predicted, the network module will reset, re-search for available connections, and re-run the print job that was affected by the network anomaly.

[0080] It is worth mentioning that the deep learning model can be trained before the image to be printed is input into the pre-trained deep learning model.

[0081] One method for training a deep learning model is to first obtain a target image sample to be printed, which includes printable information samples corresponding to each printing dimension. Then, for each printable information sample corresponding to a printing dimension, the printing anomaly probability value of the printable information sample in that printing dimension is obtained and labeled on the printable image sample. Next, the target image sample to be printed is input into the deep learning model to obtain the predicted printing anomaly probability values ​​of each printing dimension of the target image sample output by the deep learning model. Finally, the loss between the predicted printing anomaly probability values ​​of each printing dimension and the labeled printing anomaly probability values ​​of each printing dimension is calculated based on the regression loss function. When the loss meets the convergence condition, the trained deep learning model is obtained.

[0082] Specifically, the method for obtaining target image samples to be printed can be as follows: first, collect images of express delivery waybills; then, according to preset rules, calibrate the key information regions and key feature points in the printed images of the express delivery waybills to generate a training set (target image samples to be printed). Specifically, for images containing printed express delivery waybills collected by cloud users or individual users through various means, the key regions and key feature points in the printed images of the express delivery waybills are calibrated according to the preset rules of the training set. For example, the location, scale information, network status information, coordinate information of key feature points, printed font (print_font), font size (font_size), key characters (key_characters), instruction offset (instruction_offset), and network status (e.g., Wi-Fi signal, 4G signal, network packet loss rate) in the calibrated express delivery waybill images are used to generate a training set.

[0083] It's worth noting that the deep learning model (deep learning processor) employs a 50-layer ResNet (residual network) architecture. Excluding the 1x1 convolutions in the convolutional residual blocks, there are 50 convolutional layers. ReLU(x) = max(x,0) is used as the activation function, and the dataset samples are {X,Y}. For the sample label y in the training set and the model prediction... We define the loss function as follows: Where q is the length of the one-hot encoded vector of the data, the model prediction of this invention The main types of errors include: missing sender name, missing recipient name, network warning, and normal output, totaling 13 categories. Specifically, the deep learning model can be divided into six stages. The first stage includes a 3x3 convolutional layer, a batch normalization (BN) layer, a ReLU layer, and a 2x2 max pooling layer. Since the 3x3 convolutional layer has a stride of 1 and padding of 1, it does not change the size of the input feature map in the training set. The second stage includes a convolutional residual block and two identity residual blocks. The third stage includes a convolutional residual block and three identity residual blocks. The fourth and fifth stages adopt the same structure as the third stage. The sixth stage can first flatten the input feature map, and the flattening remains unchanged. For the prediction data of the deep learning in this embodiment, the number of outputs can be set to 13.

[0084] It's important to understand that the first stage uses 3x3 convolutional layers, which don't change the input feature map size. Batch normalization (BN) layers perform batch normalization on the hidden layers, and ReLU is used as the hidden activation function. 2x2 pooling layers reduce the width and height of the input features, decreasing the model's computational parameters. The second stage uses eight layers of identity residual blocks to prevent network degradation. The first layer is a 1x1 convolutional layer with a stride of 1, which doesn't change the feature map size. The second layer is a BN layer, which normalizes the convolutional output, accelerating the network's learning speed and preventing overfitting. The third layer is a ReLU layer, which accelerates network convergence. The fourth layer is a 3x3 convolutional layer, further reducing the model's computational parameters without changing the feature map size. The fifth and sixth layers are BN and ReLU layers, respectively, with the same functions as before. The seventh layer is a 1x1 convolutional layer, again without changing the feature map size. The eighth layer is a BN layer for normalization, facilitating model computation. The structure of the convolutional residual block is similar to that of the identity residual block, except that the identity mapping path is replaced by a 1*1 convolutional layer with a stride of 2, and the first convolutional layer also has a stride of 2. This design facilitates the final classification of the network and improves the degree of feature merging. The third stage consists of one convolutional residual block and three identity residual blocks, which can reduce information decay. The fourth and fifth stages have the same structure as the third stage. The sixth stage classifies the output into 13 results that can be classified in the training set through a fully connected layer, categorized as normal output, missing recipient and sender names, addresses, and contact information, paper offset parameters, font too large, font too small, network anomalies, excessive density, and insufficient density.

[0085] It is also worth mentioning that, in order to obtain the probability of the prediction output by the deep learning model, the loss function can be improved by using the softmax function.

[0086] One method to obtain the target image sample to be printed is to first obtain a first image sample to be printed, and then perform image augmentation processing on the first image sample to be printed to obtain the target image sample to be printed.

[0087] It is worth mentioning that, in order to generate a large number of new samples through random variations and reduce the possibility of overfitting due to insufficient training data, this invention can increase the size of the training set by performing data augmentation on the training set images. For example, image augmentation processing can be used, such as first padding the original image with 4 pixels around each side, and then randomly cropping a 32*32 image from it. Specifically, this can be achieved using Python code: `image = np.pad(image,((4,4),(4,4),(0,0)),mode='constant',constant_values=0)`, and then limiting the output shape to 32*32 using the `data_shape` parameter in the `CreateAugmenter` function of the MXNet library. It is understandable that if the training set data is too small, the model (deep learning model) will not predict comprehensively enough and will over-memorize the limited training set data, resulting in poor generalization ability. Increasing the training set data can make the model more generalizable. Secondly, overfitting can be reduced by performing batch normalization (BN) on the hidden layers. For example, the weighted input of the l-th layer is: z [l] , in To normalize the theoretical output, and to improve the model's performance, we can... in For optimal output, γ [l] and β [l] The main parameters are learning parameters, in order to make The mean and variance of can be any values, and we can let β [l] =μ, final

[0088] It is also worth mentioning that the printing parameters of the target printing dimension of the target printing instruction are adjusted according to the printing anomaly probability value of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target image to be printed is generated according to the adjusted printing parameters of each target printing dimension. After printing the target image to be printed, the target image printed based on the target image to be printed can be obtained. If the target image meets the preset printing image conditions, the target image to be printed is used as the target image to be printed sample.

[0089] For details, please continue reading. Figure 3 ,Depend on Figure 3 As can be seen, printing data is output according to the adjusted printing parameters for each target printing dimension. After printing the target image to be printed, the label will be printed normally when the deep learning model predicts normal output. Simultaneously, the camera can synchronously acquire images of successfully printed labels and add them to the training set. It is worth mentioning that the deep learning model in this embodiment can update the training set data and retrain to obtain prediction results more relevant to practical applications. Secondly, it is also worth mentioning that the images acquired by the camera and added to the training set can be transmitted back to the network module of the cloud server, and then transmitted back to the smart terminal. The transmitted images correspond one-to-one with the adjusted printing parameters, allowing the smart terminal to send printing commands with adjusted parameters, thereby improving the accuracy of the printed images.

[0090] It is understandable that, in addition to the methods described above for generating the image to be printed corresponding to the printing instruction; in addition to the methods described above for training deep learning models; in addition to the methods described above for obtaining target image samples to be printed; in addition to the methods described above for generating the image to be printed corresponding to the printing instruction; in addition to the methods described above for determining the target printing dimension in each printing dimension based on the printing anomaly probability values ​​of each printing dimension; other reasonable methods may also be used, and specific methods are not limited here.

[0091] In this embodiment, a target printing instruction can be obtained, and a corresponding image to be printed can be generated based on the printing instruction. The image to be printed is input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed, as output by the deep learning model. Based on the printing anomaly probability values ​​of each printing dimension, a target printing dimension is determined within each printing dimension. For each target printing dimension, the printing parameters of the target printing dimension of the target printing instruction are adjusted according to the printing anomaly probability values ​​of the target printing dimension, resulting in adjusted printing parameters for each target printing dimension. The target image to be printed is then generated and printed based on the adjusted printing parameters. By using a deep learning model to determine and adjust the printing parameters of the printing instruction, and then printing according to the adjusted printing instruction, the error rate when printing according to the printing instruction is incorrect is reduced. Furthermore, by using local data and network data training sets, potential problems can be predicted in advance to achieve an early warning effect. At the same time, the print preview adjustment module adjusts the data to achieve optimal printing results.

[0092] The printing method in the embodiments of this application has been described above. The printing device in the embodiments of this application is described below. Please refer to [link / reference]. Figure 4 One embodiment of the printing device in this application includes:

[0093] Unit 401 is used to obtain the target print instruction;

[0094] The generation unit 402 is used to generate the image to be printed corresponding to the printing instruction according to the printing instruction;

[0095] The input unit 403 is used to input the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model.

[0096] The determining unit 404 is used to determine the target printing dimension in each printing dimension based on the printing anomaly probability value of each printing dimension;

[0097] The adjustment unit 405 is used to adjust the printing parameters of the target printing instruction for each target printing dimension based on the printing anomaly probability value of the target printing dimension, so as to obtain the adjusted printing parameters of each target printing dimension, generate the target image to be printed based on the adjusted printing parameters of each target printing dimension, and print the target image to be printed.

[0098] In this embodiment, a target printing instruction can be obtained, a printable image corresponding to the printing instruction can be generated, the printable image can be input into a pre-trained deep learning model, and the printing anomaly probability values ​​of each printing dimension of the printable image output by the deep learning model can be obtained. Based on the printing anomaly probability values ​​of each printing dimension, the target printing dimension can be determined in each printing dimension. For each target printing dimension, the printing parameters of the target printing dimension of the target printing instruction can be adjusted according to the printing anomaly probability values ​​of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target printable image can be generated and printed according to the adjusted printing parameters of each target printing dimension, thereby reducing the printing error rate.

[0099] The printing device in the embodiments of this application is described in detail below. Please refer to [link / reference]. Figure 5 Another embodiment of the printing device in this application includes:

[0100] Unit 501 is used to obtain the target print instruction;

[0101] The generation unit 502 is used to generate the image to be printed corresponding to the printing instruction according to the printing instruction;

[0102] The input unit 503 is used to input the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model.

[0103] The determining unit 504 is used to determine the target printing dimension in each printing dimension based on the printing anomaly probability value of each printing dimension;

[0104] The adjustment unit 505 is used to adjust the printing parameters of the target printing instruction for each target printing dimension based on the printing anomaly probability value of the target printing dimension, so as to obtain the adjusted printing parameters of each target printing dimension, generate the target image to be printed based on the adjusted printing parameters of each target printing dimension, and print the target image to be printed.

[0105] The printing device further includes: a computing unit 506;

[0106] The obtaining unit 501 is further configured to obtain a target image sample to be printed; wherein the target image sample to be printed includes printable information samples corresponding to each printing dimension;

[0107] The obtaining unit 501 is further configured to obtain the printing anomaly probability value of the printing information sample in the printing dimension for each printing dimension, and to mark the printing anomaly probability value in the printed image sample.

[0108] The input unit 503 is further configured to input the target image sample to be printed into a deep learning model to obtain the predicted printing anomaly probability values ​​of each printing dimension of the target image sample to be printed output by the deep learning model.

[0109] The calculation unit 506 is specifically used to calculate the loss between the predicted printing anomaly probability value of each printing dimension and the labeled printing anomaly probability value of each printing dimension according to the regression loss function. When the loss meets the convergence condition, the trained deep learning model is obtained.

[0110] The obtaining unit 501 is specifically used to obtain a first image sample to be printed, and to perform image augmentation processing on the first image sample to be printed to obtain the target image sample to be printed.

[0111] The obtaining unit 501 is further configured to obtain a target image printed based on the target image to be printed;

[0112] The obtaining unit 501 is specifically used to use the target image to be printed as the target image to be printed sample if the target image meets the preset printing image conditions.

[0113] The generation unit 502 is specifically used to determine the printing parameters corresponding to each printing dimension of the printing instruction and the printing information corresponding to each printing parameter, and to generate the image to be printed based on the printing information corresponding to each printing parameter.

[0114] The determining unit 504 is specifically used to determine the printing dimension as the target printing dimension if the printing anomaly probability value of each printing dimension is greater than or equal to the preset probability value threshold corresponding to the printing dimension.

[0115] In this embodiment, each unit in the printing device performs as described above. Figure 2 The operation of the printing device in the illustrated embodiment will not be described in detail here.

[0116] Please refer to the following: Figure 6 Another embodiment of the printing device 600 in this application includes:

[0117] Central processing unit 601, memory 605, input / output interface 604, wired or wireless network interface 603, and power supply 602;

[0118] Memory 605 is either a short-term storage memory or a persistent storage memory;

[0119] The central processing unit 601 is configured to communicate with the memory 605 and execute instructions stored in the memory 605 to perform the aforementioned operations. Figure 2 The method in the illustrated embodiment.

[0120] This application also provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the aforementioned actions. Figure 2 The method in the illustrated embodiment.

[0121] This application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to perform the aforementioned... Figure 1 The method in the illustrated embodiment.

[0122] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0123] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0124] 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 an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0125] 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.

[0126] 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.

[0127] 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.

Claims

1. A printing method, characterized in that, include: Obtain the target print command; Generate the image to be printed corresponding to the print instruction according to the print instruction; The image to be printed is input into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed, output by the deep learning model. The target printing dimension is determined among the printing dimensions based on the printing anomaly probability values ​​of each printing dimension. For each target printing dimension, the printing parameters of the target printing instruction are adjusted according to the printing anomaly probability value of the target printing dimension to obtain the adjusted printing parameters of each target printing dimension. The target image to be printed is then generated according to the adjusted printing parameters of each target printing dimension and the target image to be printed is then printed. Before inputting the image to be printed into the pre-trained deep learning model, the method further includes: Obtain a target image sample to be printed; wherein, the target image sample to be printed includes printable information samples corresponding to each printing dimension; For each printing dimension, the printing anomaly probability value of the information sample to be printed in that printing dimension is obtained, and the printing anomaly probability value is marked on the printed image sample. The target image sample to be printed is input into a deep learning model to obtain the predicted printing anomaly probability values ​​of each printing dimension of the target image sample to be printed, as output by the deep learning model. The loss between the predicted printing anomaly probability value of each printing dimension and the labeled printing anomaly probability value of each printing dimension is calculated based on the regression loss function. When the loss satisfies the convergence condition, the trained deep learning model is obtained.

2. The method according to claim 1, characterized in that, The process of obtaining the target image sample to be printed includes: Obtain the first image sample to be printed; The first image sample to be printed is subjected to image augmentation processing to obtain the target image sample to be printed.

3. The method according to claim 1, characterized in that, After adjusting the printing parameters of the target printing command for the target printing dimension based on the printing anomaly probability value of the target printing dimension to obtain adjusted printing parameters for each target printing dimension, generating a target image to be printed based on the adjusted printing parameters for each target printing dimension, and printing the target image to be printed, the method further includes: Obtain the target image printed based on the target image to be printed; The process of obtaining the target image sample to be printed includes: If the target image meets the preset printing image conditions, then the target image to be printed is used as the target image to be printed sample.

4. The method according to claim 1, characterized in that, The step of generating the image to be printed corresponding to the print instruction includes: Determine the printing parameters corresponding to each printing dimension of the printing instruction and the printing information corresponding to each printing parameter; The image to be printed is generated based on the printing information corresponding to each of the printing parameters.

5. The method according to claim 1, characterized in that, The step of determining the target printing dimension based on the printing anomaly probability values ​​of each printing dimension includes: For each printing dimension, if the printing anomaly probability value of the printing dimension is greater than or equal to the preset probability threshold value corresponding to the printing dimension, then the printing dimension is determined as the target printing dimension.

6. The method according to claim 1, characterized in that, The printing anomaly probability values ​​for each printing dimension include: Abnormal output probability value and / or recipient name abnormal probability value and / or sender name abnormal probability value and / or recipient address abnormal probability value and / or sender address abnormal probability value and / or contact information missing probability value and / or paper offset parameter abnormal probability value and / or font too large probability value and / or font too small probability value and / or network abnormal probability value and / or density too dark probability value and / or density too light probability value.

7. A printing device, characterized in that, include: The acquisition unit is used to acquire the target print instruction; A generation unit is used to generate an image to be printed corresponding to the printing instruction according to the printing instruction; The input unit is used to input the image to be printed into a pre-trained deep learning model to obtain the printing anomaly probability values ​​of each printing dimension of the image to be printed output by the deep learning model. The determining unit is used to determine the target printing dimension in each printing dimension based on the printing anomaly probability value of each printing dimension; An adjustment unit is used to adjust the printing parameters of the target printing instruction for each target printing dimension based on the printing anomaly probability value of the target printing dimension, so as to obtain the adjusted printing parameters of each target printing dimension, generate the target image to be printed based on the adjusted printing parameters of each target printing dimension, and print the target image to be printed. The obtaining unit is further configured to obtain a target image sample to be printed; wherein the target image sample to be printed includes printable information samples corresponding to each printing dimension; The obtaining unit is further configured to obtain the printing anomaly probability value of the printing information sample in the printing dimension for each printing dimension, and to mark the printing anomaly probability value in the printed image sample. The input unit is further configured to input the target image sample to be printed into a deep learning model to obtain the predicted printing anomaly probability values ​​of each printing dimension of the target image sample to be printed output by the deep learning model. The obtaining unit is further configured to calculate the loss between the predicted printing anomaly probability value of each printing dimension and the labeled printing anomaly probability value of each printing dimension based on the regression loss function. When the loss satisfies the convergence condition, the trained deep learning model is obtained.

8. A printing device, characterized in that, include: Processor and memory; The processor is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 6.

10. A computer program product comprising instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1 to 6.