Non-driver printing method and device based on standardized protocol and electronic equipment

Through the driveless printing method based on standardized protocols, direct communication between the printer and the target device is achieved, the complexity and inefficiency of traditional printing device management in a multi-platform environment is solved, and the convenience and compatibility of printing are improved.

CN119828989APending Publication Date: 2025-04-15SHENZHEN PUTIE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411904709.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Traditional printing device management faces challenges in a multi-platform environment, requiring the installation of specific drivers to communicate with the printer, increasing the complexity of device management and inefficiency in printing.

Method used

The driveless printing method based on standardized protocol is adopted to detect target devices that support driveless printing and establish communication connections using preset standardized protocols to achieve direct communication between the printer and the target device without installing a dedicated printing driver.

Benefits of technology

It simplifies the deployment and use process of printers, improves printing convenience and compatibility, realizes high-quality print output, and meets users' personalized printing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828989A_ABST
    Figure CN119828989A_ABST
Patent Text Reader

Abstract

The invention discloses a drive-free printing method and device based on a standardized protocol and electronic equipment, and relates to the field of data processing. In the method, whether target equipment exists or not is detected, and the target equipment is equipment supporting non-driver printing; if the target equipment is successfully detected, establishing communication connection with the target equipment through a preset standardized protocol; acquiring a printing task sent by the target equipment; analyzing the printing task to obtain printing content and printing requirement parameters corresponding to the printing content; and according to the printing content and the printing requirement parameters, printing parameters are generated, and a printer is controlled to complete printing according to the printing parameters. By implementing the technical scheme provided by the invention, the printing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a driverless printing method, device and electronic device based on a standardized protocol. Background Art

[0002] With the widespread use of mobile devices and cloud computing technology, user needs have expanded from desktop printing to being able to print from any device anytime, anywhere.

[0003] Traditional printing device management faces challenges in multi-platform environments. Different operating systems, such as Windows, macOS, and Linux, typically require the installation of specific drivers to communicate with printers. This dependency not only increases the complexity of device management but also requires users to find, install, and maintain the correct driver version for each operating system, resulting in lower printing efficiency.

[0004] Therefore, there is an urgent need for a driverless printing method, device and electronic device based on a standardized protocol. Summary of the Invention

[0005] The present application provides a driverless printing method, device and electronic device based on a standardized protocol, which improves printing efficiency.

[0006] In the first aspect of the present application, a driverless printing method based on a standardized protocol is provided, the method comprising: detecting whether a target device exists, the target device being a device that supports driverless printing; if the target device is successfully detected, establishing a communication connection with the target device through a preset standardized protocol; obtaining a print task sent by the target device; parsing the print task to obtain print content and print requirement parameters corresponding to the print content; generating print parameters based on the print content and the print requirement parameters, and controlling the printer to complete printing based on the print parameters.

[0007] By adopting the above technical solution, direct communication between the printer and the target device is achieved by detecting target devices that support driverless printing and establishing a communication connection with the target device using a preset standardized protocol, without the need to install a dedicated print driver. This driverless printing method simplifies the deployment and use of printers, improving the convenience and compatibility of printing. Furthermore, the method parses the print task sent by the target device, extracts the print content and print requirement parameters, and dynamically generates optimized print parameters based on this information, controlling the printer to produce high-quality print output. This intelligent print parameter generation mechanism can adaptively adjust print settings based on different print content and requirements, thereby meeting the user's personalized printing needs.

[0008] Optionally, the detection of whether a target device exists specifically includes: broadcasting a device discovery request in the local network through a preset service discovery protocol; monitoring a sending device corresponding to the device discovery request to obtain a response message; determining whether a target identifier exists in the response message, the target identifier being an identifier corresponding to a sending device that supports driverless printing; if it is determined that the target identifier exists in the response message, determining that the sending device corresponding to the response message is the target device.

