CN115840544A - File printing method, computer program product, device, terminal and storage medium - Google Patents

File printing method, computer program product, device, terminal and storage medium Download PDF

Info

Publication number
CN115840544A
CN115840544A CN202111104447.XA CN202111104447A CN115840544A CN 115840544 A CN115840544 A CN 115840544A CN 202111104447 A CN202111104447 A CN 202111104447A CN 115840544 A CN115840544 A CN 115840544A
Authority
CN
China
Prior art keywords
printing
printing device
target file
target
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111104447.XA
Other languages
Chinese (zh)
Inventor
马璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111104447.XA priority Critical patent/CN115840544A/en
Publication of CN115840544A publication Critical patent/CN115840544A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a file printing method, a computer program product, a device, a terminal and a storage medium, wherein the file printing method comprises the following steps: when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device; in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file; detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file; and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file. The embodiment of the invention can improve the convenience and the success rate of printing the file.

Description

File printing method, computer program product, device, terminal and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to the field of computer technologies, and in particular, to a file printing method, a computer program product, an apparatus, a terminal, and a storage medium.
Background
At present, printing apparatuses have been widely used, and users can print electronic documents into paper documents by the printing apparatuses. The user generally prints the target file to be printed in two modes, wherein one mode refers to that the user can install a printing driver corresponding to the printing device at the terminal and establish communication connection between the terminal and the printing device by using a network cable, so that the user can transmit the target file in the terminal to the printing device and the printing device prints the target file. Another way is that the user may copy the target file to a removable storage, such as a removable hard disk or a flash disk, and then establish a communication connection between the removable storage and the printing apparatus using a Universal Serial Bus (USB) interface, so as to print the target file copied to the removable storage. It should be noted that, when the printing apparatus supports the USB connection, the user can establish a communication connection between the mobile storage and the printing apparatus through the USB interface, that is, the user needs to use the printing apparatus supporting the USB connection to print the target file in the mobile storage. Therefore, the operation of the user is complicated and the use is inconvenient.
Disclosure of Invention
The embodiment of the invention provides a file printing method, a computer program product, a device, a terminal and a storage medium, which can improve the convenience and the success rate of file printing.
In one aspect, an embodiment of the present invention provides a file printing method, where the method includes:
when an application program detects a trigger event for connecting a printing device, establishing target near field communication connection with the printing device and acquiring state information of the printing device;
in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file;
detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file.
In another aspect, an embodiment of the present invention provides a document printing apparatus, where the apparatus includes:
the printing device comprises a communication unit, a printing unit and a control unit, wherein the communication unit is used for establishing target near-field communication connection with the printing device and acquiring state information of the printing device when an application program detects a trigger event for connecting the printing device;
the processing unit is used for acquiring a target file to be printed in an application interface of the application program and determining printing resources required by the target file;
the processing unit is further used for detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
the communication unit is further configured to transmit the target file to the printing device based on the target close-range communication connection if the printing device has the capability of printing the target file, so that the printing device prints the target file.
In another aspect, an embodiment of the present invention provides a computer program product, where the computer program when executed by a processor implements the following steps:
when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device;
in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file;
detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file.
In another aspect, an embodiment of the present invention provides a terminal, where the terminal includes an input device and an output device, and the terminal further includes:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium storing one or more instructions adapted to be loaded by the processor and to perform the steps of:
when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device;
in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file;
detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file.
In yet another aspect, an embodiment of the present invention provides a computer storage medium, where one or more instructions are stored, and the one or more instructions are adapted to be loaded by a processor and execute the following steps:
when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device;
in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file;
detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file.
According to the embodiment of the invention, when the application program detects the trigger event for connecting the printing device, the target near-field communication connection can be established with the printing device, so that the file can be transmitted to the printing device based on the target near-field communication connection in the following process, the convenience of file transmission is improved, the file transmission does not need to be carried out by a server, and the network communication resource is saved. After the target file to be printed is obtained, the printing resources required by the target file can be determined, and the capability of the printing device for printing the target file is detected according to the state information of the printing device and the printing resources required by the target file; if the printing device has the capability of printing the target file, the target file can be transmitted to the printing device based on the target close-range communication connection, so that the printing device can successfully print the target file, and the printing success rate of the file is improved. Therefore, the printing device is subjected to capability detection before the file is transmitted, so that the situation of transmission resource waste caused by the fact that the target file is still transmitted to the printing device when the printing device does not have the capability of printing the target file can be effectively avoided; in addition, the whole file printing process is realized by means of the application program and the target near field communication connection, so that the user does not need to execute operations such as file copying, driver installation and the like, the user operation can be effectively simplified, and the convenience of file printing is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a system architecture diagram of a document printing system provided by an embodiment of the present invention;
FIG. 1b is a system architecture diagram of another document printing system provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a document printing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an application interface provided by an embodiment of the invention;
FIG. 4a is a schematic diagram of a near field communication link according to an embodiment of the present invention;
FIG. 4b is a schematic diagram of another exemplary close-proximity communication link;
FIG. 5 is a schematic flow chart diagram of another document printing method provided by the embodiment of the invention;
fig. 6a is a schematic diagram of a communication process according to an embodiment of the present invention;
FIG. 6b is a schematic diagram of another communication process provided by the embodiment of the invention;
FIG. 6c is a schematic diagram of another communication process provided by the embodiment of the invention;
FIG. 7a is a schematic diagram of another exemplary close-proximity communication link;
FIG. 7b is a schematic diagram of another exemplary close-proximity communication link;
FIG. 7c is a schematic diagram of another exemplary close-proximity communication link;
FIG. 7d is a schematic diagram of another exemplary close-proximity communication link;
FIG. 8 is a schematic diagram of another application interface provided by embodiments of the present invention;
FIG. 9 is a schematic diagram of another exemplary embodiment of a proximity communication link;
FIG. 10 is a schematic structural diagram of a document printing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
The embodiment of the invention relates to a near field communication technology; the near field communication technology refers to a communication technology in which both communication transceivers transmit information via radio waves and the transmission distance is less than a distance threshold, and includes, but is not limited to: wireless-Fidelity (WIFI), bluetooth (bluetooth), and Near Field Communication (NFC), among others. The distance thresholds corresponding to different near field communication technologies are different, such as tens of meters or tens of meters. Components that communicate based on a near field communication protocol as indicated by near field communication technology may be referred to as communication components, including but not limited to: a WIFI component, a bluetooth component, and an NFC component, among others. The communication component can be arranged in any terminal, so that any terminal can have a near field communication function, and the any terminal can communicate with nearby equipment based on a near field communication technology. It is understood that the distance between the nearby device and any of the terminals is smaller than the distance threshold corresponding to the near field communication technology used by the nearby device.
The WIFI is a technology allowing the terminal to connect to a Wireless Local Area Network (WLAN), and supports a communication distance of tens of meters or tens of meters; it mainly can realize the networking through radio wave, if certain equipment has launched the WIFI signal, then all can adopt the WIFI connected mode to network at the other equipment of the effective range of the electric wave coverage of this equipment. Bluetooth is a wireless technical standard, and supports a communication distance of ten meters or dozens of meters; the device can support short-distance data exchange between fixed equipment or mobile equipment, and further combines a communication technology and a computer technology, so that various equipment can realize mutual communication or operation in a short-distance range under the condition of no mutual connection of wires or cables, such as a Bluetooth headset or a Bluetooth mouse. NFC is a short-range high-frequency radio technology and supports communication distances of several centimeters, tens of centimeters or tens of centimeters; the system is based on a non-contact Radio Frequency Identification (RFID) technology, combines a technology developed by an interconnection technology, combines functions of an induction type card reader, an induction type card and point alignment on a single chip, and can perform identification and data exchange with compatible equipment in a short distance, such as a traffic card or an induction key.
Based on the above-mentioned near field communication technology, an embodiment of the present invention first provides a document printing system, as shown in fig. 1a, the system may at least include: a terminal 11 and a printing device 12. The terminal 11 refers to any device having one or more communication components for communication based on a near field communication protocol; it may include, but is not limited to: smart phones, tablet computers, notebook computers, palmtop computers, personal Digital Assistants (PDAs), portable Media Players (PMPs), navigation devices, wearable devices, smart bands, pedometers, and other mobile terminals, as well as fixed terminals such as Digital TVs, desktop computers, and the like. The communication components of the terminal 11 that communicate based on the near field communication protocol include, but are not limited to: a WIFI component, a bluetooth component, and an NFC component, among others; also, a wide variety of applications may be run in the terminal 11, and a so-called application may refer to a computer program that performs one or more specific tasks, which may include but is not limited to: light applications, applets, streaming applications, and native applications, among others. The light application can be a full-function application program which is searched and used without downloading; the applet can refer to an application program which can be used without downloading and installing, and the applet can be opened in a scanning or searching mode; a streaming application may refer to a fully functional application that does not require installation, i.e., point-and-play; a native application may refer to an application program that can run directly on the current operating system.
Correspondingly, the printing device 12 may refer to any device that has one or more communication components for communication based on a near field communication protocol and has a printing function, such as an inkjet printer, a dot matrix printer, or a laser printer; moreover, one or more communication components that communicate based on the near field communication protocol and are built in the printing device 12 may be located in the same module, that is, the printing device 12 may include a module that supports one or more near field communication protocols, such as a Combo module, and the module supports both Bluetooth Low Energy (BLE) capability and WIFI capability. It should be noted that the printing apparatus 12 and the terminal 11 support at least one same near field communication technology, that is, at least one communication component exists between the printing apparatus 12 and the terminal 11 for communicating based on a near field communication protocol indicated by the same near field communication technology.
In the process of operating the file printing system, the terminal 11 (or the application program running in the terminal 11) may establish any near field communication connection, such as a WIFI connection or a bluetooth connection, with the printing apparatus 12. The terminal 11 (or an application program running in the terminal 11) may acquire data sent by the printing apparatus 12 through the near field communication connection and transmit a target file to be printed to the printing apparatus 12, so that the printing apparatus 12 can print the target file.
Further, for different close range communication connections, the terminal 11 (or the application program running in the terminal 11) may communicate with the printing apparatus 12 based on different close range communication protocols, for example, the terminal 11 (or the application program running in the terminal 11) may communicate with the printing apparatus 12 based on a first close range communication protocol, or may communicate with the printing apparatus 12 based on a second close range communication protocol. The first near field communication protocol may refer to: the number of terminals of the same type connectable in data transmission is equal to 1; the second close range communication protocol may refer to: the number of terminals of the same type connectable at the time of data transmission is more than 1.
It should be noted that, when the terminal 11 (or the application program running in the terminal 11) and the printing device 12 perform communication based on the first near field communication protocol, other terminals (or application programs running in other terminals) except the terminal 11 need to wait for the terminal 11 (or the application program running in the terminal 11) to disconnect the near field communication connection corresponding to the first near field communication protocol from the printing device 12, and then can establish the near field communication connection corresponding to the first near field communication protocol with the printing device 12, and perform communication based on the first near field communication protocol. For example, the first close-range communication protocol may be a bluetooth protocol, that is, only one terminal (or an application running in one terminal) may establish a bluetooth connection with the printing apparatus 12 at a time. When the terminal 11 (or the application program running in the terminal 11) and the printing apparatus 12 perform communication based on the second near field communication protocol, other terminals (or application programs running in other terminals) than the terminal 11 may also establish a near field communication connection corresponding to the second near field communication protocol with the printing apparatus 12, and perform communication based on the second near field communication protocol. For example, the second close-range communication protocol may be a WIFI protocol, that is, there may be multiple terminals (or applications running within multiple terminals) at the same time to establish a WIFI connection with the printing device 12.
Referring to fig. 1b, the document printing system according to the embodiment of the present invention may further include an internet of things platform 13. The internet of things platform 13 may refer to an integrated platform integrating one or more capabilities, including but not limited to: device management, data security communication and message subscription, etc. The internet of things platform 13 corresponds to at least one server, and the at least one server may provide multiple services such as a data storage service, a resource service, and the like, may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and an artificial intelligence platform, and the like. Specifically, the terminal 11 (or an application program running in the terminal 11) may receive data sent by the printing device 12, and report the data to the internet of things platform 13, and the internet of things platform 13 may store the data, so that a manager of the printing device 12 may view the data of the printing device 12 through the internet of things platform 13.
Based on the above description of the document printing system, an embodiment of the present invention provides a document printing method. The file printing method may be executed by a target terminal or an application program running in the target terminal, wherein the target terminal may refer to the terminal 11 in the above-mentioned file printing system. For convenience of explanation, the following description will be given taking an example in which an application program running in the target terminal executes a file printing method. Referring to fig. 2, the file printing method may include the following steps S201 to S204:
s201, when the application program detects a trigger event for connecting the printing device, establishing target near field communication connection with the printing device, and acquiring the state information of the printing device.
Wherein, the triggering event includes but is not limited to: an event of monitoring a communication signal broadcast by the printing apparatus based on the first near field communication protocol, an event of detecting a user input of wireless network information of the printing apparatus in an application program, and the like. Accordingly, a target close-range communication connection may refer to any close-range communication connection established between an application running in the target terminal and the printing device, which may include, but is not limited to: WIFI connections, bluetooth connections, and NFC connections, among others. It can be understood that, after the application program running in the target terminal establishes the target close-range communication connection with the printing device, the application program and the printing device can perform data transmission through the target close-range connection.
Specifically, when the application program acquires the status information of the printing device, the status information of the printing device can be acquired through the target near field communication connection, that is, the printing device can transmit the status information to the application program through the target near field communication connection. The status information of the printing apparatus may include, but is not limited to: job status information, resource usage information, etc. Specifically, the above-mentioned operation status information may be used to indicate whether the printing apparatus is usable, that is, the operation status information may include, but is not limited to: available status and unavailable status, etc.; the resource usage information may include, but is not limited to: paper usage information, and consumable usage information (e.g., toner usage information), and so forth.
Alternatively, in an application interface of the application program, the application program may display status information of the printing apparatus. For example, referring to fig. 3, taking an application interface of an application program running in a target terminal as the application interface 301, assuming that the status information of the printing apparatus includes operating status information and resource usage information, and the operating status information is an available status and the resource usage information is paper usage information, the application program may display the status information of the printing apparatus, that is, the operating status information and the paper usage information of the printing apparatus, in the application interface 301. Specifically, the number 100 displayed on the application interface 301 by the application program may refer to the initial number of paper sheets of the printing apparatus being 100, and the number 80 may refer to the remaining available paper resources of the printing apparatus at the current system time being 80, that is, when the initial number of paper sheets included in the printing apparatus is 100, the number of paper sheets used by the printing apparatus at the current system time is 20. It should be understood that fig. 3 only exemplarily shows the application interface of the application program, and the present invention does not limit the specific representation form of the application interface of the application program, for example, when the status information of the printing apparatus is displayed in the application interface 301, the application interface 301 may not include information such as "select print file".
S202, in an application interface of the application program, the target file to be printed is obtained, and the printing resource required by the target file is determined.
Optionally, the application interface of the application program includes a selection control for selecting a print file, the user may perform a trigger operation on the selection control, after the user performs the trigger operation on the selection control, the application program may display at least one file in the application interface, and the user may select one or more files from the displayed at least one file, so that the application program may use the one or more files selected by the user as the target file. The user can also edit the target file to be printed in the application interface of the application program, that is, the user can newly create a file in the application interface of the application program and edit the content in the newly created file, so that the application program can use the newly created file edited by the user as the target file, and at this time, the content in the target file is the content edited by the user in the newly created file. The present invention is not limited to the specific embodiment in which the application program acquires the target file to be printed.
The at least one file displayed in the application interface may be all files in the terminal where the application program is located, or all files in a certain folder indicated by the application program, which is not limited in the present invention.
Taking an example that an application interface of an application program includes a selection control for selecting a print file, as shown in fig. 3, an application interface 301 of the application program includes a selection control 3011 for selecting a print file, and if a user performs a trigger operation (e.g., a click operation) on the selection control 3011, the application program may display at least one file in the application interface 302, where at least one file includes file 1, file 2, file 3, and file 4. Assuming that the user selects file 1 and file 2 among at least one file, the application may target the file selected by the user, that is, the application may target file 1 and file 2.
After the target file to be printed is acquired, the application program may determine the printing resources required by the acquired target file. The printing resources required by the target file may include, but are not limited to: paper resources and consumable resources, etc.; the paper resources may refer to paper required for printing the target document, and the consumable resources may refer to consumables, such as toner, etc., required for printing the target document.
S203, detecting the capability of the printing device to print the target file according to the state information of the printing device and the printing resource required by the target file.
After obtaining the status information of the printing device and determining the printing resources required for the target file, the application may detect the capability of the printing device to print the target file based on the status information of the printing device and the printing resources required for the target file. It is understood that the application program may detect whether the printing resource indicated by the status information of the printing apparatus satisfies the printing resource required for the target file, thereby detecting the capability of the printing apparatus to print the target file; if the printing resource indicated by the status information meets the printing resource required by the target file, the printing device has the capability of printing the target file, and then the application program can determine that the printing device has the capability of printing the target file; if the printing resources indicated by the status information do not satisfy the printing resources required by the target file, indicating that the printing device does not have the capability to print the target file, then the application may determine that the printing device does not have the capability to print the target file. Wherein, the printing resources indicated by the status information may refer to the remaining available resources of the printing apparatus, which may include but are not limited to: remaining available paper resources and remaining available consumable resources (e.g., remaining available toner resources), and so on.
S204, if the printing device has the capability of printing the target file, the target file is transmitted to the printing device based on the target near field communication connection, so that the printing device prints the target file.
In one particular implementation, after the printing device has completed printing the target document, the application may obtain new status information from the printing device based on the target close-range communication connection and send the new status information to an administrator of the printing device, so that the administrator may maintain the printing device based on the new status information.
In another specific implementation, if the printing device does not have the capability to print the target document, the application may send status information of the printing device to an administrator of the printing device, so that the administrator can maintain the printing device based on the status information.
Optionally, the application program may report the status information of the printing device to the internet of things platform, so that a manager of the printing device can check the status information of the printing device through the internet of things platform, thereby maintaining the printing device. For example, referring to fig. 4a, assuming that the application establishes a BLE connection with the printing device, and the application may acquire the status information sent by the printing device through the BLE connection, the application may report the status information of the printing device to the platform of the internet of things. Similarly, fig. 4a only shows an application interface of an application program by way of example, and the present invention is not limited to the specific representation form of the application interface.
Further, the target close-range communication connection may be disconnected when the printing apparatus completes printing the target document. Optionally, the target close-range communication connection may be disconnected by the application program, that is, the application program may disconnect the target close-range communication connection established with the printing apparatus, and the target close-range communication connection may also be disconnected by the printing apparatus, which is not limited in this disclosure. Further, if there is another close range communication connection between the application program and the printing apparatus besides the target close range communication connection, the other close range communication connection may also be disconnected. For example, referring to fig. 4b, assuming that the target close-range communication connection is a WIFI connection, the WIFI connection may be disconnected when the printing device has finished printing the target file; the BLE connection may also be disconnected if there is still a BLE connection between the application and the printing device. Similarly, fig. 4b only shows an application interface of an application program by way of example, and the present invention is not limited to the specific representation form of the application interface.
According to the embodiment of the invention, when the application program detects the trigger event for connecting the printing device, the target near-field communication connection can be established with the printing device, so that the file can be transmitted to the printing device based on the target near-field communication connection in the following process, the convenience of file transmission is improved, the file transmission does not need to be carried out by a server, and the network communication resource is saved. After the target file to be printed is obtained, the printing resources required by the target file can be determined, and the capability of the printing device for printing the target file is detected according to the state information of the printing device and the printing resources required by the target file; if the printing device has the capability of printing the target file, the target file can be transmitted to the printing device based on the target near field communication connection, so that the printing device can successfully print the target file, and the success rate of printing the file is improved. Therefore, the printing device is subjected to capability detection before the file is transmitted, so that the situation of transmission resource waste caused by the fact that the target file is still transmitted to the printing device when the printing device does not have the capability of printing the target file can be effectively avoided; in addition, the whole file printing process is realized by means of the application program and the target near field communication connection, so that the user does not need to execute operations such as file copying, driver installation and the like, the user operation can be effectively simplified, and the convenience of file printing is improved.
Fig. 5 is a schematic flow chart illustrating another file printing method according to an embodiment of the present invention. The file printing method may be executed by the target terminal or the application program running in the target terminal mentioned above, and for convenience of illustration, the file printing method executed by the application program running in the target terminal is described as an example in the following. As shown in fig. 5, the file printing method may include the following steps S501 to S506:
s501, when the application program detects a trigger event for connecting the printing device, the application program establishes target near field communication connection with the printing device and acquires the state information of the printing device.
In a specific implementation, the triggering event includes: monitoring an event of a communication signal broadcasted by the printing device based on a first near field communication protocol; in this case, when the application detects a trigger event for connecting to the printing apparatus, the specific implementation of the application establishing the target close-range communication connection with the printing apparatus may include the following steps s11 to s13:
and s11, when the application program detects a trigger event for connecting the printing device, calling a first communication component in the terminal where the application program is located, and establishing initial close-range communication connection with the printing device, wherein the first communication component is a component for performing communication based on a first close-range communication protocol.
For example, the first short-range communication protocol may be a bluetooth protocol, and the first communication module is a bluetooth module, and the initial short-range communication connection established with the printing apparatus is a bluetooth connection. Wherein, bluetooth connection includes but is not limited to: a bluetooth low energy connection, a conventional bluetooth connection, etc. It is understood that, when the first short-range communication protocol is a bluetooth protocol, the triggering event includes: an event of a communication signal broadcast by the printing device based on the bluetooth protocol is monitored.
For example, as shown in fig. 6a, assuming that the initial close range communication connection is a BLE connection and the printing device can perform a BLE broadcast, the application program may listen to the BLE broadcast performed by the printing device, thereby scanning for and establishing a BLE connection with the printing device.
And s12, receiving wireless network information sent by the printing device based on the initial close-range communication connection, wherein the wireless network information comprises an account and a password used when the printing device carries out communication based on a second close-range communication protocol.
For example, the second close-range communication protocol may be a WIFI protocol, and the wireless network information may include a WIFI account and a password used by the printing device when communicating based on the WIFI protocol. As shown in fig. 6a, after the initial close-range communication connection (i.e., BLE connection) is established, the application program may receive wireless network information transmitted by the printing apparatus.
And s13, calling a second communication component in the terminal where the application program is located, and establishing target near-field communication connection with the printing device according to the wireless network information, wherein the second communication component is a component for communication based on a second near-field communication protocol, and the allowable transmission rate of the second communication component is greater than that of the first communication component.
Specifically, the terminal where the application is located refers to the target terminal, that is, the application running in the target terminal may call the second communication component in the target terminal. For example, when the second close-range communication protocol is a WIFI protocol, the second communication component is a WIFI component, that is, the target close-range communication connection may refer to a WIFI connection. Wherein, the allowed transmission rate of the WIFI module is greater than the allowed transmission rate of the first communication module (such as the Bluetooth module).
For example, as shown in fig. 6b, assuming that the target close-range communication connection is a WIFI connection and the printing device can perform a WIFI broadcast, the application can scan and establish the WIFI connection with the printing device, so that the file can be transmitted through a User Datagram Protocol (UDP).
Before the target near field communication connection is established with the printing device according to the wireless network information, the application program can also display the wireless network information in an application interface of the application program. For example, referring to fig. 7a, assuming that the initial close-proximity connection refers to a BLE connection, based on the BLE connection, the application program may receive wireless network information transmitted by the printing apparatus and display the wireless network information in a display area 71 of an application interface of the application program. For example, as shown in fig. 7b, through the wireless network information, the application program may establish a WIFI connection with the printing device, so as to obtain an application interface that can select a target file to be printed. Similarly, fig. 7a and 7b only exemplarily show the application interface of the application program, and the present invention does not limit the specific representation form of the application interface.
Optionally, the display area where the wireless network information is located may be a connection control, and if the user performs a trigger operation on the connection control where the wireless network information is displayed, the application program may invoke a second communication component in the target terminal and establish a target near field communication connection with the printing apparatus according to the wireless network information, where the trigger operation may be a click operation of the user on the connection control or a long-time press operation of the user on the connection control, and a specific implementation manner of the trigger operation is not limited in the present invention. For example, as shown in fig. 7a, assuming that the display area 71 where the wireless network information is located is a connection control, if the user performs a triggering operation on the connection control in the display area 71, the application program may call a second communication component in the terminal (i.e., a target terminal) where the application program is located, and establish a WIFI connection (i.e., a target close-range communication connection) with the printing apparatus according to the wireless network information.
Optionally, the application program may display the wireless network information in an application interface of the application program, and if the user performs an input operation according to the wireless network information displayed in the application interface, the application program may call a second communication component in the terminal where the application program is located, and establish the target near field communication connection with the printing apparatus according to the wireless network information.
In this case, the application may acquire the status information of the printing apparatus when the initial close range communication connection is established with the printing apparatus, that is, the application may acquire the status information of the printing apparatus and the wireless network information based on the initial close range communication connection. As shown in fig. 6a, after scanning and establishing BLE connection with the printing device, the application program may acquire status information (i.e., operating status information and paper usage information) transmitted by the printing device and wireless network information. Further, as shown in fig. 6c, after receiving the status information sent by the printing apparatus, the application program may report the status information to the platform of the internet of things.
In another specific implementation, the triggering event includes: monitoring an event of a communication signal broadcasted by a printing device based on a first near field communication protocol; accordingly, when the application detects a trigger event for connecting to the printing apparatus, the specific embodiment of the application establishing the target close-range communication connection with the printing apparatus may include: executing step s11 and step s12 to obtain an initial close-range communication connection (such as a bluetooth connection) established with the printing device; calling a second communication component in the terminal where the application program is located, and establishing candidate close-range communication connection (such as WIFI connection) with the printing device according to the wireless network information; and determining the transmission rates of the initial close range communication connection and the candidate close range communication connection in real time or at intervals of preset time, and taking the close range communication connection with the maximum transmission rate as the target close range communication connection. It can be appreciated that when the transmission rate of the initial close range communication connection is greater than the transmission rate of the candidate close range communication connection, the application program may take the initial close range communication connection as the target close range communication connection; when the transmission rate of the initial close range communication connection is less than the transmission rate of the candidate close range communication connection, the application program can take the candidate close range communication connection as the target close range communication connection; when the transmission rate of the initial close range communication connection is equal to the transmission rate of the candidate close range communication connection, the application program may take any one of the initial close range communication connection and the candidate close range communication connection as the target close range communication connection.
Alternatively, the preset time period may be set by an application program, or may be set as desired by a user, such as 5 seconds(s) or 2 minutes (min).
In another specific implementation, the triggering event includes: monitoring an event of a communication signal broadcasted by a printing device based on a first near field communication protocol; accordingly, when the application detects a trigger event for connecting to the printing apparatus, the specific embodiment of the application establishing the target close-range communication connection with the printing apparatus may include: step s11 is performed and the initial close range communication connection (e.g. bluetooth connection) is used as the target close range communication connection.
In another specific implementation, the triggering event includes: detecting an event in the application program in which a user inputs wireless network information of the printing apparatus; the wireless network information comprises an account and a password used when the printing device communicates based on a second close-range communication protocol; accordingly, when the application detects a trigger event for connecting to the printing apparatus, the specific implementation of establishing the target close-range communication connection with the printing apparatus may be: and when the application program detects a trigger event for connecting the printing device, calling a second communication component in the terminal where the application program is located, and establishing target near-field communication connection with the printing device according to the wireless network information. Optionally, the user may input the wireless network information in an application interface of an application program, or may input the wireless network information in a setting interface of a terminal (i.e., a target terminal) where the application program is located, which is not limited in the present invention.
S502, in an application interface of the application program, the target file to be printed is obtained, and the printing resource required by the target file is determined.
Specifically, the application program may determine the printing resources required by the target document according to the number of pages of the target document, where the printing resources required by the target document may include one or more of paper resources and consumable resources (e.g., toner resources). It is noted that the amount of paper resources required for the target document is the same as the number of pages of the target document, and the consumable resources required for the target document can be calculated based on the number of pages of the target document. For example, assuming that the consumable resource refers to a toner resource, and 1 gram (g) of toner is expected to print 20 sheets, the number of pages of the target file is 60, then the application may determine that the toner resource required to print the target file is 3 grams.
S503, detecting the capability of the printing device to print the target file according to the status information of the printing device and the printing resource required by the target file.
Specifically, the status information includes: operating state information of the printing apparatus, and resource usage information of the printing apparatus; accordingly, according to the status information of the printing apparatus and the printing resources required by the target file, the specific implementation manner of detecting the capability of the printing apparatus to print the target file may be: determining a remaining available resource of the printing apparatus according to the resource usage information of the printing apparatus when the job status information indicates that the printing apparatus is in an available state; if the remaining available resources are more than or equal to the printing resources required by the target file, determining that the printing device has the capability of printing the target file; if the remaining available resources are less than the printing resources required for the target file, it is determined that the printing device does not have the capability to print the target file.
Further, the application program may acquire initial resource information of the printing apparatus when determining the remaining available resources of the printing apparatus based on the resource usage information of the printing apparatus, and determine the remaining available resources of the printing apparatus based on the initial resource information and the resource usage information.
For example, assuming that the resource usage information refers to the number of sheets used by the printing apparatus, the initial resource information may refer to the initial number of sheets included in the printing apparatus, and when the initial number of sheets is 100 and the number of sheets used is 20, the application program may determine the remaining available resources of the printing apparatus according to the initial resource information and the resource usage information, that is, determine the remaining available sheet resources of the printing apparatus to be 80 sheets. Further, assuming that the printing resources required for the target file refer to the paper resources required for the target file, and the paper resources required for the target file are 60 sheets, the remaining available paper resources of the printing apparatus are more than the paper resources required for the target file, and the application program may determine that the printing apparatus has the capability of printing the target file.
When the printing resources required by the target file comprise paper resources and consumable resources, if the remaining available paper resources indicated by the remaining available resources are more than or equal to the paper resources required by the target file and the remaining available consumable resources indicated by the remaining available resources are more than or equal to the consumable resources required by the target file, the application program can determine that the printing device has the capability of printing the target file; otherwise, the application may determine that the printing device does not have the capability to print the target file.
For example, suppose the consumable resource refers to a toner resource, and the remaining available paper resource indicated by the remaining available resource of the printing apparatus is 80 sheets, and the remaining available toner resource indicated by the remaining available resource of the printing apparatus is 2 grams. If the paper resource required by the target file is 60 and the carbon powder resource required by the target file is 1 gram, that is, the remaining available paper resource of the printing device is more than the paper resource required by the target file, and the remaining available carbon powder resource of the printing device is more than the carbon powder resource required by the target file, the application program can determine that the printing device has the capability of printing the target file; if the paper resource required by the target file is 60 and the toner resource required by the target file is 3 g, that is, the remaining available paper resource of the printing device is more than the paper resource required by the target file, and the remaining available toner resource of the printing device is less than the toner resource required by the target file, the application program may determine that the printing device does not have the capability of printing the target file.
Optionally, before the application program detects the capability of the printing device to print the target file according to the status information of the printing device and the printing resource required by the target file, the application program may first detect the capability of the printing device to print the target file according to the working status information in the status information of the printing device; if the working status information is available, the application program may execute step S503; if the operation status information is disabled (e.g., the printing apparatus is in a jammed state), the application may determine that the printing apparatus does not have the capability of printing the target file, that is, when the operation status information is disabled, the application may determine that the printing apparatus does not have the capability of printing the target file directly according to the operation status information without performing step S503.
And S504, if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target near field communication connection.
As shown in fig. 6b, the application may upload the file to the printing device, i.e. the application may transfer the target file to the printing device. In the process of transmitting the target file to the printing device by the application program, the application program can display the transmission progress of the target file by the application program in an application interface of the application program. For example, referring to fig. 7c, assuming that the target file includes file 1 and file 2, in the process of transferring the target file to the printing apparatus by the application program, the progress of the transfer of the target file by the application program may be displayed in the display area 72 of the application interface of the application program. It can be understood that the application program may update the transmission progress of the target file in real time and display the updated transmission progress in the application interface until the application program successfully transmits the target file to the printing apparatus, that is, until the transmission progress of the target file by the application program reaches 100%. Similarly, fig. 7c only shows an application interface of an application program by way of example, and the present invention is not limited to the specific representation form of the application interface.
And S505, after the target file is successfully transmitted to the printing device, displaying a printing control in an application interface of the application program.
It can be understood that the application program may display the print control in the application interface of the application program after the target file is successfully transmitted to the printing device, that is, the application program may display the print control in the application interface of the application program after the transmission progress of the target file by the application program reaches 100%. For example, as shown in fig. 7d, the target file includes file 1 and file 2, and after the target file is successfully transmitted to the printing device, the application program may display a print control in the application interface of the application program, that is, display a print control in the display area 73 of the application interface, and the control identification of the print control may be "start printing". Similarly, fig. 7d only shows an application interface of an application program by way of example, and the present invention is not limited to the specific representation form of the application interface.
Optionally, the application program may display a print control in the application interface before the target file is successfully transmitted to the printing device, where the print control is in an triggerable state; when the target file is successfully transmitted to the printing device, the application program can update the printing control displayed in the application interface to be in a triggerable state. For example, referring to fig. 8, before the target file is successfully transmitted to the printing apparatus, the application program may display the print control 811 on the application interface 81, where the transmission progress of the target file by the application program is 60%, that is, the current system time is in the process of transmitting the target file by the application program, and then the print control 811 is in a non-touch state, that is, when the user performs any operation on the print control 811, the application program fails to respond to the operation performed on the print control 811 by the user. Upon successful transfer of the target file to the printing device, the application may update the print control to a triggerable state and display the updated print control (i.e., print control 821) in application interface 82.
S506, when the print control is triggered, the printing apparatus is notified to start printing the target file.
Optionally, the user may perform a click operation on the print control, or may perform a long-time press operation on the print control to trigger the print control.
Specifically, as shown in fig. 6b, the application may notify the printing apparatus to start printing the target file, i.e., start printing the file uploaded to the printing apparatus by the application. Optionally, the printing apparatus may further check whether the remaining available paper resources in the current system time meet the paper resources required for printing the target file before starting printing, and may report the check result to the application program.
Further, in the process of printing the target file by the printing device, the application program can receive the printing progress information about the target file sent by the printing device, and display the printing progress information in an application interface of the application program. It should be noted that the application program can receive the printing progress information about the target file sent by the printing device in real time, and can update the printing progress information in the application interface in real time. For example, referring to fig. 9, in the process of printing the target file by the printing device, the application program may receive printing progress information of the printing device about the target file and display the printing progress information in an application interface of the application program; it can be understood that, at this time, the printing apparatus has printed 8 pages of content in the target document, and the target document has 10 pages of content in total, i.e., the printing progress of the target document by the printing apparatus is 80%. It is noted that the application program can receive the printing progress information of the printing device about the target file in real time, and update the printing progress information in the application interface of the application program in real time. Similarly, fig. 9 is only an exemplary representation of an application interface of an application program, and the present invention is not limited to the specific representation form of the application interface.
When the printing device finishes printing the target file, the application program can display a finishing identifier of the printing device finishing printing the target file in the application interface. It is understood that the printing apparatus completing printing of the target file may refer to: the printing progress of the printing apparatus with respect to the target file is 100%. For example, as shown in fig. 4b, when the printing apparatus finishes printing the target file, the application may display a finish identifier of the printing apparatus finishing printing the target file in the application interface, and taking the finish identifier as "print finish" as an example, the application may display a finish identifier of "print finish" in the application interface.
According to the embodiment of the invention, when the application program detects the trigger event for connecting the printing device, the target near field communication connection can be established with the printing device, so that the file can be transmitted to the printing device based on the target near field communication connection in the following process, the convenience of file transmission is improved, the file transmission does not need to be carried out by a server, and the network communication resource is saved. After the target file to be printed is obtained, the printing resource required by the target file can be determined, and the capability of the printing device for printing the target file is detected according to the state information of the printing device and the printing resource required by the target file; if the printing device has the capability of printing the target file, the target file can be transmitted to the printing device based on the target close-range communication connection; and after the target file is successfully transmitted to the printing device, the printing control can be displayed in an application interface of the application program, and when the printing control is triggered, the printing device is informed to start printing the target file, so that the printing success rate of the file is improved, the printing starting time of the target file is effectively controlled, and the condition that the printing device is crowded is avoided. Therefore, the printing device is subjected to capability detection before the file is transmitted, so that the situation of transmission resource waste caused by the fact that the target file is still transmitted to the printing device when the printing device does not have the capability of printing the target file can be effectively avoided; in addition, the whole file printing process is realized by means of the application program and the target near field communication connection, so that the user does not need to execute operations such as file copying, driver installation and the like, the user operation can be effectively simplified, and the convenience of file printing is improved.
Based on the description of the related embodiments of the above-described document printing method, embodiments of the present invention also provide a document printing apparatus, which may be a computer program (including program code) running in a target terminal. The document printing apparatus may execute the document printing method shown in fig. 2 or 5; referring to fig. 10, the document printing apparatus may operate as follows:
a communication unit 1010, configured to establish a target near field communication connection with a printing apparatus and acquire status information of the printing apparatus when an application detects a trigger event for connecting the printing apparatus;
a processing unit 1020, configured to obtain, in an application interface of the application program, a target file to be printed, and determine a printing resource required by the target file;
the processing unit 1020 is further configured to detect, according to the status information of the printing apparatus and the printing resource required by the target file, the capability of the printing apparatus to print the target file;
the communication unit 1010 is further configured to transmit the target file to the printing apparatus based on the target close-range communication connection if the printing apparatus has the capability of printing the target file, so that the printing apparatus prints the target file.
In one embodiment, the operating status information of the printing apparatus, and the resource usage information of the printing apparatus; correspondingly, when the processing unit 1020 is configured to detect the capability of the printing apparatus to print the target file according to the status information of the printing apparatus and the printing resource required by the target file, it may specifically be configured to:
when the working state information indicates that the printing device is in an available state, determining the remaining available resources of the printing device according to the resource use information of the printing device;
if the remaining available resources are more than or equal to the printing resources required by the target file, determining that the printing device has the capability of printing the target file;
if the remaining available resources are less than the printing resources required by the target file, determining that the printing device does not have the capability of printing the target file.
In another embodiment, the communication unit 1010 is further configured to:
if the printing device does not have the capability of printing the target file, sending the state information of the printing device to a manager of the printing device, and enabling the manager to maintain the printing device based on the state information;
or after the printing device finishes printing the target file, acquiring new state information from the printing device based on the target close-range communication connection, and sending the new state information to a manager of the printing device, so that the manager maintains the printing device based on the new state information.
In yet another embodiment, the triggering event includes: monitoring an event of a communication signal broadcasted by the printing device based on a first near field communication protocol; correspondingly, when the communication unit 1010 is configured to establish a target near field communication connection with the printing apparatus when the application detects a trigger event for connecting the printing apparatus, the communication unit may be specifically configured to:
when an application program detects a trigger event for connecting a printing device, calling a first communication component in a terminal where the application program is located, and establishing initial close-range communication connection with the printing device, wherein the first communication component is a component for communication based on a first close-range communication protocol;
receiving wireless network information sent by the printing device based on the initial close range communication connection, wherein the wireless network information comprises an account number and a password used when the printing device carries out communication based on a second close range communication protocol;
and calling a second communication component in the terminal where the application program is located, and establishing target near-field communication connection with the printing device according to the wireless network information, wherein the second communication component is a component for communication based on a second near-field communication protocol, and the allowable transmission rate of the second communication component is greater than that of the first communication component.
In yet another embodiment, the triggering event includes: detecting an event in the application program in which a user inputs wireless network information of the printing apparatus; the wireless network information comprises an account and a password used when the printing device communicates based on a second close-range communication protocol; correspondingly, when the communication unit 1010 is configured to establish a target near field communication connection with the printing apparatus when the application detects a trigger event for connecting the printing apparatus, the communication unit may be specifically configured to:
and when the application program detects a trigger event for connecting the printing device, calling a second communication component in the terminal where the application program is positioned, and establishing target near field communication connection with the printing device according to the wireless network information.
In another embodiment, the communication unit 1010 is further configured to:
receiving printing progress information about the target file sent by the printing device in the process of printing the target file by the printing device;
and displaying the printing progress information in an application interface of the application program.
In yet another embodiment, the target close-range communication connection is disconnected when the printing device finishes printing the target document.
In yet another embodiment, the processing unit 1020 is further configured to: after the target file is successfully transmitted to the printing device, displaying a printing control in an application interface of the application program; the communication unit 1010 may also be used to: and when the printing control is triggered, informing the printing device to start printing the target file.
According to an embodiment of the present invention, the steps involved in the method shown in fig. 2 or fig. 5 may be performed by the respective units in the document printing apparatus shown in fig. 10. For example, step S201 and step S204 shown in fig. 2 can be both performed by the communication unit 1010 shown in fig. 10, and step S202 and step S203 can be both performed by the processing unit 1020 shown in fig. 10. As another example, step S501 shown in fig. 5 may be performed by the processing unit 1020 shown in fig. 10, step S502 may be performed by the communication unit 1010 shown in fig. 10, and so on.
According to another embodiment of the present invention, the units in the file printing apparatus shown in fig. 10 may be respectively or entirely combined into one or several other units to form one or several other units, or some unit(s) may be further split into multiple units with smaller functions to form the same operation, without affecting the achievement of the technical effect of the embodiment of the present invention. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present invention, the document-based printing apparatus may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present invention, the document printing apparatus device as shown in fig. 10 may be constructed by a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 2 or fig. 5, run on a general-purpose computing device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and a document printing method according to an embodiment of the present invention is implemented. The computer program may be embodied on a computer-readable storage medium, for example, and loaded into and executed by the above-described computing apparatus via the computer-readable storage medium.
According to the embodiment of the invention, when the application program detects the trigger event for connecting the printing device, the target near-field communication connection can be established with the printing device, so that the file can be transmitted to the printing device based on the target near-field communication connection in the following process, the convenience of file transmission is improved, the file transmission does not need to be carried out by a server, and the network communication resource is saved. After the target file to be printed is obtained, the printing resources required by the target file can be determined, and the capability of the printing device for printing the target file is detected according to the state information of the printing device and the printing resources required by the target file; if the printing device has the capability of printing the target file, the target file can be transmitted to the printing device based on the target close-range communication connection, so that the printing device can successfully print the target file, and the printing success rate of the file is improved. Therefore, the printing device is subjected to capability detection before the file is transmitted, so that the situation of transmission resource waste caused by the fact that the target file is still transmitted to the printing device when the printing device does not have the capability of printing the target file can be effectively avoided; in addition, the whole file printing process is realized by means of the application program and the target near field communication connection, so that the user does not need to execute operations such as file copying, driver installation and the like, the user operation can be effectively simplified, and the convenience of file printing is improved.
Based on the description of the method embodiment and the apparatus embodiment, the embodiment of the present invention further provides a terminal (i.e., the above-mentioned target terminal). Referring to fig. 11, the terminal includes at least a processor 1110, an input device 1120, an output device 1130, a computer storage medium 1140, and a communication component 1150 for communicating based on a near field communication protocol. The processor 1110, input device 1120, output device 1130, computer storage media 1140, and communication components 1150 within the terminal may be connected via one or more communication buses or otherwise. A computer storage medium 1140 may be stored in the memory of the terminal, the computer storage medium 1140 being used to store a computer program comprising program instructions, and the processor 1110 being used to execute the program instructions stored by the computer storage medium 1140. The processor 1110 (or CPU) is a computing core and a control core of the terminal, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function.
In one embodiment, the processor 1110 according to an embodiment of the present invention may be configured to be controlled by a target terminal to perform a series of file printing processes, including: when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device; in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file; detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file; and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file, and the like.
The embodiment of the invention also provides a computer storage medium (Memory), which is a Memory device in the terminal and is used for storing programs and data. It is understood that the computer storage medium herein may include a built-in storage medium in the terminal, and may also include an extended storage medium supported by the terminal. The computer storage medium provides a storage space that stores an operating system of the terminal. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 1110. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor. In one embodiment, the computer storage medium may have one or more instructions stored therein; and one or more instructions stored in a computer storage medium may be loaded and executed by processor 1110 to perform the method steps described above in connection with the embodiments of the document printing method illustrated in fig. 2 or 5.
According to the embodiment of the invention, when the application program detects the trigger event for connecting the printing device, the target near-field communication connection can be established with the printing device, so that the file can be transmitted to the printing device based on the target near-field communication connection in the following process, the convenience of file transmission is improved, the file transmission does not need to be carried out by a server, and the network communication resource is saved. After the target file to be printed is obtained, the printing resources required by the target file can be determined, and the capability of the printing device for printing the target file is detected according to the state information of the printing device and the printing resources required by the target file; if the printing device has the capability of printing the target file, the target file can be transmitted to the printing device based on the target close-range communication connection, so that the printing device can successfully print the target file, and the printing success rate of the file is improved. Therefore, the printing device is subjected to capability detection before the file is transmitted, so that the situation of transmission resource waste caused by the fact that the target file is still transmitted to the printing device when the printing device does not have the capability of printing the target file can be effectively avoided; in addition, the whole file printing process is realized by means of the application program and the target near field communication connection, so that the user does not need to execute operations such as file copying, driver installation and the like, the user operation can be effectively simplified, and the convenience of file printing is improved.
It should be noted that according to an aspect of the present application, a computer program product or a computer program is also provided, and the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions are read by a processor of the computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the method provided in the various alternatives in the aspect of the embodiment of the document printing method shown in fig. 2 or fig. 5 described above.
It should be understood, however, that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.

