A printer control method and a printer
By filling in marker information and obtaining file results after the printer receives the printing terminal instruction, the system can identify missing and reprinting faults, thus solving the problem of repeated or missed printing under large data volumes and achieving real-time detection and resource optimization.
Patent Information
- Application Number
- CN202411926596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Printers are prone to duplicate printing or missing prints when dealing with large amounts of data and multiple labels. Current technology cannot detect this in time before printing, leading to waste of resources and increased costs.
After receiving a printing terminal instruction, the printer fills the current marking information into the print data record table, retrieves the file result according to the file retrieval time limit request, determines the missing print and reprint faults, and controls the printer to perform corresponding operations.
It improves the real-time detection capability of missed prints and reprints, avoids resource waste, and improves printing efficiency and accuracy.
Smart Images

Figure CN120010796B_ABST
Abstract
Description
Technical Field
[0001] This application relates to, but is not limited to, the field of printers, and particularly to a printer control method and a printer. Background Technology
[0002] When dealing with large volumes of data and numerous labels, printers are prone to printing duplicates of the same document or omitting certain documents, wasting resources and increasing costs. Currently, the detection of duplicates or omissions primarily relies on post-printing checks, which lacks real-time capability and cannot promptly alert users before printing, leading to confusion and resource waste. Therefore, improving the real-time performance of duplicate or omission detection is a pressing issue that needs to be addressed. Summary of the Invention
[0003] This application provides a printer control method and a printer that can effectively improve the real-time performance of detecting missed prints.
[0004] In a first aspect, embodiments of this application provide a printer control method applied to a printer connected to a printing terminal, the method comprising:
[0005] In response to the current print command sent by the printing terminal, the current marking information and file acquisition time limit are determined according to the current print command, and the current marking information is filled into the print data record table;
[0006] Based on the current marking information and the file acquisition time limit, request the current file to be printed from the printing terminal, obtain the file acquisition result, and fill the print data record table with the file acquisition result;
[0007] Based on the current marker information in the print data record table and the file acquisition result, a missing print fault is determined for the printer, and a first determination result is obtained;
[0008] Based on the first determination result, the printer is controlled to print.
[0009] The printer control method according to the first aspect of this application has at least the following advantages: After receiving a current print command from a printing terminal, the printer fills the current marker information in the current print command into the print data record table. Then, based on the current marker information and the file retrieval time limit, it requests the current file to be printed from the printing terminal, obtains the file retrieval result, and fills the file retrieval result into the print data record table. Therefore, based on the current marker information and the file retrieval result in the print data record table, it can be determined whether the printer has a missing print fault, and then the printer can be controlled to print. Since this determination occurs before the printer prints the current file to be printed, this application can effectively improve the real-time performance of missing print detection and avoid resource waste.
[0010] According to some embodiments of the first aspect of this application, the step of controlling the printer to print based on the first determination result includes:
[0011] When the first determination result indicates that the printer has a missing print fault, control the printer to issue a missing print fault alarm message;
[0012] Alternatively, if the first determination result indicates that the printer does not have a missing print fault, the printer is controlled to print the current document to be printed.
[0013] According to some embodiments of the first aspect of this application, the control method further includes:
[0014] Obtain the first feature code corresponding to the current file to be printed, and compare the first feature code with each second feature code in the feature code lookup table to obtain a first comparison result;
[0015] Based on the first comparison result, the printer is reprinted faulty, and a second judgment result is obtained;
[0016] Based on the second determination result, the printer is controlled to print;
[0017] Specifically, when the first determination result indicates that the printer does not have a missing print fault, the first feature code corresponding to the current file to be printed is generated.
[0018] According to some embodiments of the first aspect of this application, the step of determining a reprinting fault in the printer based on the first comparison result and obtaining a second determination result includes:
[0019] When the feature code lookup table contains a second feature code that is the same as the first feature code, the second judgment result for judging the printer reprinting fault is that the printer has a reprinting fault.
[0020] Alternatively, if the second feature code that is identical to the first feature code does not exist in the feature code lookup table, the second determination result for determining the printer reprinting fault is that the printer does not have a reprinting fault.
[0021] According to some embodiments of the first aspect of this application, the control method further includes:
[0022] After confirming that the printer does not have a reprinting fault, the first feature code is entered into the feature code lookup table.
[0023] According to some embodiments of the first aspect of this application, the step of controlling the printer to print based on the second determination result includes:
[0024] When the second determination result indicates that the printer has a reprinting fault, control the printer to issue a reprinting fault alarm message;
[0025] Alternatively, if the second determination result indicates that the printer does not have a reprinting fault, the printer is controlled to print the current document to be printed.
[0026] According to some embodiments of the first aspect of this application, the step of determining a missing print fault in the printer based on the current marker information in the print data record table and the file acquisition result, and obtaining a first determination result, includes:
[0027] When the file acquisition result corresponding to the current marker information in the print data record table is empty, the first judgment result for judging the printer to determine the missing print fault is that the printer has a missing print fault.
[0028] Alternatively, if the file acquisition result corresponding to the current marker information in the print data record table is the current file to be printed corresponding to the current marker information, the first judgment result for judging the printer for missing print faults is that the printer does not have a missing print fault.
[0029] According to some embodiments of the first aspect of this application, the print data record table includes a marker information column and a file data column, and the step of determining the current marker information and file acquisition time limit according to the current print instruction and filling the current marker information into the print data record table includes: filling the current marker information into the blank item in the marker information column;
[0030] The step of obtaining target file data from the printing terminal based on the current marking information and the file acquisition time limit, obtaining file acquisition results, and filling the file acquisition results into the print data record table includes: finding the corresponding target marking information in the marking information column based on the current marking information; and filling the file acquisition results into the position in the file data column corresponding to the target marking information.
[0031] According to some embodiments of the first aspect of this application, the feature code lookup table includes a feature code column, and filling the first feature code into the feature code lookup table includes:
[0032] Create a blank entry at the end of the feature code column in the feature code lookup table, and fill the blank entry with the first feature code.
[0033] Secondly, embodiments of this application provide a printer to implement the printer control method described in the first aspect of the embodiments above.
[0034] Other features and advantages of this application will be set forth in the description which follows, 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, claims and drawings. Attached Figure Description
[0035] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.
[0036] Figure 1 A flowchart of a printer control method provided in an embodiment of this application;
[0037] Figure 2 A flowchart of a printer control method provided in another embodiment of this application;
[0038] Figure 3 for Figure 2 The detailed flowchart of step S600;
[0039] Figure 4 for Figure 2 The detailed flowchart of step S700;
[0040] Figure 5 A flowchart of a printer control method provided in another embodiment of this application;
[0041] Figure 6 A flowchart of a printer control method provided in another embodiment of this application;
[0042] Figure 7 This application provides a printer as an embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] It is understandable that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0045] When dealing with large volumes of data and numerous labels, printers are prone to printing duplicates of the same document or omitting certain documents, wasting resources and increasing costs. Currently, the detection of duplicates or omissions primarily relies on post-printing checks, which lacks real-time capability and cannot promptly alert users before printing, leading to confusion and resource waste. Therefore, improving the real-time performance of duplicate or omission detection is a pressing issue that needs to be addressed.
[0046] Based on this, embodiments of this application provide a printer control method and a printer. After receiving a current print command from a printing terminal, the printer fills the current marker information from the current print command into the print data record table. Then, based on the current marker information and the file retrieval time limit, it requests the current file to be printed from the printing terminal, obtains the file retrieval result, and fills the file retrieval result into the print data record table. Therefore, based on the current marker information and file retrieval result in the print data record table, it is possible to determine whether the printer has a missing print fault, and then control the printer to print. Since this determination occurs before the printer prints the current file to be printed, this application can effectively improve the real-time performance of missing print detection and avoid resource waste.
[0047] Firstly, referring to Figure 1 , Figure 1 The flowchart of the printer control method provided in the embodiments of this application includes, but is not limited to, the following steps:
[0048] Step S100: In response to the current print command sent by the printing terminal, determine the current marking information and file acquisition time limit according to the current print command, and fill the current marking information into the print data record table;
[0049] Step S200: Based on the current marking information and file acquisition time limit, request the printing terminal to acquire the current file to be printed, obtain the file acquisition result, and fill the file acquisition result into the print data record table;
[0050] Step S300: Based on the current marking information in the print data record table and the file acquisition result, determine the printer for missing print faults and obtain the first determination result;
[0051] Step S400: Based on the first judgment result, control the printer to print.
[0052] Understandably, if a printing terminal needs a document to be printed, it first sends a current print command to the printer. This command includes current marking information and a file retrieval time limit. The current marking information is used to mark the document to be printed. The printer responds to this command by first determining the current marking information and the file retrieval time limit. Then, based on these information, it requests the document to be printed from the printing terminal, obtains the retrieval result, and fills the print data record table with this result. If the printer successfully retrieves the document within the time limit, the result is the retrieved document. Conversely, if the printer fails to retrieve the document within the time limit, the result is empty. Setting a time limit effectively prevents the printer from freezing due to prolonged failure to retrieve the document. Since the print data record table is filled with the retrieval result after it's obtained, it now contains the current marking information and the corresponding document result. A printer's missing print fault occurs when the printer fails to acquire the file to be printed. Since the file acquisition results are different when the printer successfully acquires the file and when it fails to acquire the file, the printer can be judged for missing print faults based on the current marker information in the print data record table and the file acquisition result. When the printer does not have a missing print fault, it will also generate a first feature code corresponding to the file to be printed, and then use the first feature code and the feature code lookup table to judge the reprint fault.
[0053] It should be noted that after filling the print data log table with the file acquisition results, a printout error can be determined based on the current marker information and the file acquisition results. If the file acquisition result corresponding to the current marker information in the print data log table is empty, it means that the printer did not acquire the file to be printed within the file acquisition time limit, and the first determination of the printout error can be that the printer has a printout error. Similarly, if the file acquisition result corresponding to the current marker information in the print data log table matches the current file to be printed, it means that the printer successfully acquired the current file to be printed, and the first determination of the printout error can be that the printer does not have a printout error. After obtaining the first determination result, print control can be implemented to avoid wasting printing resources and improve printing efficiency.
[0054] It should be noted that when the initial judgment result indicates a missing print fault, it means the printer has not acquired the document to be printed. In this case, the printer can be stopped to prevent subsequent printouts from becoming corrupted and wasting printing resources. Furthermore, when the initial judgment result indicates a missing print fault, the printer can also issue a missing print fault alarm. This alarm can be sent to the connected printing terminal with a missing print fault code, which can then display a pop-up notification. Alternatively, the printer can send the missing print fault information to the user's mobile device based on pre-set contact information. This missing print fault information may include, but is not limited to, SMS alerts, telephone voice alerts, etc. Finally, the printer can issue a direct audible warning signal or an optical alert signal.
[0055] It should be noted that if the first judgment result indicates that the printer has a printing failure, a second print request can be sent to the printing terminal based on the current marking information to re-obtain the current file to be printed corresponding to the current marking information.
[0056] It should be noted that after the printer receives the current print command from the printing terminal, if the printer does not have a print data record table, it will generate a print data record table and then store the current print command in the print data record table.
[0057] Reference Figure 2 , Figure 2 A flowchart of a printer control method provided in another embodiment of this application includes, but is not limited to, the following steps:
[0058] Step S500: Obtain the first feature code corresponding to the current file to be printed, and compare the first feature code with each second feature code in the feature code lookup table to obtain the first comparison result;
[0059] Step S600: Based on the first comparison result, determine the printer reprinting fault and obtain the second determination result;
[0060] Step S700: Based on the second judgment result, control the printer to print.
[0061] It is understandable that each printed document has a corresponding signature code, as each printed document is generated based on the same signature code rules. If the data in the printed documents is the same, then the signature codes generated for printed documents with the same data will also be the same; that is, different printed documents have different signature codes, while identical printed documents have the same signature code. Furthermore, after a printed document is printed, its corresponding signature code is entered into a signature code lookup table. If a reprint failure occurs, it means the printer has printed two identical documents. Since the printing task is the same, the corresponding signature codes are also the same. Therefore, the first signature code corresponding to the document to be printed can be obtained, and this first signature code can be compared with the various second signature codes in the signature code lookup table to determine whether a reprint failure has occurred. Then, printing control is performed on the printer based on the second determination result. Since this determination occurs before the printer prints the document to be printed, this application can effectively improve the real-time performance of detecting duplicate printing and avoid resource waste.
[0062] Reference Figure 3 , Figure 3 for Figure 2 The detailed flowchart of step S600 includes, but is not limited to, the following steps:
[0063] Step S610: When a second feature code that is the same as the first feature code exists in the feature code lookup table, the second judgment result for judging the printer reprinting fault is determined to be that the printer has a reprinting fault.
[0064] Step S620: If there is no second feature code in the feature code lookup table that is the same as the first feature code, the second judgment result for judging the printer reprinting fault is determined to be that the printer does not have a reprinting fault.
[0065] It's understandable that a printer reprinting fault occurs when the printer prints two identical documents. Since each document to be printed has a fixed and unique identifier, if the printer is not experiencing a reprinting fault, the first identifier will not match any second identifier in the identifier lookup table. If the printer is experiencing a reprinting fault, the identifier lookup table should contain a second identifier that matches the first identifier. Therefore, the presence or absence of a second identifier that matches the first identifier in the identifier lookup table can be used to determine if the printer is experiencing a reprinting fault.
[0066] It should be noted that multiple print files may need to be printed in a single print job. Therefore, after confirming that the printer does not have a reprinting fault, the first feature code corresponding to the current print file will be filled into the feature code lookup table.
[0067] Specifically, in a single printing operation, the first print file, the second print file, and the third print file need to be printed sequentially. After the feature code corresponding to the first print file has been stored in the feature code lookup table, if the second print file is mistakenly converted to the first print file, since the feature code corresponding to the first print file has already been filled into the feature code lookup table, when judging the reprint fault of the second print file, because the second print file was mistakenly converted to the first print file, the feature code of the second print file is the same as the feature code of the first print file. This will result in the feature code of the second print file being the same as the feature code in the feature code lookup table, thus indicating that the printer has a reprint fault.
[0068] Reference Figure 4 , Figure 4 for Figure 2 The detailed flowchart of step S700 includes, but is not limited to, the following steps:
[0069] Step S710: When the second judgment result is that the printer has a reprinting fault, control the printer to issue a reprinting fault alarm message.
[0070] Step S720: When the second judgment result is that the printer does not have a reprint fault, control the printer to print the current document to be printed.
[0071] Understandably, a printer reprinting failure leads to wasted printing resources and reduced printing efficiency. Therefore, when the second judgment result indicates a reprinting failure, the printer can be stopped to avoid wasting printing resources. Furthermore, when the second judgment result indicates a reprinting failure, the printer can also issue a reprinting failure alarm message. This alarm message can be sent to the connected printing terminal with a reprinting failure code, which can then display a pop-up notification. Alternatively, the printer can send the reprinting failure alarm message to the user's mobile device based on pre-set contact information, including but not limited to SMS alerts and telephone voice alerts. The printer can also issue a direct audible warning or optical alert. Similarly, when the second judgment result indicates no reprinting failure, the printer can be controlled to print the currently pending document to ensure printing efficiency.
[0072] Reference Figure 5 , Figure 5 A flowchart of a printer control method provided in another embodiment of this application includes, but is not limited to, the following steps:
[0073] Step S110: Fill the blank fields in the tag information field with the current tag information;
[0074] Step S120: Find the corresponding target marker information in the marker information column based on the current marker information; fill the file acquisition result into the file data column at the position corresponding to the target marker information.
[0075] Understandably, the print data log table includes a marker information column and a file data column. The marker information column records the current marker information in the current print command, while the file data column records the file retrieval result. When the printer receives a print command from the print terminal, it determines the current marker information and file retrieval time limit based on the current print command and fills the blank field in the marker information column with the current marker information. Based on the current marker information and file retrieval time limit, it retrieves the target file data from the print terminal, obtaining the file retrieval result. After obtaining the file retrieval result, it finds the corresponding target marker information in the marker information column based on the current marker information; it then fills the file retrieval result into the position in the file data column corresponding to the target marker information. For example, if the current marker information is recorded in the second item of the marker information column in the print data log table, then the position in the file data column corresponding to the target marker information should be the second item in the file data column. By filling the file retrieval result into the position in the file data column corresponding to the target marker information, it is easy to summarize and organize the current marker information and file retrieval result.
[0076] It should be noted that if the printer successfully acquires the current file to be printed within the file acquisition time limit, the file acquisition result will be the acquired file to be printed, and the position in the file data column corresponding to the target mark information will be filled with the file acquisition result of the current file to be printed. Similarly, if the printer does not acquire the current file to be printed within the file acquisition time limit, the file acquisition result will be empty, and the position in the file data column corresponding to the target mark information will be blank.
[0077] Reference Figure 6 , Figure 6 A flowchart of a printer control method provided in another embodiment of this application includes, but is not limited to, the following steps:
[0078] Step S800: Create a blank entry at the end of the feature code column in the feature code lookup table, and fill the blank entry with the first feature code.
[0079] Understandably, the signature lookup table includes a signature column. After confirming that the printer does not have a reprinting fault, a blank entry is created at the end of the signature column in the signature lookup table. The first signature corresponding to the document to be printed is then filled into the blank entry so that all signatures are within the signature column. If the printer does not have a signature lookup table, a blank one will be generated first.
[0080] Secondly, embodiments of this application provide a printer 700, including a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720. The processor 720 executes the program to implement the printer control method of the first aspect embodiment described above, for example, executing... Figure 1 Method steps S100 to S400 in the text Figure 2 Steps S500 to S700 Figure 3 Steps S610 to S620 Figure 4 Steps S710 and S720 Figure 5 In steps S110 and S120 and Figure 6 Step S800.
[0081] The memory 710, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the printer control method in the above embodiments of this application. The processor 720 implements the printer control method in the above embodiments of this application by running the non-transitory software program and instructions stored in the memory 710.
[0082] The memory 710 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data required for executing the printer control method in the above embodiments. Furthermore, the memory 710 may include high-speed random access memory 710, and may also include non-transitory memory 710, such as at least one disk storage device 710, a flash memory device, or other non-transitory solid-state memory 710. It should be noted that the memory 710 may optionally include memory 710 remotely located relative to the processor 720, and these remote memories 710 can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0083] The embodiments of this application have been described in detail with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.
Claims
1. A printer control method, characterized in that, Applied to a printer, the printer is connected to a printing terminal, and the printer control method includes: In response to the current print command sent by the printing terminal, the current marking information and file acquisition time limit are determined according to the current print command, and the current marking information is filled into the print data record table; Based on the current marking information and the file acquisition time limit, a request is made to the printing terminal to acquire the current file to be printed, a file acquisition result is obtained, and the file acquisition result is filled into the print data record table, wherein the current marking information is used to mark the current file to be printed; Based on the current marker information in the print data record table and the file acquisition result, a missing print fault is determined for the printer, and a first determination result is obtained; Based on the first determination result, the printer is controlled to print; The step of determining a missing print fault in the printer based on the current marker information in the print data record table and the file acquisition result, and obtaining the first determination result, includes: When the file acquisition result corresponding to the current marker information in the print data record table is empty, the first judgment result for judging the printer to determine the missing print fault is that the printer has a missing print fault. When the file acquisition result corresponding to the current mark information in the print data record table is the current file to be printed corresponding to the current mark information, the first judgment result for judging the printer to perform a missing print fault is that the printer does not have a missing print fault. The print data record table includes a marker information column and a file data column. The step of determining the current marker information and the file acquisition time limit according to the current print instruction and filling the current marker information into the print data record table includes: filling the current marker information into the blank items in the marker information column; The step of requesting the current file to be printed from the printing terminal based on the current marking information and the file acquisition time limit, obtaining the file acquisition result, and filling the file acquisition result into the print data record table includes: finding the corresponding target marking information in the marking information column based on the current marking information; and filling the file acquisition result into the position in the file data column corresponding to the target marking information.
2. The printer control method according to claim 1, characterized in that, The step of controlling the printer to print based on the first determination result includes: When the first determination result indicates that the printer has a missing print fault, control the printer to issue a missing print fault alarm message; Alternatively, if the first determination result indicates that the printer does not have a missing print fault, the printer is controlled to print the current document to be printed.
3. The printer control method according to claim 2, characterized in that, The control method further includes: Obtain the first feature code corresponding to the current file to be printed, and compare the first feature code with each second feature code in the feature code lookup table to obtain a first comparison result; Based on the first comparison result, the printer is reprinted faulty, and a second judgment result is obtained; Based on the second determination result, the printer is controlled to print; Specifically, when the first determination result indicates that the printer does not have a missing print fault, the first feature code corresponding to the current file to be printed is generated.
4. The printer control method according to claim 3, characterized in that, The step of determining a reprinting fault in the printer based on the first comparison result to obtain a second determination result includes: When the feature code lookup table contains a second feature code that is the same as the first feature code, the second judgment result for judging the printer reprinting fault is that the printer has a reprinting fault. Alternatively, if the second feature code that is identical to the first feature code does not exist in the feature code lookup table, the second determination result for determining the printer reprinting fault is that the printer does not have a reprinting fault.
5. The printer control method according to claim 4, characterized in that, The control method further includes: After confirming that the printer does not have a reprinting fault, the first feature code is entered into the feature code lookup table.
6. The printer control method according to claim 3, characterized in that, The step of controlling the printer to print based on the second determination result includes: When the second determination result indicates that the printer has a reprinting fault, control the printer to issue a reprinting fault alarm message; Alternatively, if the second determination result indicates that the printer does not have a reprinting fault, the printer is controlled to print the current document to be printed.
7. The printer control method according to claim 5, characterized in that, The feature code lookup table includes a feature code column, and filling the first feature code into the feature code lookup table includes: Create a blank entry at the end of the feature code column in the feature code lookup table, and fill the blank entry with the first feature code.
8. A printer, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the printer control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Print data transmission method, apparatus and device, and storage medium
CN108984136A
Printing data processing method and device, and printer
CN111061439A