[0009] By adopting the above technical solution and utilizing a preset service discovery protocol, device discovery requests are broadcast on the local network, and the sending device of the device discovery request is monitored. By determining whether the response information contains a target identifier indicating support for driverless printing, the target device with driverless printing capability on the network can be accurately identified. This device detection mechanism based on the service discovery protocol can automatically scan all devices within the local area network and determine whether the target device supports driverless printing based on the response information, without the need for the user to manually configure or select the target device. At the same time, this method uses broadcast request and identifier matching technology to quickly and accurately discover target devices within the local area network and establish a direct connection with them, reducing the user's operation steps and waiting time.

[0010] Optionally, if the target device is successfully detected, a communication connection with the target device is established through a preset standardized protocol, specifically including: sending a print connection request to the target device, wherein the print connection request includes the device information and printing capability information of the printer; receiving connection confirmation information sent by the target device; and establishing a two-way communication channel with the target device based on the connection confirmation information.

[0011] By adopting the above technical solution, after detecting a target device that supports driverless printing, a print connection request is sent to the target device, conveying the local printer's device information and printing capability information, thereby achieving information synchronization and identity confirmation between the printer and the target device. After receiving the print connection request, the target device can evaluate the compatibility and adaptability of both parties based on the information provided by the printer. It then sends a connection confirmation message to indicate its acceptance of the printer's connection request and agreement to establish a two-way communication channel, thereby ensuring a secure and reliable connection between the printer and the target device and avoiding the risk of unauthorized access and data leakage. Furthermore, the print connection request includes the printer's printing capability information, allowing the target device to determine whether the printer meets the requirements of the current print task. During subsequent printing, the target device can dynamically adjust printing parameters based on the printer's actual capabilities, ensuring optimal print quality. Furthermore, by establishing a two-way communication channel, the printer and target device can exchange status information and control commands in real time, enabling dynamic monitoring and real-time feedback of the printing process, thereby improving printing stability and controllability.

[0012] Optionally, after parsing the print task to obtain the print content and the print requirement parameters corresponding to the print content, the method further includes: matching the print requirement parameters with the print capability information to determine whether there are any unmatched parameter items; if it is determined that there are unmatched parameter items, generating print parameters based on the print content and the print requirement parameters; if it is determined that there are no unmatched parameter items, generating a print capability mismatch report.

[0013] By employing this technical solution, after parsing a print job and extracting the print content and required print parameters, the system first compares the required print parameters with the printer's own print capability information to determine if any parameter mismatches exist. If any are determined to exist, the system automatically generates optimized print parameters based on the print content and required print parameters. This optimizes the printer's actual output capabilities without compromising print quality, ensuring successful completion of the print job. If no mismatches exist, a print capability mismatch report is generated.

[0014] Optionally, after parsing the print task to obtain the print content and the printing requirement parameters corresponding to the print content, the method further includes: determining the content type of the print task based on the print content, the content type including one or more of text, image and document; and determining the print mode corresponding to the content type in a preset print mode database based on the content type, the preset print mode database including the correspondence between content types and print modes.

[0015] By employing the above technical solution, after parsing a print task and extracting the print content, the system automatically determines the content type (e.g., text, image, or document) based on the print content's characteristics. Then, based on the identified content type, it searches for the corresponding print mode in a preset print mode database. This preset print mode database pre-defines the mapping between various content types and print modes. By intelligently matching content types with print modes, this method automatically selects a specific print mode based on the characteristics of the print content, implementing differentiated print optimization strategies for different content types, thereby significantly improving the overall quality and visual quality of the print output.

[0016] Optionally, the method further includes: acquiring a cloud printing task sent by a cloud server; generating cloud printing parameters according to the cloud printing task, and controlling the printer to complete printing according to the cloud printing parameters.

[0017] By adopting the above technical solution and introducing cloud printing tasks sent by the cloud server, cross-region and cross-platform cloud printing functions are realized. Users can submit cloud printing tasks to the cloud server anytime and anywhere through various terminal devices connected to the Internet, such as mobile phones, tablets, laptops, etc.

[0018] Optionally, obtaining the cloud printing task sent by the cloud server specifically includes: receiving a printing task acquisition request sent by the cloud server, the printing task acquisition request including a target printer identifier; determining whether the local printer identifier is consistent with the target printer identifier; if it is determined that the local printer identifier is consistent with the target printer identifier, sending a cloud printing task acquisition request to the cloud server; and receiving the cloud printing task sent by the cloud server.

[0019] By adopting the above technical solution, by receiving the print task acquisition request sent by the cloud server, extracting the target printer identifier from the print task acquisition request, and comparing it with the identification information of the local printer identifier, it is determined whether the current printer is the target device specified by the cloud, thereby achieving accurate matching and routing delivery between the cloud print task and the local printer. If it is confirmed that the local printer identifier is consistent with the target printer identifier in the cloud request, the print task acquisition request will be replied to the cloud server, clearly informing the server that the local printer is ready and requesting to obtain detailed print task content. After receiving the request, the cloud server will send the identified cloud print task to the local printer, completing the cloud-to-local print task transmission process.

[0020] In the second aspect of the present application, a driverless printing device based on a standardized protocol is provided, which includes a detection module, a communication module, an acquisition module, a parsing module and a processing module, wherein: the detection module is used to detect whether a target device exists, and the target device is a device that supports driverless printing; the communication module is used to establish a communication connection with the target device through a preset standardized protocol if the target device is successfully detected; the acquisition module is used to obtain a print task sent by the target device; the parsing module is used to parse the print task to obtain the print content and the print requirement parameters corresponding to the print content; the processing module is used to generate print parameters according to the print content and the print requirement parameters, and control the printer to complete printing according to the print parameters.

[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.

[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions. When the instructions are executed, any one of the methods described above is executed.

[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By detecting target devices that support driverless printing and establishing a communication connection with the target device using a preset standardized protocol, direct communication between the printer and the target device is achieved, eliminating the need to install a dedicated print driver. This driverless printing method simplifies printer deployment and usage, improving printing convenience and compatibility. Furthermore, the method parses the print job sent by the target device, extracts the print content and required printing parameters, and dynamically generates optimized printing parameters based on this information, controlling the printer to produce high-quality print output. This intelligent printing parameter generation mechanism can adaptively adjust print settings based on different print content and requirements, thereby meeting the user's personalized printing needs.

[0024] 2. Utilize the preset service discovery protocol to broadcast device discovery requests on the local network and monitor the sending device of the device discovery request. By determining whether the response information contains a target identifier indicating support for driverless printing, the target device with driverless printing capability on the network can be accurately identified. This device detection mechanism based on the service discovery protocol can automatically scan all devices in the local area network and determine whether it supports driverless printing based on the target device's response information, without the need for the user to manually configure or select the target device. At the same time, this method uses the technology of broadcast requests and identifier matching to quickly and accurately discover target devices in the local area network and establish a direct connection with them, reducing the user's operation steps and waiting time.

[0025] 3. After parsing the print job and extracting the print content and required print parameters, the printer compares the required print parameters with the printer's own print capability information to determine if any mismatches exist. If any are confirmed, the printer automatically generates optimized print parameters based on the print content and required print parameters. This optimizes the printer's actual output capabilities without compromising print quality, ensuring successful completion of the print job. If no mismatches exist, a print capability mismatch report is generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flowchart of a driverless printing method based on a standardized protocol disclosed in an embodiment of the present application; Figure 2This is a module diagram of a driverless printing device based on a standardized protocol disclosed in an embodiment of the present application; Figure 3 This is a structural diagram of an electronic device disclosed in an embodiment of the present application.

[0027] Explanation of the accompanying drawings: 201, detection module; 202, communication module; 203, acquisition module; 204, analysis module; 205, processing module; 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0029] In the description of the embodiments of this application, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a concrete manner.

[0030] In the description of the embodiments of the present application, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0031] This application provides a driverless printing method based on a standardized protocol. Figure 1 , Figure 1 This is a flowchart of a driverless printing method based on a standardized protocol provided in an embodiment of the present application. The method is applied to a printer, which is a printer equipped with a driverless printing system in an embodiment of the present application. The method includes steps S101 to S105, which are as follows: Step S101: Detect whether a target device exists, where the target device is a device that supports driverless printing.

[0032] In step S101, it is detected whether there is a target device, specifically including: broadcasting a device discovery request in the local network through a preset service discovery protocol; monitoring the sending device corresponding to the device discovery request to obtain response information; judging whether there is a target identifier in the response information, the target identifier is an identifier corresponding to a sending device that supports driverless printing; if it is determined that the target identifier exists in the response information, then determining that the sending device corresponding to the response information is the target device.

[0033] Specifically, the printer broadcasts a device discovery request on the local network using a pre-defined service discovery protocol. Pre-defined service discovery protocols are network protocols such as SSDP, mDNS, and DNS-SD. The printer broadcasts or multicasts the device discovery request to the local network. The device discovery request includes the printer's identification information and a description of the requested service.

[0034] After sending a device discovery request, the printer listens for responses from other devices on the network. Upon receiving a device discovery request, a driverless printing-capable device sends a response message containing its identification and service information to the printer. Upon receiving these response messages, the printer extracts the sending device information and stores it in its local device list.

[0035] Next, the printer analyzes the received response message to determine whether the sending device is a target device that supports driverless printing. Specifically, the printer checks whether the response message contains a predefined target identifier, which indicates that the sending device supports driverless printing. This target identifier can be a specific string, numeric code, or other form of tag, such as "_ipp._tcp" or "_print._tcp."

[0036] The printer checks each response message for a target identifier. If a response message contains a target identifier, the printer marks the sending device as a target device and adds it to the target device list. If a response message does not contain a target identifier, the printer treats the sending device as a normal device and does not process it as a target device for driverless printing.

[0037] For example, when a printer discovers multiple printer devices on the local network, it sends device discovery requests to these devices. Printers that support driverless printing include a target identifier (e.g., "_ipp._tcp") in their response messages, indicating driverless printing support. Upon receiving these responses, the printer extracts the target identifier and marks the printer containing the target identifier as a target device supporting driverless printing. However, for standard printers that do not support driverless printing, since their response messages do not include the target identifier, the printer will not include them in its target device list.

[0038] Step S102: If the target device is successfully detected, a communication connection with the target device is established through a preset standardized protocol.

[0039] In step S102, if the target device is successfully detected, a communication connection with the target device is established through a preset standardized protocol, specifically including: sending a print connection request to the target device, wherein the print connection request includes the device information and printing capability information of the printer; receiving connection confirmation information sent by the target device; and establishing a two-way communication channel with the target device based on the connection confirmation information.

[0040] Specifically, the printer sends a print connection request to the target device. This print connection request is based on a pre-defined standardized protocol, such as IPP (Internet Printing Protocol), AirPrint, Mopria, and Google Cloud Print. The print connection request includes the printer's device information and printing capability information, which are used to explain the printer's identity and service capabilities to the target device. Device information includes the printer's unique identifier, device type, and manufacturer, while printing capability information describes the printer's supported printing options, file formats, and paper sizes.

[0041] After receiving a print connection request, the target device verifies and parses the request to confirm the printer's legitimacy and compatibility. If the target device accepts the printer's connection request, it sends a connection confirmation message to the printer. This connection confirmation message, based on a standardized protocol, includes the target device's identity and a confirmation of the printer's printing capabilities.

[0042] After receiving the connection confirmation message from the target device, the printer extracts key information, such as the device ID and confirmation status code. Based on the confirmation result, the printer determines whether the communication connection with the target device has been successfully established. If the connection confirmation message indicates that the target device has accepted the printer's print connection request, the printer has successfully established a two-way communication channel with the target device.

[0043] Step S103: Acquire the print task sent by the target device.

[0044] In step S103, when the target device (such as the user's computer or mobile terminal) needs to print, it will encapsulate the print task into one or more data packets according to a preset standardized protocol and send them to the printer. The printer receives the print task sent by the target device.

[0045] Step S104: parsing the print task to obtain print content and print requirement parameters corresponding to the print content.

[0046] In step S104, the printer parses the received print job. Print jobs are encapsulated in standardized data formats (such as PCL and PostScript). The printer uses the corresponding parser to decode and decompose the print job based on the data format. The unpacked print job consists of two main components: print content and print parameters. The print content refers to the actual file data to be printed, such as text, images, and tables. The print parameters are additional print options and settings, such as paper type, print quality, color mode, and duplex printing.

[0047] For example, when a printer receives a print job for a Word document, it uses a Word format parser to decode the document content, extracting page elements such as text and images, and converting them into page description data in PostScript or PDF format. Simultaneously, the printer also parses the print job data to extract printing parameters such as "Duplex Print: Yes," "Paper Type: A4," and "Number of Copies: 3."

[0048] In one possible embodiment, after step S104, the method further includes: matching the printing requirement parameters with the printing capability information to determine whether there are any unmatched parameter items; if it is determined that there are no unmatched parameter items, generating printing parameters based on the printing content and the printing requirement parameters; if it is determined that there are unmatched parameter items, generating a printing capability mismatch report.

[0049] Specifically, the printer obtains its printing capability information. This information includes various parameters such as supported paper type, print size, resolution, color mode, and duplex printing, reflecting the printer's hardware configuration and functional features. After obtaining this information, the printer compares it with the print requirement parameters extracted from the print job, verifying whether the required print parameters are within the printer's capabilities—that is, whether the printer supports all parameters required for the print job. This comparison is performed using a parameter matching algorithm. The printer uses the required print parameters as a matching pattern and searches for corresponding matching items in the printing capability information.

[0050] If the comparison results show that all required printing parameters match the print capability information, the current printer can be determined to meet the print job requirements and no mismatched parameters exist. The printer then generates printing parameters based on the print content and required printing parameters. Printing parameters include paper settings, resolution, color correction, rendering mode, and more.

[0051] For example, suppose a print job requires color duplex printing on A4 coated paper at a print quality of 1200 dpi. The printer compares the printer and finds that it supports A4 paper, coated paper, color printing, duplex printing, and a maximum resolution of 1200 dpi, meeting the print job requirements. The printer then generates print parameters, setting the paper size to A4 coated paper, the color mode to CMYK color, duplex printing enabled, and the resolution to 1200 dpi.

[0052] In a possible embodiment, after step S104, the method further includes: determining the content type of the printing task based on the printing content, the content type including one or more of text, image, and document; and determining the printing mode corresponding to the content type in a preset printing mode database based on the content type, the preset printing mode database including a correspondence between content types and printing modes.

[0053] Specifically, the printer determines the content type based on the printed content. Printed content can be categorized into three main categories: text, images, and documents. Text content primarily includes characters, symbols, and tables, primarily in black and white. Image content includes bitmaps, photos, and illustrations. Documents are a combination of text and images, such as office documents, slides, and web pages.

[0054] Printers can automatically identify the type of printed content using various content analysis algorithms. For text content, printers use optical character recognition technology to convert printed content into editable text and count the number, type, and layout of characters and symbols. For image content, printers analyze the image's color distribution, level of detail, and compression format to determine whether it is a photograph, illustration, or other type of image. For document content, printers consider factors such as the proportion, layout, and style of the text and images to determine the document type.

[0055] After identifying the content type of the print content, the printer further queries the preset print mode database to find a print mode that matches the content type. The preset print mode database defines the correspondence between different content types and print modes. Each print mode includes a set of preset printing parameters, such as resolution, color settings, and rendering method. Based on the content type of the print content, the printer automatically matches the corresponding print mode in the preset print mode database and retrieves the preset printing parameters.

[0056] Step S105: Generate printing parameters according to the printing content and the printing requirement parameters, and control the printer to complete printing according to the printing parameters.

[0057] In step S105, the printer generates print parameters based on the print content and required print parameters. These parameters include resolution, color mode, rendering mode, and print speed. Resolution refers to selecting an appropriate print resolution based on the content type, such as 300dpi, 600dpi, or 1200dpi. Color mode refers to selecting a color mode, such as RGB, CMYK, or grayscale, based on whether the print content is color or black and white. Rendering mode refers to selecting an appropriate rendering mode, such as vector rendering or bitmap rendering, based on the layout and style of the print content, to balance print speed and image quality. Paper settings refer to setting the printer's paper feed, output tray, duplex unit, and other parameters based on the required paper type, size, and orientation. After generating the print parameters, the printer converts these parameters into underlying hardware control instructions and, based on these hardware control instructions, schedules its various hardware components to collaboratively complete the print output.

[0058] In a possible implementation, the method further includes: acquiring a cloud printing task sent by a cloud printer; generating cloud printing parameters according to the cloud printing task, and controlling the printer to complete printing according to the cloud printing parameters.

[0059] In a possible embodiment, obtaining a cloud printing task sent by a cloud printer specifically includes: receiving a print task acquisition request sent by the cloud printer, wherein the print task acquisition request includes a target printer identifier; determining whether the local printer identifier is consistent with the target printer identifier; if it is determined that the local printer identifier is consistent with the target printer identifier, sending a cloud printing task acquisition request to the cloud printer; and receiving the cloud printing task sent by the cloud printer.

[0060] Specifically, the printer listens for print task acquisition requests from cloud printers. The print task acquisition request is sent to the printer in the form of a network message or API call, which contains the identification information of the target printer. After receiving the print task acquisition request, the printer extracts the identification information of the target printer and compares it with the local printer. The printer compares the target printer identification in the cloud request with the local printer identification to determine whether there is a match. The judgment process is implemented using a string matching algorithm or hash mapping. If the local printer identification of the printer is exactly the same as the target printer identification, it is confirmed that it is the target printer designated by the cloud printer. At this time, the printer will send a cloud print task acquisition request to the cloud server and obtain the corresponding print task content. After the cloud printer receives the print task acquisition request from the printer, it will generate a cloud print task that matches the target printer based on the information provided in the print task acquisition request. After receiving the cloud print task sent by the cloud printer, the printer parses and processes it, generates a print instruction that matches the printer, and executes it to complete the cloud print task of the cloud server.

[0061] For example, suppose a user initiates a cloud print request from their mobile phone at home, hoping to print a PDF document to a printer located in the company office. The user selects the target printer in the cloud print app and uploads the PDF document. After receiving the user's print request, the cloud server generates a cloud print task containing the PDF file and print parameters and sends it to the printer in the company office. The printer compares the printer ID to confirm that it is the target printer specified by the user. The printer then requests the complete print task content from the cloud printer. After the cloud printer sends the print task to the printer, the printer parses it, generates print instructions, and prints the PDF document according to the print instructions, completing the remote cloud printing process.

[0062] Reference Figure 2The present application also provides a driverless printing device based on a standardized protocol, which is a printer. The printer includes a detection module 201, a communication module 202, an acquisition module 203, a parsing module 204 and a processing module 205, wherein: the detection module 201 is used to detect whether a target device exists, and the target device is a device that supports driverless printing; the communication module 202 is used to establish a communication connection with the target device through a preset standardized protocol if the target device is successfully detected; the acquisition module 203 is used to obtain a print task sent by the target device; the parsing module 204 is used to parse the print task to obtain the print content and the print requirement parameters corresponding to the print content; the processing module 205 is used to generate print parameters according to the print content and the print requirement parameters, and control the printer to complete printing according to the print parameters.

[0063] In one possible implementation, the detection module 201 detects whether a target device exists, specifically including: the detection module 201 broadcasts a device discovery request in the local network through a preset service discovery protocol; the detection module 201 monitors the sending device corresponding to the device discovery request to obtain response information; the detection module 201 determines whether a target identifier exists in the response information, and the target identifier is an identifier corresponding to a sending device that supports driverless printing; if the detection module 201 determines that the target identifier exists in the response information, it determines that the sending device corresponding to the response information is the target device.

[0064] In one possible implementation, if the communication module 202 successfully detects the target device, it establishes a communication connection with the target device through a preset standardized protocol, specifically including: the communication module 202 sends a print connection request to the target device, and the print connection request includes the device information and printing capability information of the printer; the communication module 202 receives the connection confirmation information sent by the target device; the communication module 202 establishes a two-way communication channel with the target device based on the connection confirmation information.

[0065] In one possible embodiment, after the processing module 205 parses the print task to obtain the print content and the print requirement parameters corresponding to the print content, the method further includes: the processing module 205 matches the print requirement parameters with the print capability information to determine whether there are any unmatched parameter items; if the processing module 205 determines that there are any unmatched parameter items, the processing module 205 generates print parameters based on the print content and the print requirement parameters; if the processing module 205 determines that there are no unmatched parameter items, the processing module 205 generates a print capability mismatch report.

[0066] In one possible embodiment, after the parsing module 204 parses the print task to obtain the print content and the printing requirement parameters corresponding to the print content, the method further includes: the parsing module 204 determines the content type of the print task based on the print content, and the content type includes one or more of text, image and document; the parsing module 204 determines the print mode corresponding to the content type in the preset print mode database based on the content type, and the preset print mode database includes the correspondence between content type and print mode.

[0067] In a possible implementation, the method further includes: the acquisition module 203 acquires a cloud printing task sent by the cloud server; the acquisition module 203 generates cloud printing parameters according to the cloud printing task, and controls the printer to complete printing according to the cloud printing parameters.

[0068] In a possible embodiment, the acquisition module 203 acquires the cloud printing task sent by the cloud server, specifically including: the acquisition module 203 receives the print task acquisition request sent by the cloud server, and the print task acquisition request includes the target printer identifier; the acquisition module 203 determines whether the local printer identifier is consistent with the target printer identifier; if the acquisition module 203 determines that the local printer identifier is consistent with the target printer identifier, the cloud printing task acquisition request is sent to the cloud server; the acquisition module 203 receives the cloud printing task sent by the cloud server.

[0069] It should be noted that the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0070] This application also provides an electronic device. Figure 3 , Figure 3 3. This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.

[0071] The communication bus 302 is used to implement the connection and communication between these components.

[0072] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0073] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0074] The processor 301 may include one or more processing cores. Using various interfaces and circuits, the processor 301 connects to various components within the server. It executes instructions, programs, code sets, or instruction sets stored in the memory 305, as well as accesses data stored in the memory 305, to perform various server functions and process data. Optionally, the processor 301 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 301 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 301 but implemented as a separate chip.

[0075] Among them, the memory 305 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also optionally be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3The memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for a driverless printing method based on a standardized protocol.

[0076] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call an application program stored in the memory 305 for a driverless printing method based on a standardized protocol. When executed by one or more processors 301, the electronic device 300 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited to the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.

[0077] The present application further provides a computer-readable storage medium storing instructions, which, when executed by one or more processors 301 , enable the electronic device 300 to perform one or more of the methods described in the above embodiments.

[0078] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

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

[0081] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0082] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application. The aforementioned memory includes various media that can store program code, such as USB flash drives, mobile hard drives, magnetic disks, or optical disks.

[0083] The foregoing is merely an exemplary embodiment of the present disclosure and is not intended to limit the scope of the present disclosure. In other words, any equivalent variations and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the disclosure and the practical implications thereof.

[0084] This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not described herein. The description and examples are to be considered as exemplary only, and the scope and spirit of the present disclosure are to be defined by the claims.

Claims

1. A driverless printing method based on a standardized protocol, characterized in that: The method comprises: Detecting whether a target device exists, wherein the target device is a device that supports driverless printing; If the target device is successfully detected, a communication connection with the target device is established through a preset standardized protocol; Obtaining a print task sent by the target device; Parsing the printing task to obtain printing content and printing requirement parameters corresponding to the printing content; Printing parameters are generated according to the printing content and the printing requirement parameters, and the printer is controlled to complete printing according to the printing parameters.

