Intelligent printing method and system of printer, medium and program product
The list of printing devices and key attribute information are obtained through mDNS and SNMP protocols, and the optimal printing configuration scheme is generated using the configuration scheme generation model, which solves the problem that the printing strategy cannot be adjusted in real time in the prior art, and realizes efficient and intelligent printing configuration.
Patent Information
- Application Number
- CN202411956295.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art cannot adjust the printing strategy in real time based on the actual capabilities and characteristics of the target printer, resulting in the inability to effectively improve printing efficiency and quality.
The mDNS protocol obtains a list of potential printing devices, uses the SNMP protocol to establish a communication connection with the target printer, obtains its key attribute information, and inputs the printing tasks and this information into the configuration scheme generation model to generate the optimal printing task configuration scheme.
The intelligent and precise printing configuration is realized, which significantly improves the printing quality and efficiency, while reducing the configuration error rate.
Smart Images

Figure CN119861887A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a printer intelligent printing method, system, medium and program product. Background Art
[0002] Printing is a vital operation in modern office and production environments. With the continuous development of information technology, the requirements for printing efficiency, accuracy and intelligence are increasing day by day.
[0003] In the current traditional printing method system, the mDNS protocol is generally relied on to execute the discovery process of printing devices. The discovery system Bonjour on the system uses the mDNS protocol to discover printers, shared file servers and other devices. Compared with Bonjour's printer discovery function, Bonjour only supports the discovery of printers with AirPrint.
[0004] However, the mDNS protocol has limitations. If the printer does not support AirPrint but supports other network printing standards, Bonjour will not be able to discover the printer. Since the mDNS protocol cannot obtain the key attribute information of the printer, when facing different printing tasks, the existing methods cannot adjust the printing strategy in real time according to the actual capabilities and characteristics of the target printer. Summary of the invention
[0005] The present application provides a printer intelligent printing method, system, medium and program product for realizing intelligent printing operation of the printer, thereby improving printing efficiency and quality.
[0006] In the first aspect, the present application provides a printer intelligent printing method, which is applied to a printing driver system, and the method includes: obtaining a potential printing device list through the mDNS protocol, and the potential printing device list at least includes the network address information of each printing device; receiving a printer confirmation instruction sent by a user terminal, and using the SNMP protocol to establish a communication connection with a target printer in the potential printing device list, and the printer confirmation instruction includes target printer determination information; sending a request data packet containing multiple key attribute acquisition instructions to the target printer to obtain key attribute information of the target printer; after receiving a print task sent by the user terminal, inputting the print task and the key attribute information into a configuration scheme generation model to obtain a print task configuration scheme, and the configuration scheme generation model is obtained by machine learning training based on multiple historical print task data and corresponding configuration scheme examples; determining the corresponding print driver file according to the print task configuration scheme, and sending the print driver file to the target printer for driver printing.
[0007] By adopting the above technical solution, the system first obtains a list of potential printing devices through the mDNS protocol and establishes a basic communication environment. After determining the target printer, the SNMP protocol is used to obtain key attribute information, which is input into the configuration solution generation model together with the print task. The model is trained based on historical data and can accurately understand the correlation between print task characteristics and printer attributes. This intelligent matching mechanism enables the system to automatically generate the optimal print task configuration solution, thereby ensuring that the print driver file is highly matched with the print task requirements, and finally realizing the intelligent and precise print configuration, significantly improving the print quality and efficiency.
[0008] In combination with some embodiments of the first aspect, in some embodiments, after receiving a print task sent from the user end, the print task and the key attribute information are input into the configuration plan generation model, and after the step of obtaining the print task configuration plan, it also includes: receiving a user's request to change the print task, and sending a pause print task instruction to the target printer; generating a corresponding optimization plan based on the print task change requirement, and generating a task optimization driver file based on the optimization plan; sending the task optimization driver file to the target printer so that the target printer continues to print according to the optimization plan.
[0009] By adopting the above technical solution, the system can interrupt the current printing task in time when receiving the user's request to change the printing task. An optimization plan is quickly generated based on the change requirements, in which the optimization plan fully considers the continuity of the printing task and the resource utilization efficiency. By sending the task optimization driver file to the printer, the printer can continue to execute the printing task according to the new optimization plan. This dynamic adjustment mechanism improves the flexibility of the printing task, enables the printing process to respond to changes in user needs in real time, avoids the waste of resources caused by changes in printing tasks, and ensures the quality of the printing results.
[0010] In combination with some embodiments of the first aspect, in some embodiments, after determining the corresponding print driver file according to the print task configuration plan and sending the print driver file to the target printer for driver printing, it also includes: real-time monitoring of the consumable status information of the target printer through the SNMP protocol; if the consumable status information meets the preset conditions, a prompt to add consumables is sent to the user end.
[0011] By adopting the above technical solution, this active monitoring and early warning mechanism can effectively prevent printing interruptions caused by insufficient consumables. Through timely consumables reminders, users can prepare for consumables replenishment in advance to ensure the continuity and stability of printing tasks, thereby improving the efficiency and reliability of printing equipment.
[0012] In combination with some embodiments of the first aspect, in some embodiments, after the step of real-time monitoring of the consumable status information of the target printer through the SNMP protocol, it also includes: obtaining the priority information of the newly added print task sent by the user end; after obtaining the print task list of the target printer, calculating the redundant consumables of the target printer according to the print task list and the consumable status information, and the redundant consumables refer to the remaining consumables after completing the print tasks in the print task list; determining the corresponding pending consumables according to the newly added print task; if the pending consumables are greater than the redundant consumables, sending a request instruction to the target printer to prioritize printing the newly added print task.
[0013] By adopting the above technical solution, the system can accurately calculate the redundant consumables of the printer based on the print task list and consumables status information. For newly added print tasks with higher priorities, the system will evaluate the relationship between the required consumables and the redundant consumables. When the amount of consumables to be added to the task is greater than the redundant consumables, priority printing instructions are sent to ensure that important tasks can be completed first. This intelligent task scheduling mechanism effectively avoids the risk of high-priority tasks not being completed due to insufficient consumables, and improves the utilization efficiency of printing resources.
[0014] In combination with some embodiments of the first aspect, in some embodiments, the step of determining the corresponding amount of consumables to be consumed based on the newly added printing task specifically includes: inputting the newly added printing task into a preset equipment usage analysis model to obtain the predicted amount of consumables to be consumed, and the equipment usage analysis model is obtained by machine learning training based on multiple historical printing task data and corresponding actual consumables usage data.
[0015] By adopting the above technical solutions, this machine learning-based prediction mechanism can accurately estimate the consumables requirements of printing tasks and provide reliable data support for the priority scheduling of printing tasks, thereby improving the accuracy and rationality of printing resource allocation.
[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of determining the corresponding print driver file according to the print task configuration plan and sending the print driver file to the target printer for driver printing, it also includes: real-time monitoring of the operating status information of the target printer through the SNMP protocol; if it is detected that the operating status information is a paused print task, obtaining the error code of the target printer; parsing the error cause and repair suggestion corresponding to the error code according to a preset error code strategy library; sending printer fault prompt information to the user end, the printer fault prompt information including the error cause and the repair suggestion.
[0017] By adopting the above technical solution, users can quickly understand and solve printing problems by sending prompts containing detailed fault information to users. This intelligent fault diagnosis and prompt mechanism greatly improves the maintainability of the printing system and reduces the impact of equipment failures on printing tasks.
[0018] In combination with some embodiments of the first aspect, in some embodiments, after receiving the printer confirmation instruction sent by the user end, the step of establishing a communication connection with the target printer in the potential printing device list using the SNMP protocol also includes: if the first communication connection attempt does not receive a feedback response from the target printer within the set time, retry multiple times according to the set reconnection interval, and record the error status information of each connection attempt; if the communication connection is still not successful after the set number of attempts, send the error status information to the user end.
[0019] By adopting the above technical solution, this multiple retry and complete error information recording mechanism improves the communication reliability of the system, while providing detailed data support for fault diagnosis, effectively improving the stability and availability of the system.
[0020] In a second aspect, the present application provides a print driver system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the print driver system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a third aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a print driver system, causes the print driver system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0022] In a fourth aspect, the present application provides a computer program product, which, when executed on a print driver system, enables the print driver system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By adopting the above technical solution, a configuration solution generation model based on historical printing task data training is adopted, and the key attribute information of the printer obtained in real time is input into the model together with the current printing task. Therefore, the technical problem that the printing strategy cannot be adjusted in real time according to the actual capabilities and characteristics of the target printer in the prior art is effectively solved, thereby realizing the intelligent and precise configuration of the print driver, significantly improving the printing quality and efficiency, and reducing the configuration error rate.
[0024] 2. By adopting the above technical solution, since the amount of redundant consumables is calculated in real time based on the print task list and consumables status, and the amount is intelligently compared with the consumables demand of the newly added high-priority tasks, the technical problems in the prior art that high-priority printing tasks may be interrupted due to insufficient consumables and the priority of printing tasks cannot be dynamically adjusted according to the actual resource status are effectively solved, thereby realizing intelligent scheduling of printing tasks and optimal allocation of resources, ensuring the timely completion of important printing tasks.
[0025] 3. By adopting the above technical solution, due to the use of a real-time status monitoring mechanism based on the SNMP protocol and the technical means of intelligently diagnosing and analyzing printer failures in combination with a preset error code strategy library, the technical problems in the prior art that the cause of printer failures is difficult to quickly locate and users cannot obtain effective repair solutions in a timely manner are effectively solved, thereby achieving rapid diagnosis and accurate repair guidance of printing system failures, greatly improving the maintainability and operational stability of the printing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a schematic diagram of an application framework of a printer intelligent printing method in a related embodiment; Figure 2 This is a flow chart of the intelligent printing method of the printer in the embodiment of the present application; Figure 3 This is a schematic diagram of an application framework of the printer intelligent printing method in the embodiment of the present application; Figure 4 This is another flowchart of the intelligent printing method of the printer in the embodiment of the present application; Figure 5 It is a schematic diagram of a physical device structure of the print drive system in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0029] The following first introduces the printing driver method in the relevant embodiment. Figure 1 , Figure 1 This is a schematic diagram of an application framework of the printer intelligent printing method in the relevant embodiment: exist Figure 1 middle, Figure 1In the application framework shown, the system uses a router as the core hub. The router plays a key role in connecting different devices in the network. It receives multiple types of devices and protocols, including different printing devices, such as AirPrint printing device 1 and AirPrint printing device 2, which follow Apple's AirPrint standard; and network printing device 3 that does not support AirPrint, which supports other network printing protocols such as IPP / IPPS, LPD, SOCKET, etc. At the same time, the router also receives Apple system devices, such as iPhone, Mac, and iPad. In this network environment, the Bonjour protocol (also known as the mDNS protocol) is used to discover printing devices. The working principle of the Bonjour protocol is to broadcast the name and address information of devices and services by sending multicast messages in the network. For printing devices that support AirPrint, Bonjour can effectively discover them. For example, it can discover AirPrint printing device 1 and AirPrint printing device 2. And after discovering these devices, it can obtain the relevant properties of the printer through the IPP protocol. The IPP protocol plays the role of obtaining detailed information about the printer here, so that the system can understand some characteristics of the printer for subsequent configuration of printing operations. However, when it comes to devices that do not support AirPrint but support other network printing standards, the Bonjour protocol exposes its limitations. For example, for network printing device 3, since it does not follow the AirPrint standard, Bonjour cannot discover it, which leads to device omissions in the entire printing device discovery process, and it is impossible to fully obtain all printing device information on the network, and it is difficult to make real-time adjustments based on printing tasks and target printers.
[0030] For ease of understanding, the following is a description of the process of the method provided by this implementation. Figure 2 , which is a flow chart of the intelligent printing method of the printer in the embodiment of the present application.
[0031] S201, obtaining a potential printing device list through the mDNS protocol, where the potential printing device list at least includes network address information of each printing device; The mDNS protocol, also known as the multicast domain name system protocol, is a network protocol used to automatically discover devices and services in a local network. It is based on a multicast messaging mechanism. By sending specific multicast data packets in a local network, devices can actively announce their existence and the services they provide. For printing devices, they will broadcast multicast messages containing their own relevant information in the network, including at least network address information. When a device joins the network, it will periodically send multicast messages. After receiving these messages, other devices can obtain relevant information about the device that sent the message if they are interested in the corresponding services (for example, looking for the print driver system of a printing device).
[0032] As the execution subject, the print driver system will first listen to the multicast message of the mDNS protocol on the local network interface. After receiving the multicast message, the system will parse the message. The message contains information such as the name of the device, the network address, and the type of service provided. For the printing device, the system will identify it as a printing-related device and extract its network address information. The system will store the network address information of each printing device and the related device name (if any) in a data structure, which is the list of potential printing devices.
[0033] S202, receiving a printer confirmation instruction sent by the user end, establishing a communication connection with a target printer in the potential printing device list by using the SNMP protocol, wherein the printer confirmation instruction includes target printer confirmation information; The print driver system will continue to listen to the instructions sent by the user. When receiving the printer confirmation instruction, the system will parse the instruction. The printer confirmation instruction is a message containing data in a specific format. The most important information is the target printer identification information. This information may be the index number of the target printer in the list of potential printing devices, or its network address, or the device name, etc., which can uniquely identify the target printer. For example, if the user selects a printing device named "Printer1" on the user interface, the user will send a printer confirmation instruction containing the name "Printer1". After receiving the instruction, the print driver system will search for matching device information in the list of potential printing devices to determine the target printer. SNMP (Simple Network Management Protocol) is a standard protocol for network management, which allows information exchange and management operations between network devices. In the print driver system, using the SNMP protocol to establish a communication connection with the target printer is a key step to achieve further device control and information acquisition. The print driver system will first construct an SNMP request message based on the network address information of the target printer. The request message contains the system's own identification information and the instruction to request a connection. Then, the system will send the request message to the designated SNMP port of the target printer. After receiving the request message, if the target printer passes the verification (for example, verifying whether the system identifier in the request message is legal, etc.), it will send a response message to the print driver system. The response message contains some basic information of the target printer, such as the device model, system software version, etc., to confirm that the communication connection is successfully established. After receiving the response message, the print driver system will update its own device connection status information and mark that the communication connection with the target printer has been established.
[0034] In some embodiments, the printing driver system will continue to monitor the instructions sent by the user. When receiving the instruction of the user to change the printing task requirements, the system will parse the instruction to clarify the specific changes of the user. After determining that the user has changed the printing content, the system will immediately send a pause printing task instruction to the target printer. After receiving the pause instruction, the target printer will stop the current printing operation and save the current printing progress and other related information so that it can continue to execute later. The system will analyze the new task requirements in detail according to the printing task requirements changed by the user. Based on the analysis of the change requirements, the system will generate a corresponding optimization plan, which may include adjusting printing parameters (such as resolution, color mode, paper size, etc.), re-planning the printing order (if there are multiple pages to be printed), and making some specific settings adjustments to the printer (such as paper feeding mode, printing speed, etc.). According to the generated optimization plan, the system will generate a task optimization driver file. This file contains various settings and instructions for the new printing task requirements. The task optimization driver file is generated based on the driver architecture and related standards of the printer, and it can be recognized and executed by the target printer. The system will send the generated task optimization driver file to the target printer through the established communication connection (such as SNMP protocol connection). After receiving the task optimization driver file, the target printer will continue to execute the printing task according to the instructions and settings in the file.
[0035] In some embodiments, when the print driver system first attempts to establish a communication connection with the target printer (for example, using the SNMP protocol), a specific time is set to wait for the target printer to send a feedback response. If no feedback is received within this set time, the system will not immediately determine that the connection has failed, but will try to connect again according to the set reconnection interval. The reconnection interval is a pre-set time interval. During each retry, the system will record the error status information of each connection attempt. After multiple retries according to the reconnection interval, if the number of retries reaches the set upper limit and the communication connection is still not successfully established, the system will send the previously recorded error status information to the user end. The user end can understand the relevant situation of the failure of the print driver system to connect to the target printer based on the received error information.
[0036] S203, sending a request data packet including multiple key attribute acquisition instructions to the target printer to acquire key attribute information of the target printer; Before sending a request packet to the target printer, the system needs to determine which key attribute information to obtain. These key attributes may include the printer's device model, paper handling capabilities (such as supported paper sizes, paper types, etc.), color mode settings (such as color, black and white, grayscale, etc.), resolution settings, consumable status (such as the remaining amount of ink cartridges, the remaining life of toner cartridges, etc.), printing speed, etc. The system will determine a list of key attributes based on the requirements of the printing task and its own needs for printer information. For example, if the current printing task is to print high-quality pictures, the system may pay more attention to key attributes such as the printer's resolution setting, color mode setting, and paper handling capabilities. The print driver system will construct a request packet containing multiple key attribute acquisition instructions based on the determined key attribute list. The request packet is constructed in the format of the SNMP protocol. It contains the requested operation type (here, to obtain attribute information), the target object (that is, the target printer), and the specific attribute acquisition instructions. The print driver system will send the constructed request packet to the target printer through the established SNMP communication connection. During the sending process, the system will ensure the correct transmission of the data packet, encapsulate and transmit it through the various layers of the network protocol stack until the data packet reaches the target printer.
[0037] If an error occurs during the sending process (such as network interruption, data packet loss, etc.), the system will handle it accordingly. For example, if the network is interrupted, the system will wait for the network to recover and then resend the data packet; if the data packet is lost, the system will retransmit it according to the retransmission mechanism of the SNMP protocol. After receiving the request data packet, the target printer will obtain its corresponding key attribute information according to the instructions in the data packet. Then, the printer encodes this attribute information in the format of the SNMP protocol to form a response data packet and sends it to the print driver system. After receiving the response data packet, the print driver system will parse the data packet, extract the key attribute information, and store it in a local data structure for subsequent use.
[0038] S204, after receiving the print task sent by the user terminal, input the print task and the key attribute information into the configuration solution generation model to obtain the print task configuration solution, the configuration solution generation model is obtained by machine learning training based on a plurality of historical print task data and corresponding configuration solution examples in advance; In order to train the configuration scheme generation model, it is necessary to collect a large amount of historical printing task data and corresponding configuration scheme examples. The historical printing task data includes the type of printing task (such as document printing, picture printing, poster printing, etc.), the specific requirements of the task (such as paper size, resolution, color mode, etc.), the relevant attributes of the printer (such as device model, paper handling capacity, color mode setting, etc.) and the final printing effect evaluation (such as whether the printing quality meets the requirements, whether there are problems such as paper jams). The corresponding configuration scheme example refers to the print driver file and related printing parameter settings used for each historical printing task. These data need to be sorted and annotated so that the model can understand and learn the rules. For example, for a document printing task, the printing requirements are A4 paper, black and white mode, and 300dpi resolution. The corresponding configuration scheme may be to use a specific print driver file and set related printing parameters. This information will be sorted into a data sample as the input for model training. According to the characteristics of the data and the needs of the problem, select a suitable machine learning algorithm to build a configuration scheme generation model. For example, a neural network algorithm can be selected, which has a strong nonlinear fitting ability and can handle complex input-output relationships. The sorted historical printing task data and configuration plan examples are divided into training sets and test sets according to a certain ratio, usually 70%-30%.
[0039] The neural network model is trained using the training set, and the weights and bias parameters of the model are continuously adjusted through the back-propagation algorithm to minimize the error between the model's prediction results and the actual configuration scheme. During the training process, various optimization algorithms, such as the stochastic gradient descent algorithm and its variants, are used to improve the training efficiency and the convergence speed of the model. At the same time, the test set is verified to evaluate the accuracy and reliability of the model. If the model performs poorly on the test set, the model needs to be adjusted and optimized, such as increasing the number of network layers, adjusting the learning rate, etc., until the model reaches satisfactory performance indicators.
[0040] After receiving the print task sent by the user, the print driver system will organize and format the relevant information of the print task and the obtained printer key attribute information to meet the model input requirements. The print task information may include task type, paper size requirements, color mode requirements, etc., and the printer key attribute information includes device model, paper processing capability, color mode settings, etc. This information is combined into an input vector and input into the trained configuration scheme generation model. The model will process and analyze the input vector according to its internal structure and the parameters obtained by training. For example, the model will recognize that the print task is picture printing, A3 paper, color mode is required, the printer is a specific model, with high resolution and color processing capabilities, etc., and then generate the corresponding configuration scheme based on this information. After processing, the model will output a print task configuration scheme. This configuration scheme may include selecting a specific print driver file, setting print parameters (such as resolution, color mode, paper size, etc.), and possible print order adjustment. According to this configuration scheme, the print driver system will select the corresponding driver file from the local print driver file library and set the relevant printing parameters.
[0041] S205: Determine a corresponding print driver file according to the print task configuration solution, and send the print driver file to the target printer for driver printing.
[0042] According to the print driver file information specified in the print task configuration scheme, the print driver system will search and match in the local print driver file library. The local print driver file library stores print driver files corresponding to various printer models. The system will find the most matching print driver file based on the device model of the printer and other relevant information required in the configuration scheme (such as paper handling capabilities, color mode settings, etc.). After finding a matching print driver file, the system will verify it to ensure the integrity and correctness of the file. The system will check the file size, file format, version number and other information to ensure that it meets the requirements of the printer. If there is a problem with the file, the system will try to re-download it from the network or restore the correct file from the backup. The print driver system will send the prepared print driver file to the target printer through the established communication connection (such as SNMP protocol connection). During the sending process, the system will ensure the correct transmission of the file, encapsulate and transmit it through the various layers of the network protocol stack until the file reaches the target printer.
[0043] If an error occurs during the sending process (such as network interruption, file loss, etc.), the system will handle it accordingly. For example, if the network is interrupted, the system will wait for the network to recover and then resend the file; if the file is lost, the system will try to resend the file or get the file from the backup and resend it. After receiving the print driver file, the target printer will start the print task according to the instructions and settings in the file. The printer will first parse the print driver file to obtain the relevant printing parameters and instructions. Then, based on these parameters and instructions, it will start processing the print task, such as paper feeding, inkjet or laser printing, etc. At the same time, the print driver system will locally record relevant information about the print task, such as the task start time, estimated completion time, print parameter settings, etc., for subsequent monitoring and management.
[0044] In the above embodiments, the intelligent and precise printing configuration is achieved by using the mDNS protocol to obtain a list of potential printing devices, the SNMP protocol to establish communication and obtain key attribute information, the configuration scheme generation model to generate a printing task configuration scheme, and the print driver file to drive printing.
[0045] The following describes the application framework of this embodiment. Figure 3 , Figure 3 It is a schematic diagram of an application framework of the printer intelligent printing method in this embodiment.
[0046] exist Figure 3In the invention, the printing driver system includes a router, which receives various types of printing devices and devices related to different operating systems, including AirPrint printing device 1 and AirPrint printing device 2 that follow the AirPrint standard, and network printing device 3 that does not support AirPrint but supports IPP / IPPS, LPD, SOCKET and other protocols. In addition, the router also receives all Linux / Unix systems installed with the present invention and the discovery system of the present invention. The discovery system of the present invention uses mDNS and SNMP protocols to discover printing devices. For different printing devices, the process of discovery and attribute acquisition is as follows: For AirPrint printing device 1, it can be discovered through mDNS and SNMP protocols. After discovery, the properties of the printer are obtained using the IPP protocol or the SNMP protocol. After obtaining the properties, the system can automatically generate a PPD file and a configuration file. The PPD file here may be used to record information related to the printing task or to present the printer properties in some form of documentation, and the configuration file is used for the accurate configuration of subsequent printing tasks. Similarly, for AirPrint printing device 2, it is also discovered through mDNS and SNMP protocols, and then the properties are obtained with the help of IPP or SNMP, and then the PPD file and configuration file are automatically generated. For network printing devices including those that do not support AirPrint, the discovery system can still discover it through mDNS and SNMP protocols, and then obtain its properties through IPP or SNMP, and after judging that the present invention can support the device (it may be judged based on the obtained property information), it also automatically generates PPD files and configuration files. In the whole process, mDNS and SNMP protocols play a key role. The mDNS protocol is used to discover devices in the network. It broadcasts the name and address information of the device in the network by multicasting messages, so that the discovery system of the present invention can find the printing device in the network. The SNMP protocol is used to obtain the detailed properties of the printer. By communicating with the printer, the SNMP protocol can obtain various parameters of the printer, including but not limited to the model of the device, paper processing capabilities, color mode settings, consumables status and other information. These detailed property information is crucial for the subsequent PPD file generation and configuration file generation. After obtaining the printer properties, the system automatically generates PPD files and configuration files. The generation of PPD files can facilitate users to view relevant information about the printer, or as a way to record printing tasks and device status.
[0047] After combining the above content, the following is a more detailed description of the process of the method provided by this implementation. Figure 4 , is another flow chart of the printer intelligent printing method in an embodiment of the present application.
[0048] S401, real-time monitoring of the target printer's consumables status information through the SNMP protocol; The print driver system will periodically (for example, at regular intervals, such as 5 minutes) send SNMP query messages to the target printer to inquire about the consumable status information. These query messages contain specific instructions for obtaining different types of consumable information, such as the remaining ink cartridges, the remaining life of the toner cartridges, the remaining number of sheets of paper (if the printer has a paper quantity monitoring function), etc. After receiving the query message, the target printer will obtain the corresponding consumable status information based on its own sensors and internal programs, and encode it into the format specified by the SNMP protocol, and then send a response message to the print driver system. After receiving the response message, the print driver system will parse the message, extract the consumable status information, and store it in a local data structure for subsequent use and analysis.
[0049] In addition to the conventional monitoring of consumable status information, the system can dynamically adjust the consumable warning threshold based on the historical usage pattern of the printer. The system records the frequency of use and consumable consumption of the printer in different time periods (such as different time periods of the day, different working days of the week, etc.). For example, if it is found that the printer is used more frequently in the morning from Monday to Friday and the consumables are consumed faster, the system can lower the consumable warning threshold in the morning period accordingly, so as to issue prompts to add consumables more promptly. On the contrary, if the printer is used less frequently in certain periods, the system can appropriately increase the warning threshold for that period to avoid issuing unnecessary prompts too early. This dynamic adjustment mechanism can provide more accurate consumable warnings based on actual usage, improving the continuity and efficiency of printing tasks.
[0050] S402, if the consumables status information meets the preset conditions, then send a reminder to add consumables to the user end; Preset conditions can be set according to different consumable types and printer characteristics. For example, for ink cartridges, the preset condition may be that the remaining amount is less than a certain percentage (such as 10%), or the remaining amount is less than a certain absolute value (such as 5 ml); for toner cartridges, it may be that the remaining life is less than a certain number of printed pages (such as 100 pages) or the remaining life is less than a certain time threshold (such as 1 day, if calculated based on the average daily printing volume); for paper, the preset condition may be that the remaining quantity is less than a certain number (such as 10 sheets).
[0051] When the consumables status information monitored by the print driver system meets these preset conditions, the reminder mechanism for adding consumables will be triggered. The print driver system will send a reminder to add consumables to the user through a network connection. The prompt information can be in various forms, such as pop-up windows, email notifications, mobile phone text messages (if the user-side device supports the SMS receiving function), etc. The pop-up window can be displayed on the user's print management software interface to clearly inform the user which consumables need to be added and the approximate remaining amount. Email notifications can contain more detailed information, such as the name of the printer, the specific situation of the consumables, and the recommended time to add them. Mobile phone text messages can provide concise reminder information, allowing users to understand the situation in a timely manner.
[0052] S403, obtaining priority information of a newly added print task sent by the user terminal; The user-side print management software will provide an interface for users to set the priority of newly added print tasks. Users can set tasks to high, medium, low, etc. according to the importance and urgency of the task. When users submit new print tasks, the user side will send the set priority information to the print driver system.
[0053] The print driver system receives the priority information from the user and stores it in a local data structure for subsequent use. For example, if a user sets a print task to high priority, the print driver system will record the relevant information of the task (such as task name, file size, printing requirements, etc.) and its high priority. In addition to the priority set by the user, the system can dynamically adjust the priority based on the content of the newly added print task and the current resource status of the printer. For example, if a newly added print task is to print an urgent contract document, the system will automatically increase its priority, even if the user sets it to medium priority.
[0054] If the current printer has sufficient supplies but there are many large files waiting to be printed in the print queue, the system can adjust the priority of the newly added print tasks based on the file size and the estimated printing time. For example, for a task with a smaller file and a shorter estimated printing time, the system can appropriately increase its priority so that it can be printed faster when the printer is idle, thereby improving printing efficiency.
[0055] S404, after obtaining the print task list of the target printer, calculating the redundant consumables of the target printer according to the print task list and the consumables status information, the redundant consumables amount refers to the amount of consumables remaining after the print task in the print task list is completed; The print driver system will obtain the current print task list of the target printer through the communication connection. This list contains all the task information waiting to be printed, such as task name, file size, printing requirements (including paper size, color mode, resolution, etc.) and task priority (if it has been set). The print driver system can send query commands to the printer through the SNMP protocol, and the printer will return a response data packet containing the print task list information.
[0056] After receiving the response data packet, the print driver system will parse it, extract the relevant information of each task, and store this information in a local data structure for subsequent calculation and processing. At the same time, the print driver system has monitored the consumable status information of the target printer in real time through the previous steps. This consumable status information includes the remaining amount of ink cartridges, the remaining life of toner cartridges, the remaining amount of paper (if the printer has a paper quantity monitoring function), etc. This information is also stored in a local data structure in a specific data format to facilitate subsequent calculations and analysis.
[0057] For each task in the print task list, the print driver system needs to analyze its possible consumables requirements. Based on the printing requirements of the task (such as paper size, color mode, resolution, etc.) and the printer's own characteristics (such as ink cartridge capacity, toner cartridge life, paper handling capacity, etc.), the system can estimate the approximate amount of ink cartridge ink consumed by each task, the amount of toner cartridge wear, and the amount of paper used. The print driver system first calculates the remaining ink cartridge ink, remaining toner cartridge life, and remaining paper quantity after completing all tasks in the current print task list. This is obtained by subtracting the estimated consumables demand for each task from the current consumables status information. For example, if the current remaining ink cartridge is 8 ml, and all tasks are estimated to consume a total of 5 ml of ink cartridge ink, then the remaining ink cartridge after completing all tasks is 3 ml. Then, the system defines these remaining consumables as redundant consumables. This redundant consumables is an indicator that comprehensively considers the remaining amount of multiple consumables such as ink cartridges, toner cartridges, and paper. It reflects how much consumable resources the printer has left for subsequent tasks after completing the current print task list.
[0058] S405, inputting the newly added print task into a preset equipment usage analysis model to obtain the predicted amount of the pending consumables, wherein the equipment usage analysis model is obtained by machine learning training based on a plurality of historical print task data and corresponding actual consumable usage data; In order to build a device usage analysis model, it is necessary to collect a large amount of historical printing task data and the corresponding actual consumables usage data. The historical printing task data includes the type of task (such as document printing, picture printing, poster printing, etc.), the specific requirements of the task (such as paper size, resolution, color mode, etc.), the relevant attributes of the printer (such as device model, paper handling capacity, color mode setting, etc.) and the final printing effect evaluation (such as whether the print quality meets the requirements, whether there are problems such as paper jams). The corresponding actual consumables usage data refers to the actual consumption of ink cartridges, toner cartridge wear, and paper usage in the process of completing these historical printing tasks. These data need to be sorted and labeled so that the model can understand and learn the rules. According to the characteristics of the data and the needs of the problem, select a suitable machine learning algorithm to build a device usage analysis model, use the training set to train the neural network model, and continuously adjust the weights and bias parameters of the model through the back propagation algorithm to minimize the error between the model's prediction results and the actual consumables usage.
[0059] When there is a new print task, the print driver system will input the relevant information of the new print task into the device usage analysis model. This information includes the type of task (such as document printing, picture printing, poster printing, etc.), the specific requirements of the task (such as paper size, resolution, color mode, etc.), and the relevant properties of the printer (such as device model, paper handling capacity, color mode setting, etc.). The print driver system will organize this information into a format that meets the model input requirements, such as converting it into a vector form, and then input it into the trained device usage analysis model. The device usage analysis model predicts the consumables demand of the new print task based on the input new print task information, combined with its own internal structure and the parameters obtained by training. The model will output the predicted amount of consumables to be consumed, which includes the amount of ink cartridges, the amount of toner cartridge wear, and the amount of paper used. In actual applications, as new print tasks are continuously executed, the system can collect more print task data and actual consumables usage data. These new data can be used to update the device usage analysis model to improve the accuracy and adaptability of the model. The system can update the model regularly or according to certain conditions (such as the model prediction error exceeds a certain threshold).
[0060] S406: If the amount of pending consumables is greater than the amount of redundant consumables, a request instruction for printing the newly added print task in priority is sent to the target printer.
[0061] The print driver system will compare the predicted amount of consumables to be prepared obtained from the device usage analysis model with the amount of redundant consumables calculated previously. If the amount of consumables to be prepared is greater than the amount of redundant consumables, this means that the demand for the new printing task cannot be met according to the current consumable resource situation, which may cause the new printing task to be interrupted during execution due to insufficient consumables. When the condition that the amount of consumables to be prepared is greater than the amount of redundant consumables is met, the print driver system will send a request instruction to the target printer to print the new printing task in priority. This instruction is sent to the target printer through an established communication connection (such as an SNMP protocol connection). The print driver system will encode the request instruction in the format of the SNMP protocol and then send it to the target printer. After receiving the request instruction, the target printer will adjust the print task queue according to its own internal program and priority settings, and increase the priority of the new printing task so that it can be executed in priority.
[0062] In the embodiment of the present application, through the process of real-time monitoring of the consumable status information of the target printer, sending a reminder to add consumables according to preset conditions, obtaining priority information of new printing tasks, calculating the amount of redundant consumables, predicting the amount of consumables to be added for new printing tasks, and adjusting the order of printing tasks according to comparison results, intelligent management and efficient utilization of printing resources are achieved, which not only improves the continuity and efficiency of printing tasks, but also solves various problems existing in the prior art, such as printing interruptions due to insufficient consumables and the inability to reasonably arrange printing tasks according to task priorities and resource conditions.
[0063] The following describes the print driver system in the embodiment of the present invention from the perspective of hardware processing. Figure 5 , is a schematic diagram of a physical device structure of a printing drive system in an embodiment of the present application.
[0064] It should be noted that Figure 5 The structure of the print driver system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0065] like Figure 5As shown, the print driver system includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 505, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 505. The CPU 501, the ROM 502 and the RAM 505 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0066] The following components are connected to the I / O interface 505: an input section 506 including an audio input device, a button switch, etc.; an output section 507 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0067] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the present invention are performed.
[0068] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0070] Specifically, the printing driver system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the printer intelligent printing method provided in the above embodiment is implemented.
[0071] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the print driver system described in the above embodiment; or may exist independently without being assembled into the print driver system. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the print driver system, the print driver system implements the printer intelligent printing method provided in the above embodiment.
[0072] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0073] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0074] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A printer intelligent printing method, applied to a printing drive system, characterized in that: The method comprises: Obtain a list of potential printing devices through the mDNS protocol, wherein the list of potential printing devices at least includes network address information of each printing device; Receiving a printer confirmation instruction sent by a user terminal, establishing a communication connection with a target printer in the potential printing device list by using the SNMP protocol, wherein the printer confirmation instruction includes target printer confirmation information; Sending a request data packet including a plurality of key attribute acquisition instructions to the target printer to acquire key attribute information of the target printer; After receiving the print task sent by the user, the print task and the key attribute information are input into the configuration scheme generation model to obtain the print task configuration scheme, wherein the configuration scheme generation model is obtained by machine learning training based on a plurality of historical print task data and corresponding configuration scheme examples in advance; The corresponding print driver file is determined according to the print task configuration scheme, and the print driver file is sent to the target printer for driver printing.
2. The method according to claim 1, characterized in that After receiving the print task sent by the user end, the print task and the key attribute information are input into the configuration scheme generation model to obtain the print task configuration scheme, and further includes: Upon receiving a request from a user to change a print task, a print task pause instruction is sent to the target printer; Generate a corresponding optimization plan according to the change printing task requirement, and generate a task optimization driver file according to the optimization plan; The task optimization driving file is sent to the target printer so that the target printer continues printing according to the optimization solution.
3. The method according to claim 1, characterized in that: After the step of determining the corresponding print driver file according to the print task configuration scheme and sending the print driver file to the target printer for driver printing, the method further includes: Real-time monitoring of the consumable status information of the target printer through the SNMP protocol; If the consumables status information meets the preset conditions, a reminder to add consumables is sent to the user terminal.
4. The method according to claim 3, characterized in that After the step of real-time monitoring the consumable status information of the target printer through the SNMP protocol, the method further includes: Get the priority information of the newly added print task sent by the user; After obtaining the print task list of the target printer, calculating the redundant consumables amount of the target printer according to the print task list and the consumables status information, wherein the redundant consumables amount refers to the amount of consumables remaining after completing the print tasks in the print task list; Determine the corresponding amount of consumables to be consumed according to the newly added printing task; If the amount of pending consumables is greater than the amount of redundant consumables, a request instruction for printing the newly added print task in priority is sent to the target printer.
5. The method according to claim 4, characterized in that The step of determining the corresponding amount of consumables to be consumed according to the newly added printing task specifically includes: The newly added printing task is input into a preset equipment usage analysis model to obtain the predicted amount of consumables to be consumed. The equipment usage analysis model is obtained by machine learning training based on multiple historical printing task data and corresponding actual consumable usage data.
6. The method according to claim 1, characterized in that After the step of determining the corresponding print driver file according to the print task configuration scheme and sending the print driver file to the target printer for driver printing, the method further includes: Monitor the operating status information of the target printer in real time through the SNMP protocol; If it is detected that the running status information is to pause the printing task, then the error code of the target printer is obtained; Analyze the error cause and repair suggestion corresponding to the error code according to the preset error code strategy library; Sending printer failure prompt information to the user terminal, wherein the printer failure prompt information includes the error cause and the repair suggestion.
7. The method according to claim 1, characterized in that After receiving the printer confirmation instruction sent by the user end, the step of establishing a communication connection with the target printer in the potential printing device list by using the SNMP protocol also includes: If the first communication connection attempt does not receive a feedback response from the target printer within the set time, multiple retries are performed according to the set reconnection interval, and error status information of each connection attempt is recorded; If the communication connection is still not successful after the set number of times, the error status information is sent to the user end.
8. A printing drive system, characterized in that: The print driver system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the print driver system to execute the method described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on a print driver system, the print driver system is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product runs on a print driver system, the print driver system is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent printing parameter adjusting method and system based on AI assistance
CN121209807A