Claims (10)

1. A method of printing a document, comprising:
when an application program detects a trigger event for connecting a printing device, establishing target close-range communication connection with the printing device and acquiring state information of the printing device;
in an application interface of the application program, acquiring a target file to be printed, and determining printing resources required by the target file;
detecting the capability of the printing device for printing the target file according to the state information of the printing device and the printing resources required by the target file;
and if the printing device has the capability of printing the target file, transmitting the target file to the printing device based on the target close-range communication connection, so that the printing device prints the target file.
2. The method of claim 1, wherein the status information comprises: operating status information of the printing apparatus, and resource usage information of the printing apparatus; the detecting the capability of the printing device to print the target file according to the state information of the printing device and the printing resource required by the target file comprises the following steps:
when the working state information indicates that the printing device is in an available state, determining the remaining available resources of the printing device according to the resource use information of the printing device;
if the remaining available resources are more than or equal to the printing resources required by the target file, determining that the printing device has the capability of printing the target file;
if the remaining available resources are less than the printing resources required by the target file, determining that the printing device does not have the capability of printing the target file.
3. The method of claim 1, further comprising:
if the printing device does not have the capability of printing the target file, sending the status information of the printing device to a manager of the printing device, and enabling the manager to maintain the printing device based on the status information;
or after the printing device finishes printing the target file, acquiring new state information from the printing device based on the target close-range communication connection, and sending the new state information to a manager of the printing device, so that the manager maintains the printing device based on the new state information.
4. The method of any of claims 1-3, wherein the triggering event comprises: monitoring an event of a communication signal broadcasted by the printing device based on a first near field communication protocol;
when the application program detects a trigger event for connecting the printing device, the method for establishing the target near field communication connection with the printing device comprises the following steps:
when an application program detects a trigger event for connecting a printing device, calling a first communication component in a terminal where the application program is located, and establishing initial close-range communication connection with the printing device, wherein the first communication component is a component for communication based on a first close-range communication protocol;
receiving wireless network information sent by the printing device based on the initial close-range communication connection, wherein the wireless network information comprises an account and a password used when the printing device carries out communication based on a second close-range communication protocol;
and calling a second communication component in the terminal where the application program is located, and establishing target near-field communication connection with the printing device according to the wireless network information, wherein the second communication component is a component for communication based on the second near-field communication protocol, and the allowable transmission rate of the second communication component is greater than that of the first communication component.
5. The method of any of claims 1-3, wherein the triggering event comprises: detecting an event in the application program in which a user inputs wireless network information of the printing apparatus; the wireless network information comprises an account and a password used when the printing device communicates based on a second close-range communication protocol;
when the application program detects a trigger event for connecting the printing device, the method for establishing the target near field communication connection with the printing device comprises the following steps:
and when the application program detects a trigger event for connecting the printing device, calling a second communication component in the terminal where the application program is positioned, and establishing target near field communication connection with the printing device according to the wireless network information.
6. The method according to any one of claims 1-3, further comprising:
receiving printing progress information about the target file sent by the printing device in the process of printing the target file by the printing device;
and displaying the printing progress information in an application interface of the application program.
7. The method of claim 1, wherein the target close-range communication connection is disconnected when the printing device completes printing the target document.
8. The method of claim 1, further comprising:
after the target file is successfully transmitted to the printing device, displaying a printing control in an application interface of the application program;
and when the printing control is triggered, informing the printing device to start printing the target file.
9. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method according to any of claims 1-8 when executed by a processor.
10. A terminal comprising an input device and an output device, further comprising:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium having stored thereon one or more instructions adapted to be loaded by the processor and to execute the method of printing a document according to any of claims 1-8.
CN202111104447.XA 2021-09-18 2021-09-18 File printing method, computer program product, device, terminal and storage medium Pending CN115840544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111104447.XA CN115840544A (en) 2021-09-18 2021-09-18 File printing method, computer program product, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111104447.XA CN115840544A (en) 2021-09-18 2021-09-18 File printing method, computer program product, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115840544A true CN115840544A (en) 2023-03-24

Family

ID=85574343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111104447.XA Pending CN115840544A (en) 2021-09-18 2021-09-18 File printing method, computer program product, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115840544A (en)

Similar Documents

Publication Publication Date Title
US10582362B2 (en) Communication device and non-transitory computer-readable recording medium
KR102039522B1 (en) Method and Apparatus for recording a tag using near field communication
US8958100B2 (en) Image processing apparatus, information processing apparatus, and image processing method for processing a print job transmitted from the information processing apparatus to the image forming apparatus via communication protocol
EP1685689B1 (en) Interaction between a signaling tag (rfid) and an application
US10353653B2 (en) Information processing terminal, information processing method, and non-transitory computer-readable medium for specifying a position of a printer, measuring a distance range in plural communication modes
EP3158496B1 (en) Information processing program product, information processing apparatus, and information processing system
US8810839B2 (en) Information processing apparatus for transferring image data, server apparatus for receiving transferred image data, and control methods and storage media therefor
US20130229673A1 (en) Wireless communication apparatus and communication method
US20150099502A1 (en) Method and device for customizing configuration of printing application
US10091827B2 (en) Electronic apparatus, method of supporting wireless connection, image forming apparatus, and method of wireless connection
JP2006311137A (en) Radio communication apparatus and method for setting communication parameter therefor
US20140304805A1 (en) Information processing apparatus and image forming apparatus
US20070093265A1 (en) System and method for transmitting and receiving data using a mobile terminal and multi function peripheral used in the same system
JP2012048633A (en) Print data generating program, terminal device, and method of controlling terminal device
US11690138B2 (en) Non-transitory computer-readable storage medium for receiving device identifying information and selecting a target device from at least one function executing device
JP2021078069A (en) Radio communication system, first processing apparatus, second processing apparatus, terminal device, and terminal device control program
CN105313502A (en) Printing apparatus capable of performing near field wireless communication, and method for controlling printing apparatus
CN110221793B (en) Method of searching for image forming apparatus, mobile terminal, and computer-readable medium
CN115840544A (en) File printing method, computer program product, device, terminal and storage medium
EP2597564A2 (en) Printing method using pull printing technique and image forming apparatus using the same
US11422761B2 (en) Image forming apparatus changing printing orders according to strength of a wireless communication signal
JP4090191B2 (en) Document printing system and document printing method
US20240107598A1 (en) Storage medium, information processing apparatus, and control method for the information processing apparatus
CN116056112A (en) Communication capability identification method and device and terminal equipment
CN105323402A (en) Mobile terminal, print request method

Legal Events

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