2. The method according to claim 1, characterized in that The detecting whether the target device exists specifically includes: Broadcast device discovery requests in the local network through a preset service discovery protocol; Monitor the sending device corresponding to the device discovery request and obtain response information; Determine whether there is a target identifier in the response information, where the target identifier is an identifier corresponding to a sending device that supports driverless printing; If it is determined that the target identifier exists in the response information, it is determined that the sending device corresponding to the response information is the target device.

3. The method according to claim 1, characterized in that: If the target device is successfully detected, establishing a communication connection with the target device through a preset standardized protocol specifically includes: Sending a print connection request to the target device, wherein the print connection request includes device information and print capability information of the printer; Receiving connection confirmation information sent by the target device; A bidirectional communication channel is established with the target device according to the connection confirmation information.

4. The method according to claim 3, characterized in that After parsing the print task to obtain the print content and the print requirement parameters corresponding to the print content, the method further includes: Matching the printing requirement parameters with the printing capability information to determine whether there are any unmatched parameter items; If it is determined that there is no unmatched parameter item, generating printing parameters according to the printing content and the printing requirement parameters; If it is determined that there are mismatched parameter items, a print capability mismatch report is generated.

5. The method according to claim 1, characterized in that After parsing the print task to obtain the print content and the print requirement parameters corresponding to the print content, the method further includes: Determining the content type of the printing task according to the printing content, where the content type includes one or more of text, image and document; According to the content type, a printing mode corresponding to the content type is determined in a preset printing mode database, wherein the preset printing mode database includes a corresponding relationship between content types and printing modes.

6. The method according to claim 1, characterized in that The method further comprises: Get the cloud printing task sent by the cloud server; According to the cloud printing task, cloud printing parameters are generated, and the printer is controlled to complete printing according to the cloud printing parameters.

7. The method according to claim 6, characterized in that The obtaining of the cloud printing task sent by the cloud server specifically includes: Receiving a print task acquisition request sent by a cloud server, wherein the print task acquisition request includes a target printer identifier; Determine whether the local printer identifier is consistent with the target printer identifier; If it is determined that the local printer identifier is consistent with the target printer identifier, a cloud printing task acquisition request is sent to the cloud server; Receive the cloud printing task sent by the cloud server.

8. A driverless printing device based on a standardized protocol, characterized in that: The device comprises a detection module (201), a communication module (202), an acquisition module (203), a parsing module (204) and a processing module (205), wherein: The detection module (201) is used to detect whether a target device exists, and the target device is a device that supports driverless printing; The communication module (202) is used to establish a communication connection with the target device through a preset standardized protocol if the target device is successfully detected; The acquisition module (203) is used to acquire the print task sent by the target device; The parsing module (204) is used to parse the printing task to obtain the printing content and the printing requirement parameters corresponding to the printing content; The processing module (205) is used to generate printing parameters according to the printing content and the printing requirement parameters, and control the printer to complete printing according to the printing parameters.

9. An electronic device, characterized in that: The electronic device (300) comprises a processor (301), a memory (305), a user interface (303) and a network interface (304), wherein the memory (305) is used to store instructions, the user interface (303) and the network interface (304) are used to communicate with other devices, and the processor (301) is used to execute the instructions stored in the memory (305) so that the electronic device (300) executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.

Citation Information

Cited By

  • Thermal printer integration method and device based on Android system printing service

    CN121501226A

  • Intelligent printing cloud box, system and method

    CN121918775A