CN114138213B - Printer control method and device, storage medium and electronic equipment - Google Patents

Printer control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114138213B
CN114138213B CN202210099878.XA CN202210099878A CN114138213B CN 114138213 B CN114138213 B CN 114138213B CN 202210099878 A CN202210099878 A CN 202210099878A CN 114138213 B CN114138213 B CN 114138213B
Authority
CN
China
Prior art keywords
target document
printed
determining
printing
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210099878.XA
Other languages
Chinese (zh)
Other versions
CN114138213A (en
Inventor
李�远
杨香玉
刘国超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chenguang Rongxin Technology Co ltd
Original Assignee
Beijing Chenguang Rongxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chenguang Rongxin Technology Co ltd filed Critical Beijing Chenguang Rongxin Technology Co ltd
Priority to CN202210099878.XA priority Critical patent/CN114138213B/en
Publication of CN114138213A publication Critical patent/CN114138213A/en
Application granted granted Critical
Publication of CN114138213B publication Critical patent/CN114138213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1239Restricting the usage of resources, e.g. usage or user levels, credit limit, consumables, special fonts

Abstract

The invention discloses a printer control method, a device, a storage medium and electronic equipment. Then, by dividing the target document into areas and preferentially printing the areas where the toner consumption is large, even if the toner is insufficient, the print quality of the areas ranked after the target document is not affected too much.

Description

Printer control method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of printing technologies, and in particular, to a printer control method and apparatus, a storage medium, and an electronic device.
Background
With the development of printing technology, the demand of people for printing business is increasing. The printer has the characteristics of small volume, clear imaging and the like, and has different colors in a plurality of printing devices.
However, the printer has a drawback that the drawback of toner consumption becomes more and more obvious as printing continues, and the printing quality may be affected. In particular poor print quality due to insufficient amount of toner. In general, users who select printers often aim to seek high print quality. Consumption of toner as the printing process continues is inevitable.
How to provide high-quality printing under the condition of toner provided by a printer becomes an urgent problem to be solved.
Disclosure of Invention
The invention provides a printer control method, a printer control device, a storage medium and electronic equipment, and aims to partially solve the problems in the prior art. Specifically, the method is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a printer control method, including:
determining a target document from a queue of documents to be printed;
reading document content in a target document; wherein the document content comprises characters and/or graphics;
determining the area proportion of the document content in the page of the target document;
when the area ratio is larger than a first threshold value, determining the total consumption amount of the toner consumed under the condition that all the documents to be printed are printed; and determining a consumption first component of toner consumed in a case of printing the target document;
determining a second threshold value according to the total consumption amount; the second threshold value is positively correlated with the total consumption and negatively correlated with the total number of pages contained in all the documents to be printed;
if the first consumed component is larger than the second threshold value, dividing the target document into a specified number of areas along the paper outlet direction during printing;
determining, for each region, a second component of consumption of toner consumed in printing the region; the second component of consumption is calculated by the following formula: qi=r1 i*r2 i+qi
In the formula, QiIs a second component of the consumption of the ith region; r is1 iIs a first weight, r in the case of a figure contained in a region1 iGreater than 1, r in the case of no graphics contained in the region1 iEqual to 1; r is2 iThe second weight is positively correlated with the time of the target document staying in the queue of the documents to be printed; q. q.siIs the amount of toner consumed in the case of printing the target document, predicted from the area ratio, qiIs positively correlated with the area ratio;
sorting the regions according to the consumed second components;
and printing the target document according to the sorted areas.
Optionally, the printer control method further includes:
when the area ratio is not greater than a first threshold value, placing the target document at the last position in the queue of the documents to be printed to obtain the reordered queue of the documents to be printed;
and determining a new target document from the reordered document queue to be printed.
Optionally, determining the area proportion of the document content in the page of the target document includes:
generating an image representing the printed target document by adopting a preset first imaging model;
and determining the area proportion occupied by the non-blank area in the image in the page of the target document.
Optionally, determining an area ratio of the non-blank area in the image in the page of the target document, further includes:
judging whether the target document contains a graph or not;
if the target document contains the graph, taking the product of the intermediate proportion and the third weight as an area proportion; wherein the third weight is inversely related to the amount of toner remaining in the printer cartridge and the third weight is greater than 1;
and if the target document does not contain the graph, taking the intermediate proportion as the area proportion.
Optionally, determining the total consumption amount of toner consumed in the case of printing out all documents to be printed includes:
generating images representing all printed documents by adopting a preset first imaging model to serve as reference images;
from the history data, the amount of toner consumed to historically print the history document having the greatest similarity to the reference image is determined as the total consumption amount.
Optionally, the printer control method further includes:
if the first component is consumed is not greater than the second threshold, the target document is printed.
Optionally, sorting the regions according to the second component of consumption includes: sequencing the regions according to the second components from large to small to obtain a first sequence; determining a first page of a next file to be printed from a queue of the documents to be printed as a reference page; according to the page content, determining an area with similarity greater than a third threshold value with the reference page from each area, and placing the area at the last position of the first sequence to obtain a second sequence;
optionally, printing the target document according to the sorted areas, including: and printing each area according to the second sequence, and further printing the target document.
In a second aspect, the present invention also provides a printer control apparatus for implementing the printer control method described in the foregoing first aspect.
Further, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the printer control method described above when executing the program.
The invention adopts at least one technical scheme which can achieve the following beneficial effects:
according to the printer control method, the printer control device, the storage medium and the electronic equipment, the resource consumption in the target document printing process is predicted before printing, and the consumption is measured by the area proportion, so that the phenomenon that the toner quantity consumption prediction is inaccurate due to insufficient toner can be ignored. Then, by dividing the target document into areas and preferentially printing the areas where the toner consumption is large, even if the toner is insufficient, the print quality of the areas ranked after the target document is not affected too much.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the description and not to limit the invention. In the drawings:
fig. 1 is a schematic view of a scene involved in a printer control method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a printer control method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a file directory of a certain level of application files in the printer control method according to the embodiment of the present invention;
fig. 4 is a schematic flow chart illustrating obtaining of a lightweight installation package in the printer control method according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention with reference to the specific embodiments of the present specification and the accompanying drawings. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the specification without making any creative effort belong to the protection scope of the specification.
The technical solutions provided by the embodiments are described in detail below with reference to the accompanying drawings.
Fig. 1 is a control process of a printer according to an embodiment of the present invention, which may specifically include one or more of the following steps:
and S100, determining a target document from the queue of the documents to be printed.
The printer control process of the present invention may be executed by a control system of the printer. In this embodiment, the printer may be connected to several terminals, as shown in fig. 2. Documents to be printed are received from a number of terminals. In general, a printer can print only files to be printed one by one, and documents to be printed, for which printing has not yet been started, are arranged in a queue to wait for printing.
In a preferred embodiment, this step is triggered to be executed when the printing of the document currently printed by the printer is finished.
Further, in a preferred embodiment, the number of the documents to be printed may be determined first, and if the number exceeds a number threshold (a preset value is positively correlated with the printing speed of the printer), the first document to be printed in the queue may be used as the target document determined in this step. If there are multiple documents to be printed in the queue, it indicates that there are documents that have been waiting long, and should not have documents waiting too long to continue waiting.
Further, in a preferred embodiment, if the number does not exceed the number threshold, it is determined that a document containing a graphic in the documents to be printed is taken as a first type document, and a document containing no graphic is taken as a second type document. The target document is preferentially determined from the first type of documents.
S102, reading the document content in the target document; wherein the document content comprises characters and/or graphics.
In the present embodiment, the positions other than the blank position in the page of the document are positions corresponding to the document contents. The area ratio may be a ratio of the area of the non-blank locations to the area of the page.
And S104, determining the area proportion of the document content in the page of the target document.
In a preferred embodiment, a preset second imaging model is used to generate an image representing the printed target document. And determining the area proportion occupied by the non-blank area in the image in the page of the target document. Specifically, the second imaging model has a function of calculating a ratio of the number of pixels corresponding to the document content in the image to the number of all pixels in the page of the target document.
Specifically, the process of determining the area ratio is as follows: and determining the proportion of the area occupied by the non-blank area in the image in the page of the target document as the intermediate proportion. It is determined whether the target document contains graphics. If so, taking the product of the intermediate proportion and the third weight as the area proportion; wherein the third weight is inversely related to an amount of remaining toner in the printer cartridge, and the third weight is greater than 1. If not, the intermediate proportion is taken as the area proportion.
The process of determining whether there is a graphic in the page may be determining a distribution of points in the page corresponding to the document content according to the second imaging model. And clustering the pixel points corresponding to the document content to obtain a plurality of clusters. For each cluster, the area of the cluster is determined. The target number is determined based on the area of the cluster. The target number is positively correlated with the area of the cluster. And if the number of the designated pixel points in the cluster is greater than the target number, determining that the cluster corresponds to the graph. The appointed pixel is a pixel which is adjacent to the periphery of the adjacent pixel and corresponds to the document content.
It can be seen that, in this embodiment, if a certain page has a character with a large font, so that the stroke of the font is thick, the character is also recognized as a graphic instead of a character. It can be seen that, in the embodiment, from the actual printing effect of the file content, what the to-be-printed content is specifically distinguished, rather than distinguishing the to-be-printed content based on the inherent attribute of the file content.
S106, judging whether the area ratio is larger than a first threshold value, if so, executing a step S108; if not, go to step S122.
The first threshold in this embodiment may be a preset value. Whether the area ratio is greater than the first threshold indicates that printing the page will consume more toner.
S108: determining the total consumption amount of toner consumed under the condition that all documents to be printed are printed; and, a consumption first component of toner consumed in the case of printing the target document is determined.
In a preferred embodiment, the process of determining the total consumption amount is to generate images representing all printed documents as reference images by using a preset first imaging model;
from the history data, the amount of toner consumed to historically print the history document having the greatest similarity to the reference image is determined as the total consumption amount.
When the document to be printed has a plurality of pages, a reference image corresponding to each page is generated for each page, and then the toner amount consumed by the history document with the maximum similarity is determined for each reference page from the history data. The sum of the consumed toner amounts obtained for the respective reference images is taken as the total consumed amount of the document to be printed.
In a preferred embodiment, the first component of toner consumption consumed in the case of determining the printing target document may also be obtained based on historical data by using a first imaging model, and the process is similar to the process of determining the total consumption amount, and is not described herein again.
S110, determining a second threshold value according to the total consumption; the second threshold value is positively correlated with the total consumption and negatively correlated with the total number of pages contained in all the documents to be printed.
In a preferred embodiment, the ratio of the total consumed amount to the total number of pages may be used as the second threshold.
S112, judging whether the first component is larger than a second threshold value, if so, executing a step S114; if not, go to step S124.
S114: the target document is divided into a specified number of areas along the paper ejection direction at the time of printing.
In a preferred embodiment, the specified number may be a preset value. The regions are rectangular regions arranged in sequence along the paper discharge direction, and the sizes of the regions are the same. Wherein the specified number is inversely related to a paper feed step size of the printer.
S116, determining a consumption second component of the toner consumed when printing the area for each area; the second component of consumption is calculated by the following formula: qi=r1 i*r2 i+qi
In the formula, QiIs a second component of the consumption of the ith region; r is1 iIs a first weight, r in the case of a figure contained in a region1 iGreater than 1, r in the case of no graphics contained in the region1 iEqual to 1; r is2 iThe second weight is positively correlated with the time of the target document staying in the queue of the documents to be printed; q. q.siIs the amount of toner consumed in the case of printing the target document, predicted from the area ratio, qiIs positively correlated with the area ratio.
Since the second component calculated in this step is used for sorting, the area ratio can be directly used as q as long as the size of the second component of each region is distinguishedi
The regions are sorted according to the consumed second component S118.
In a preferred embodiment, the regions may be sorted directly from large to small according to the second component and then printed in the sorted sequence.
In a preferred embodiment, the regions are sorted according to the second component from large to small to obtain a first sequence; determining a first page of a next file to be printed from a queue of the documents to be printed as a reference page; and according to the page content, determining an area with similarity greater than a third threshold value with the reference page from each area, and placing the area at the last position of the first sequence to obtain a second sequence. Thereafter, printing is performed in a second sequence.
And S120, printing the target document according to the sorted areas.
Illustratively, if a document is divided into: region 1, region 2, and region 3. The sorted regions are: region 2, region 3, region 1. The printer control system first feeds the paper to the location of area 2 and then prints area 2 and area 3. After that, the printer control system retracts the paper to the position of area 1, printing area 1. Finally, the printed paper is sent out of the printer.
S122, when the area ratio is not larger than a first threshold value, placing the target document at the last position in the queue of the documents to be printed to obtain the reordered queue of the documents to be printed; and determining a new target document from the reordered document queue to be printed.
And S124, printing the target document.
Another aspect of the present embodiment also provides a printer control apparatus. As shown in fig. 3, the printer control apparatus includes:
a target document determination module 300 configured to: determining a target document from a queue of documents to be printed;
a document content determination module 302 configured to: reading the document content in the target document; wherein the document content comprises characters and/or graphics;
an area ratio determination module 304 configured to: determining the area proportion of the document content in the page of the target document;
a consumption determination module 306 configured to: when the area ratio is larger than a first threshold value, determining the total consumption amount of the toner consumed under the condition that all the documents to be printed are printed; and determining a consumption first component of toner consumed in a case of printing the target document;
a second threshold determination module 308 configured to: determining a second threshold value according to the total consumption amount; the second threshold value is positively correlated with the total consumption and negatively correlated with the total number of pages contained in all the documents to be printed;
a region dividing module 310 configured to: if the first consumed component is larger than the second threshold value, dividing the target document into a specified number of areas along the paper outlet direction during printing;
a second component determination module 312 configured to: determining, for each region, a second component of consumption of toner consumed in printing the region; the second component of consumption is calculated by the following formula: qi=r1 i*r2 i+qi
In the formula, QiIs a second component of the consumption of the ith region; r is1 iIs a first weight, r in the case of a figure contained in a region1 iGreater than 1, r in the case of no graphics contained in the region1 iEqual to 1; r is2 iThe second weight is positively correlated with the time of the target document staying in the queue of the documents to be printed; q. q.siIs the amount of toner consumed in the case of printing the target document, predicted from the area ratio, qiIs positively correlated with the area ratio;
a sorting module 314 configured to: sorting the regions according to the consumed second components;
a print module 316 configured to: and printing the target document according to the sorted areas.
Another aspect of the present embodiment also provides a computer-readable storage medium storing a computer program, which is operable to execute an implementation process of the method for controlling a printer provided in fig. 1.
Another aspect of the present embodiment also proposes an electronic device as shown in fig. 4. On the hardware level, the electronic device may include a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the process controlled by any one of the printers.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be a hardware or a logic device.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification and the present invention. Various modifications and changes may occur to those skilled in the art to which the present invention pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A printer control method characterized by comprising:
determining a target document from a queue of documents to be printed;
reading the document content in the target document; wherein the document content comprises characters and/or graphics;
determining the area proportion of the document content in the page of the target document;
when the area ratio is larger than a first threshold value, determining the total consumption amount of the toner consumed under the condition that all the documents to be printed are printed; and determining a consumption first component of toner consumed in a case of printing the target document; the first threshold value is a preset value, and the fact that the area ratio is larger than the first threshold value indicates that more toner is consumed for printing the page;
determining a second threshold value according to the total consumption amount; wherein the second threshold is positively correlated with the total consumption and negatively correlated with the total number of pages contained in all the documents to be printed;
if the first consumption component is larger than a second threshold value, dividing the target document into a specified number of areas along the paper outlet direction during printing;
for each of the regions, determining a second component of toner consumption for printing the region; the second consumption component is calculated by the following formula: qi=r1 i*r2 i+qi
In the formula, QiIs a second component of the consumption of the ith region; r is1 iIs a first weight, r in the case of graphics contained in said region1 iGreater than 1, r in the case of no graphics contained in said area1 iEqual to 1; r is2 iIs a second weight which is positively correlated with the time that the target document stays in the queue of the documents to be printed; q. q.siIs the amount of toner consumed in the case of printing the target document predicted from the area ratio, qiIs positively correlated with the area ratio;
ordering a specified number of regions according to the consumed second components;
and printing the target document according to the sorted areas.
2. The printer control method according to claim 1, wherein the method further comprises:
when the area proportion is not larger than a first threshold value, placing the target document at the last position in the queue of the documents to be printed to obtain a reordered queue of the documents to be printed;
and determining a new target document from the reordered document queue to be printed.
3. The printer control method of claim 1, wherein determining the proportion of the area of the document content in the page of the target document comprises:
generating images representing all printed documents by adopting a preset first imaging model;
and determining the area proportion of the non-blank area in the image in the page of the target document.
4. The printer control method according to claim 3, wherein determining an area ratio of a non-blank area in the image in a page of the target document, further comprises:
judging whether the target document contains a graph or not;
if the target document contains the graph, taking the product of the intermediate proportion and the third weight as an area proportion; wherein the third weight is inversely related to an amount of toner remaining in the printer cartridge and is greater than 1;
and if the target document does not contain the graph, taking the intermediate proportion as an area proportion.
5. The printer control method according to claim 1, wherein determining a total consumption amount of toner consumed in a case where all documents to be printed are printed out, comprises:
generating images representing all printed documents by adopting a preset first imaging model to serve as reference images;
from the history data, the amount of toner consumed to historically print the history document having the greatest similarity to the reference image is determined as the total consumption amount.
6. The printer control method according to claim 1, wherein the method further comprises:
printing the target document if the first component of consumption is not greater than a second threshold.
7. The printer control method as claimed in claim 1,
ordering a specified number of regions according to the consumed second components, including: sequencing the specified number of regions from large to small according to the consumed second component to obtain a first sequence; determining a first page of a next file to be printed from a queue of the documents to be printed as a reference page; according to the page content, determining an area with similarity greater than a third threshold value with the reference page from the specified number of areas, and placing the area at the last position of the first sequence to obtain a second sequence;
printing the target document according to the sorted areas, including: and printing a specified number of areas according to the second sequence, and further printing the target document.
8. A printer control apparatus, characterized in that the apparatus is configured to implement the printer control method of any one of the preceding claims 1 to 7.
9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the printer control method of any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the printer control method according to any one of claims 1 to 7.
CN202210099878.XA 2022-01-27 2022-01-27 Printer control method and device, storage medium and electronic equipment Active CN114138213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210099878.XA CN114138213B (en) 2022-01-27 2022-01-27 Printer control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210099878.XA CN114138213B (en) 2022-01-27 2022-01-27 Printer control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114138213A CN114138213A (en) 2022-03-04
CN114138213B true CN114138213B (en) 2022-04-15

Family

ID=80382010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210099878.XA Active CN114138213B (en) 2022-01-27 2022-01-27 Printer control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114138213B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116051490B (en) * 2022-12-30 2023-06-20 北京辰光融信技术有限公司 Document print quality detection method, printing device, electronic device, and storage medium
CN115809031B (en) * 2023-01-29 2023-05-09 国网信息通信产业集团有限公司 Printer control system and method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1762716A (en) * 2003-12-22 2006-04-26 三星电子株式会社 Measure the Apparatus for () and method therefor of ink powder consumption
CN112181318A (en) * 2019-07-03 2021-01-05 钉钉控股(开曼)有限公司 Method and device for counting printing data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5609161B2 (en) * 2010-03-01 2014-10-22 コニカミノルタ株式会社 Information processing apparatus and program
JP5786583B2 (en) * 2011-09-16 2015-09-30 株式会社リコー Toner consumption calculation device, image forming apparatus, and toner consumption calculation method
CN202854485U (en) * 2012-09-19 2013-04-03 艾塔斯科技(镇江)有限公司 Printer capable of counting usage amount of consumable material
CN111061440B (en) * 2019-12-13 2024-02-09 上海旷沃科技有限公司 Method for accurately measuring toner consumption, control system and laser printer
CN111930323A (en) * 2020-08-10 2020-11-13 珠海市鸿瑞信息技术股份有限公司 Undisturbed one-way information processing system based on secondary network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1762716A (en) * 2003-12-22 2006-04-26 三星电子株式会社 Measure the Apparatus for () and method therefor of ink powder consumption
CN112181318A (en) * 2019-07-03 2021-01-05 钉钉控股(开曼)有限公司 Method and device for counting printing data

Also Published As

Publication number Publication date
CN114138213A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN114138213B (en) Printer control method and device, storage medium and electronic equipment
JP3101363B2 (en) User-definable font replacement device with equivalence indicator
CN117472301B (en) Thermal printer buffer printing method and related device
CN114201127B (en) Laser printer control method and device, storage medium and electronic equipment
US20080030756A1 (en) Print job eligibility based on named snapshots of printer settings
US10860644B2 (en) Image processing apparatus
US8687235B2 (en) Print saving page deduction suppression processing minimizing the number of color pages
CN111937029A (en) Image processing apparatus, image processing method, image processing program, and storage medium
US10409533B2 (en) Image forming apparatus with an improved memory management system
US11449442B2 (en) Single command for reading then clearing a memory buffer
US7336382B2 (en) Image forming apparatus printing with a decrease in the quantity of printing material
CN112784188B (en) Page rendering method and device
US20100177348A1 (en) Page image managing apparatus
JP2022042209A (en) Information processing apparatus
CN113934384B (en) Data rendering method, device, computer equipment and storage medium
US20120062941A1 (en) Image forming apparatus
JPH0863308A (en) Image processor
CN110134344B (en) Preprocessing method and device for content to be printed
JP7135336B2 (en) Control device
JP2008245184A (en) Image forming apparatus
JP2015136080A (en) Image forming apparatus, control method of image forming apparatus, and control program of image forming apparatus
CN114331511A (en) Information recommendation method and device
CN114004207A (en) Electronic data document generation method and device
CN114115761A (en) Automatic printer setting method and device, storage medium and electronic equipment
JP2003271978A (en) Drawing processor, and method for drawing processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant