WO2023179561A1 - 打印方法、电子设备及系统 - Google Patents

打印方法、电子设备及系统 Download PDF

Info

Publication number
WO2023179561A1
WO2023179561A1 PCT/CN2023/082581 CN2023082581W WO2023179561A1 WO 2023179561 A1 WO2023179561 A1 WO 2023179561A1 CN 2023082581 W CN2023082581 W CN 2023082581W WO 2023179561 A1 WO2023179561 A1 WO 2023179561A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
printing
message
print
files
Prior art date
Application number
PCT/CN2023/082581
Other languages
English (en)
French (fr)
Inventor
纪宏胜
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023179561A1 publication Critical patent/WO2023179561A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer

Definitions

  • the embodiments of the present application relate to the field of terminal technology, and in particular to printing methods, electronic devices and systems.
  • printers are used by more and more users. Users can control networked printers to perform printing tasks through electronic devices such as mobile phones. Depending on whether the mobile phone and the printer are on the same LAN, the current printing scenario can be divided into local printing and remote printing.
  • local printing means that the mobile phone and the printer are on the same LAN, for example, the mobile phone and the printer are connected to the same router.
  • Remote printing means that the mobile phone and the printer are located on different networks. For example, the mobile phone is located at the company and connected to the company's network, and the printer is located at home and connected to the home network.
  • the printer at the user's home is connected to the Internet through a router, and the mobile phone in the company can print files to be printed (such as pictures, documents) to your home printer.
  • this solution requires the printer to support the remote printing function, otherwise the mobile phone cannot send the file to be printed to the remote printer.
  • a printing box also called a printing cloud box
  • a printing cloud box can be added to the network, and the printing cloud box controls the printer to print.
  • the networking is more complicated.
  • embodiments of the present application provide a printing method, electronic device and system.
  • the technical solution provided by the embodiments of this application can reduce the networking complexity of the printing system.
  • a printing method is provided, applied to a second electronic device, and the method includes:
  • the printing message can reach the third electronic device via the first electronic device and the second electronic device.
  • the number of devices passing through the communication path is smaller, and the transmission delay is reduced. Smaller and more efficient in transmission, it helps improve the efficiency of printing tasks.
  • sending the printing message to the third electronic device includes:
  • the second electronic device After the second electronic device receives the printing message from the mobile phone, it does not need to store the printing message, but directly forwards the printing message, which can reduce storage resources. consumption, save storage space, and improve printing efficiency.
  • the method further includes:
  • the method further includes: establishing a channel with the first electronic device;
  • Receiving a printing message from the first electronic device includes: receiving the printing message from the first electronic device through the channel.
  • the method further includes: establishing a channel with the first electronic device;
  • Sending the response message to the first electronic device includes: sending the response message to the first electronic device through the channel.
  • receiving the print message from the remote first electronic device includes: receiving the print message from the first electronic device via a fourth electronic device.
  • sending the response message to the first electronic device includes: sending the response message to the first electronic device via a fourth electronic device.
  • sending the response message to the first electronic device includes:
  • a printing method applied to a first electronic device, and the method includes:
  • the method before receiving the printing instruction, the method further includes:
  • the first interface includes cards corresponding to one or more electronic devices, and the cards of the one or more electronic devices include cards of the second electronic device;
  • a user's operation on the card of the second electronic device is detected, and a second interface is displayed; the second interface includes options for the printing function associated with the second electronic device.
  • the option of the printing function can be designed through the management interface of the electronic device (such as the second interface), thereby associating the management and control of the electronic device with the printing function.
  • the second electronic device In the process of managing the second electronic device, the second electronic device can be managed.
  • the electronic device controls the third electronic device to perform the printing function.
  • the card of the electronic device can also be replaced with other UI methods, for example, it can be replaced with an icon of the electronic device, etc.
  • the method further includes:
  • the one or more files include files local to the first electronic device and files on other devices of the first electronic device. At least one of the backed up files;
  • receiving the printing instruction includes: receiving the user's operation instruction on the printing control associated with the one or more target printing files.
  • the user can choose to print files local to the first electronic device, and/or print files backed up by the first electronic device on other devices (such as a server).
  • the first electronic device when the user chooses to print a file local to the first electronic device, the first electronic device obtains the print message and sends the print message to the second electronic device.
  • the first electronic device when the user selects to print the backup file on the server, the first electronic device sends a print instruction to the server, and then the server obtains the print message and sends the print message to the second electronic device.
  • the first electronic device when the user selects the backup file on the print server, the first electronic device obtains the print message and sends the print message to the second electronic device.
  • the method further includes:
  • the third interface includes information on one or more files;
  • the one or more files include files local to the first electronic device and At least one of the files backed up by the first electronic device on other devices;
  • Receiving the printing instruction includes: receiving the user's operation on the printing control.
  • the first electronic device is a server
  • the receiving a print instruction includes: receiving a user's operation instruction associated with one or more target print files stored on the server. This solution can be applied to, for example, backup scenarios.
  • the server receives the print instruction and can obtain the print message corresponding to the local file of the server, thereby sending the print message to the second electronic device, so that the second electronic device sends the print message to the third party in the same local area network.
  • the electronic device sends the printing message, thereby enabling the third electronic device to perform the printing task.
  • the user selects one or more target printing files through the terminal, and the one or more target printing files are files stored by the server after the terminal uploads them to the server.
  • the method further includes: establishing a channel with the second electronic device.
  • the method further includes: displaying a fifth interface, the fifth interface being used to indicate that the channel is being established.
  • Sending the printing message to the second electronic device includes: sending the printing message to the second electronic device through the channel.
  • the first electronic device establishes a channel with the second electronic device, so that the first electronic device can send the printing message to the remote second electronic device, and then the second electronic device can control the printing message by printing the message.
  • the third device performs the printing task.
  • the method further includes:
  • a response message is received from the second electronic device, and the response message is used to indicate that the printing task is completed.
  • sending the printing message to the remote second electronic device includes:
  • the printing message is sent to the remote second electronic device via the fourth electronic device.
  • obtaining a print message corresponding to the print task includes:
  • a printing device which may be a second electronic device or a component (such as a chip system) used to implement the functions of the second electronic device.
  • the device includes:
  • a communication unit configured to receive a printing message from a remote first electronic device; and send the printing message to a third electronic device, wherein the printing message is used to control the third electronic device to perform a printing task, so
  • the second electronic device and the third electronic device belong to the same local area network.
  • sending the printing message to the third electronic device includes:
  • the communication unit is also configured to receive a response message from the third electronic device, where the response message is used to indicate that the printing task has been completed;
  • the communication unit is also configured to send the response message to the first electronic device.
  • the device further includes a processing unit; the processing unit is configured to establish a channel with the first electronic device;
  • Receiving a printing message from the first electronic device includes: receiving the printing message from the first electronic device through the channel.
  • sending the response message to the first electronic device includes: sending the response message to the first electronic device through the channel.
  • receiving the print message from the remote first electronic device includes: receiving the print message from the first electronic device via a fourth electronic device.
  • sending the response message to the first electronic device includes: sending the response message to the first electronic device via a fourth electronic device.
  • sending the response message to the first electronic device includes:
  • a printing device which may be a first electronic device or a component (such as a chip system) that implements the functions of the first electronic device.
  • the device includes:
  • a communication unit that receives printing instructions, where the printing instructions are used to instruct execution of printing tasks
  • a processing unit configured to respond to the printing instruction and obtain the printing message corresponding to the printing task
  • the communication unit is also used to send the printing message to a remote second electronic device, wherein the printing message is used to control the third electronic device to perform the printing task, and the second electronic device and the The third electronic device belongs to the same local area network.
  • the device further includes a display unit;
  • the display unit is used to display a first interface; the first interface includes cards corresponding to one or more electronic devices, and the cards of the one or more electronic devices include cards of the second electronic device;
  • the display unit is also configured to detect a user's operation on the card of the second electronic device when the processing unit detects a second interface; the second interface includes the printing function associated with the second electronic device. options.
  • the display unit is also configured to display information of one or more files when the processing unit detects the user's operation on the option of the print function; the one or more files include all At least one of files local to the first electronic device and files backed up by the first electronic device on other devices;
  • the processing unit is also used to determine that the user selects one or more target files from the one or more files. print documents;
  • the receiving the printing instruction includes: receiving the user's operation instruction on the printing control associated with the one or more target printing files.
  • the display unit is also configured to display a third interface when the processing unit detects a user's operation on the option of the print function; the third interface includes one or more files information; the one or more files include at least one of files local to the first electronic device and files backed up by the first electronic device on other devices;
  • the display unit is also configured to display a fourth interface when the processing unit detects the user's operation of selecting one or more target printing files from the one or more files, and the fourth interface includes an instruction for indicating Turn on the print control of the print task;
  • Receiving the printing instruction includes: receiving the user's operation on the printing control.
  • the first electronic device is a server
  • the receiving a print instruction includes: receiving a user's operation instruction associated with one or more target print files stored on the server.
  • the processing unit is also used to establish a channel with the second electronic device.
  • the display unit is also configured to display a fifth interface during the process of establishing a channel, and the fifth interface is used to indicate that the channel is being established.
  • Sending the printing message to the second electronic device includes: sending the printing message to the second electronic device through the channel.
  • the communication unit is further configured to receive a response message from the second electronic device, where the response message is used to indicate that the printing task is completed.
  • sending the printing message to the remote second electronic device includes:
  • the printing message is sent to the remote second electronic device via the fourth electronic device.
  • obtaining a print message corresponding to the print task includes:
  • a printing system including:
  • the first electronic device is configured to receive a printing instruction, and in response to the printing instruction, obtain a printing message corresponding to the printing task; and is also configured to send the printing message to a remote second electronic device, wherein the The printing message is used to control a third electronic device to perform the printing task, and the second electronic device and the third electronic device belong to the same local area network; the printing instruction is used to instruct the execution of the printing task;
  • the second electronic device is configured to receive a printing message from a remote first electronic device and send the printing message to a third electronic device.
  • the second electronic device is used to send the printing message to the third electronic device, including:
  • the first electronic device is also used for:
  • the first interface includes cards corresponding to one or more electronic devices, and the cards of the one or more electronic devices include cards of the second electronic device;
  • a user's operation on the card of the second electronic device is detected, and a second interface is displayed; the second interface includes options for the printing function associated with the second electronic device.
  • the first electronic device is also used for:
  • the one or more files include files local to the first electronic device and files on other devices of the first electronic device. At least one of the backed up files;
  • the first electronic device is configured to receive a printing instruction, including: receiving a user operation instruction for a printing control associated with the one or more target printing files.
  • the first electronic device is a server
  • the first electronic device is configured to receive printing instructions, including: receiving user operation instructions associated with one or more target printing files stored on the server.
  • the second electronic device is also configured to receive a response message from the third electronic device and send the response message to the first electronic device; the response message Used to indicate that the printing task has been completed;
  • the first electronic device is also configured to receive a response message from the second electronic device.
  • the second electronic device is also used to establish a channel with the first electronic device; the first electronic device is also used to establish a channel with the second electronic device. passage between;
  • the second electronic device is configured to receive a printing message from the first electronic device, including: receiving the printing message from the first electronic device through the channel;
  • the first electronic device is configured to send the printing message to the second electronic device, including: sending the printing message to the second electronic device through the channel.
  • the printing message includes a printing control message and a printing data message.
  • the first electronic device is configured to send the print message to the remote second electronic device, including: sending the print message to the remote second electronic device via a fourth electronic device. arts;
  • the second electronic device is configured to receive a printing message from a remote first electronic device, including: receiving the printing message from the first electronic device via a fourth electronic device.
  • the second electronic device is used to send the response message to the first electronic device, including:
  • the first electronic device is configured to obtain a print message corresponding to the print task in response to the print instruction, including:
  • the printing message includes a printing control message and a printing data message.
  • the identifier of the printed message may be, but is not limited to, the service name of the printed message.
  • the channel includes an end-to-end P2P channel.
  • embodiments of the present application provide an electronic device that has the function of implementing the printing method described in any of the above aspects and any possible implementation manner thereof; or, the electronic device has the function of implementing the printing method as described above.
  • This function can be implemented by hardware, or can be implemented by hardware and corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program (which may also be referred to as instructions or codes).
  • the computer program When the computer program is executed by an electronic device, it causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect; or , causing the electronic device to perform the second aspect or any method of the second aspect.
  • embodiments of the present application provide a computer program product.
  • the computer program product When the computer program product is run on an electronic device, it causes the electronic device to execute the method of the first aspect or any one of the embodiments in the first aspect; or, causes the electronic device to execute The device performs the second aspect or the method of any one of the implementation modes of the second aspect.
  • inventions of the present application provide a circuit system.
  • the circuit system includes a processing circuit.
  • the processing circuit is configured to execute the method of the first aspect or any one of the implementation modes of the first aspect; or, the processing circuit is configured to execute The method of the second aspect or any one of the second aspects.
  • embodiments of the present application provide a chip system, including at least one processor and at least one interface circuit.
  • the at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor.
  • at least one processor When at least one processor When the instruction is executed, at least one processor performs the first aspect or the method of any implementation of the first aspect; or, when the at least one processor executes the instruction, at least one processor performs the second aspect or any method of the second aspect.
  • Figure 1A is a schematic diagram of the system architecture provided by an embodiment of the present application.
  • Figure 1B is a schematic diagram of the system architecture provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the system architecture provided by the embodiment of the present application.
  • Figure 3 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of the software structure of the electronic device provided by the embodiment of the present application.
  • Figure 5A is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • Figure 5B is a schematic diagram of a user interface provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of the user interface provided by the embodiment of the present application.
  • FIGS. 7A and 7B are schematic diagrams of user interfaces provided by embodiments of the present application.
  • Figure 7C is a schematic flow chart of a printing method provided by an embodiment of the present application.
  • Figure 8A is a schematic flowchart of a printing method provided by an embodiment of the present application.
  • Figure 8B is a schematic flowchart of a printing method provided by an embodiment of the present application.
  • Figure 9A is a schematic flow chart of a printing method provided by an embodiment of the present application.
  • Figure 9B is a schematic diagram of a user interface provided by an embodiment of the present application.
  • Figure 10 is a schematic flowchart of a printing method provided by an embodiment of the present application.
  • Figure 11 is a schematic flow chart of a printing method provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of a printing device provided by an embodiment of the present application.
  • the "user” is not limited to the owner of the electronic device or a specific user, and may also be an animal, a hard object, or other object.
  • the user's operation of the electronic device may also be the operation of the electronic device by animals, hard objects or other objects.
  • the use of words such as "user” or “user's operation” is intended to be an exemplary explanation.
  • the specific person who performed the operation is not limited by the embodiments of this application.
  • FIG. 2 shows an example of a printing system to which the technical solution of the embodiment of the present application is applicable.
  • the system includes a first electronic device 100 , a second electronic device 200 and a third electronic device 300 .
  • the first electronic device 100 may be located in the first network.
  • the first network can be any available network.
  • cellular network or wireless fidelity (Wi-Fi) network.
  • Wi-Fi wireless fidelity
  • the first electronic device 100 may be installed with an application that controls the printing task (which may be referred to as a printing application), and the application may interact with the second electronic device 200 through the third network to print protocol-related messages (which may be referred to as a printing protocol message, Or print service message, or print message).
  • the first electronic device 100 may be, but is not limited to: a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • the first electronic device 100 may also be a server.
  • the third network includes a wide area network.
  • a server may be provided in the third network.
  • the manufacturer of the server, the first electronic device 100 and the second electronic device 200 may be the same or different.
  • the user can back up part of the data in the first electronic device 100 and upload it to the server, and the server can store the backup data.
  • the first electronic device 100 receives a printing instruction for the target data input by the user, it may instruct the server to transfer the target data stored by the server to the remote printer to implement remote printing by the printer.
  • the first electronic device 100 after receiving the printing instruction for the target data input by the user, the first electronic device 100 sends the printing data (such as the picture to be printed) to the server in the third network.
  • the server does not save the printing data, but The print data is sent directly to the printer through the router.
  • the server used to save the user's print data and the server used to send the print data to the printer through the router may be different.
  • the printing protocol includes but is not limited to Internet printing protocol/multicast domain name system (internet printing protocol/multicast domain name system, IPP/mDNS).
  • the second electronic device 200 and the third electronic device 300 are located in the second network.
  • the second network can be any available local area network, such as a Wi-Fi network.
  • the second electronic device 200 may be a device that provides a networking function for the third electronic device 300 .
  • the second electronic device 200 is configured to receive a message related to the printing protocol (which may be referred to as a printing protocol message, a printing service message, or a printing message) from the printing application, and send the printing message to The third electronic device 300.
  • the second electronic device 200 may be, for example, a wireless router, customer premises equipment (Customer Premise Equipment, CPE), etc.
  • the printing message includes a message corresponding to the printing instruction (which may be referred to as a printing control message for short), and/or a message of printing data.
  • the message corresponding to the print instruction may also be called a print control message, and may be used to set printing parameters of the third electronic device 300 and so on.
  • the message of printing data is the message of the file to be printed.
  • the third electronic device 300 is configured to receive the printing message from the first electronic device 100 through the second electronic device 200 and execute the printing task of the file to be printed according to the printing message.
  • the third electronic device 300 is a printer, which may or may not support the remote printing function.
  • the printer supports remote printing function, which means that the printer supports directly obtaining files to be printed from the printing cloud.
  • the printer can directly obtain the file to be printed from the print cloud, and then the printer executes the print task for the file to be printed.
  • the printer does not support the remote printing function, which means that the printer does not support directly obtaining files to be printed from the print cloud.
  • a printing cloud box is introduced into the network.
  • the printing cloud box obtains and stores the files to be printed from the printing cloud, and forwards the files to be printed to the printer.
  • the printing cloud box needs to register with the printing cloud, and the registration method includes but is not limited to scanning the QR code to register.
  • the first network and the second network may be networks that support the same or different protocols.
  • the first network is a cellular data network
  • the second network is a Wi-Fi network.
  • FIG. 3 shows a schematic structural diagram of the first electronic device 100.
  • the first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and an antenna 1, Antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card Interface 195 etc.
  • SIM subscriber identification module
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to a touch sensor through an I2C interface, so that the processor 110 and the touch sensor communicate through the I2C bus interface to implement the touch function of the electronic device.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device.
  • the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute structural limitations on the electronic equipment.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 Wireless charging input can be received through the electronic device's wireless charging coil. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be reused as a diversity antenna for a wireless LAN.
  • antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs sound signals through the audio device, or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems for use in electronic devices. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device implements display functions through the GPU, display screen 194, and application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed
  • Micro-OLED quantum dot light emitting diode
  • QLED quantum dot light emitting diode
  • the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area can store data created during the use of electronic equipment (such as audio data, phone books, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio The input is converted to a digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 . Electronic devices can use the audio module 170, such as music playback, recording, etc.
  • the audio module 170 may include a speaker, a receiver, a microphone, a headphone interface, and an application processor to implement audio functions.
  • the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • touch operations for different applications can correspond to different vibration feedback effects.
  • the motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 .
  • Different application scenarios such as time reminders, receiving information, alarm clocks, games, etc.
  • the touch vibration feedback effect can also be customized.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation from the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • FIG. 3 is only a possible example of the structure of the electronic device and does not constitute a limitation on the structure of the electronic device.
  • the electronic device may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the software system of the above-mentioned electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of this application uses a layered architecture
  • the system is taken as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 4 is a software structure block diagram of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
  • the application layer can include a series of applications.
  • applications can include calls, memos, browsers, contacts, cameras, galleries, calendars, maps, Bluetooth, music, videos, short messages and other APPs (applications).
  • applications may also include applications related to printing tasks, such as applications for controlling execution of printing tasks.
  • the application used to control the printing task may be pre-installed when the first electronic device 100 leaves the factory, or may be downloaded and installed from the application market when the user uses the first electronic device 100. This is not the case in the embodiment of the present application. Make no restrictions.
  • applications used to control the execution of printing tasks include but are not limited to smart life applications.
  • the smart life application can provide relevant interfaces through which the user can select files to be printed (such as pictures/documents). After the user selects the pictures/documents to be printed, the first electronic device 100 can control the printer to perform remote printing.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window managers, content providers, view systems, resource managers, notification managers, etc.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications.
  • Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
  • the framework layer may include a printing service.
  • Smart life applications can call the printing service.
  • the printing service generates printing messages (including messages corresponding to printing instructions and/or messages for files to be printed) according to the printing protocol (such as IPP).
  • the printing messages can be passed to the Kernel layer.
  • Each printing service has a corresponding service name (or package name), for example, for System, the name of the print service is hwprintservices, for native The name of the print service is BuiltinPrintService.
  • the implementation protocol of the printing service can be, but is not limited to, IPP/mDNS.
  • the framework layer can also provide virtual private network services (or VPN channels). Applications can call the VPN service to intercept printing messages from the kernel layer. Afterwards, the application can send the intercepted print message to the second electronic device 200, so that the second electronic device 200 (such as a router) forwards the print message to the third electronic device 300 (such as a printer).
  • VPN channels virtual private network services
  • the printing message can be a message based on any printing protocol (such as IPP).
  • FIG. 4 is only an example of the software architecture applicable to the first electronic device 100.
  • some modules or functions of a certain layer may also be implemented by one or more other layers.
  • the kernel layer can also implement VPN services
  • the framework layer can provide VPN services to the outside world, or multiple layers can implement some functions of VPN services.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc. This embodiment of the present application does not impose any restrictions on this.
  • the structure of the second electronic device 200 may also refer to the structure of the first electronic device 100 shown in FIG. 3 .
  • the second electronic device 200 may have more or fewer components than the structure shown in FIG. 3 , or may combine certain components. Or splitting some parts, or different parts arrangements.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the second electronic device 200 when the second electronic device 200 is a router, as shown in FIG. 5A , the second electronic device 200 may include a processor 501, a memory 502, a transceiver 503, and so on. Among them, the transceiver 503 is used to communicate with other devices.
  • the transceiver 503 is used to communicate with other devices.
  • the second electronic device 200 please refer to the description of related structures in the first electronic device 100 in FIG. 3, which will not be described again here.
  • the following takes the first electronic device 100 as a mobile phone, the second electronic device 200 as a router, and the mobile phone and the router are located in different local area networks as an example to illustrate the technical solution of the embodiment of the present application.
  • the mobile phone displays interface 601 as shown in (a) of Figure 5B.
  • the interface 601 includes cards for various electronic devices in the home.
  • the card of router AA is marked 602. If it is detected that the user clicks on the card 602, the mobile phone can jump to the interface 603 shown in (b) of Figure 5B.
  • the interface 603 may display the access devices of router AA.
  • the interface 603 may also include a remote printing option 604. If it is detected that the user clicks on the remote printing option 604, the mobile phone can jump to the remote printing interface 605 as shown in (c) of Figure 5B.
  • the interface 605 includes a local photo option 606 and a local document option 607.
  • the local photo option 606 is used for the user to select a local photo to be printed
  • the local document option 607 is used for the user to select a local document to be printed.
  • the mobile phone can jump to the album interface 608 as shown in (d) of Figure 5B, and the user can select the desired photo from the album.
  • Printed local photos In response to the user's operation of selecting a photo to be printed, for example, after clicking on the photo shown in (d) of Figure 5B, as shown in (a) of Figure 6, the mobile phone can jump to the remote printing interface 605, and the mobile phone starts to establish a connection with Remote channels between routers (such as peer-to-peer (P2P) channels).
  • P2P peer-to-peer
  • the mobile phone can display "Establishing a remote channel" message 609 to prompt the user that a remote channel is currently being established with the router.
  • the interface 610 shown in (b) of Figure 6 can be displayed.
  • the interface may include prompt information 612 to remind the user that a remote channel with the router has been established.
  • the interface 610 may also include preview information 611 of the photo to be printed.
  • the interface 610 also includes options related to the printing function.
  • printing function-related options include but are not limited to: options 619 for selecting a printer, options for selecting the number of print copies, options for selecting paper types, and selecting printing modes (black and white, color printing) option for selecting the paper size.
  • the mobile phone in response to the user's operation of clicking option 619 , may display the printer selection interface 617 as shown in (b) of FIG. 7A . If it is detected that the user clicks control 618 on interface 617, the mobile phone determines that the user wants to use printer XX to perform this printing task. After detecting the user's operation of clicking the control 618 on the interface 617, the mobile phone can jump back to the interface 610 as shown in (a) of Figure 7A.
  • the interface 610 also includes a start printing button 613.
  • the mobile phone calls the printing service provided by the system, and the printing service generates a printing message according to the printing protocol.
  • the mobile phone can also call the VPN interface provided by the system to intercept and send the print message to the router.
  • the printing message includes the message corresponding to the printing instruction and the message of the file to be printed.
  • the router After receiving the print message, the router can forward the print message to the connected printer.
  • the message corresponding to the print instruction may carry one or more print parameters as shown in (b) of Figure 6 .
  • the message corresponding to the print instruction may carry one or more print parameters as shown in (b) of Figure 6 .
  • the mobile phone can set the one or more printing parameters for the printer by printing messages.
  • the printer After the printer receives the printing message from the mobile phone through the router, it can perform the printing task according to the printing message. For example, the printer sets the paper type, etc. according to the printing parameters carried in the message corresponding to the printing instruction. After setting the printing parameters, it starts printing the file to be printed.
  • the mobile phone in response to the user clicking the start printing button 613 as shown in (b) of Figure 6, as shown in (c) of Figure 6, the mobile phone can jump to the remote printing interface 605 and display prompt information 614, In order to prompt the user that the printing task is currently being performed.
  • the printer can send a task completion response to the mobile phone through the router to indicate that the printing task has been completed.
  • the mobile phone learns that the printing task has been completed, as shown in (d) of Figure 6, the mobile phone can display prompt information 615 in the interface 605 to remind the user that the printing task has been completed.
  • the mobile phone after receiving the printing instruction input by the user, the mobile phone can establish a remote channel with the router, and send the message corresponding to the printing instruction and the message to be printed to the printer via the remote channel via the router. document.
  • the printer can execute the printing task according to the message corresponding to the printing instruction and the file to be printed. It can be seen that even if the printer does not support the remote printing function or supports the remote printing function, the printer can receive the message corresponding to the printing instruction from the mobile phone and the file to be printed through the router, and execute the printing task, which improves the efficiency of the remote printing task. Execution success rate.
  • the mobile phone when the printer does not support the remote printing function, the mobile phone can intercept the printing messages and send the intercepted printing messages to the printer through the router. In this process, there is no need to introduce an additional printing cloud box, which not only reduces It reduces the networking complexity of home networks and avoids the high operational complexity caused by printing cloud box registration.
  • the mobile phone is used to establish and route before the user clicks the "Start Printing" button 613.
  • the mobile phone can also establish the above-mentioned remote channel after detecting that the user clicks the "Start Printing" button 613.
  • the embodiments of the present application do not limit the timing of the mobile phone establishing the above-mentioned remote channel. or triggering conditions.
  • the mobile phone can display the interface 610 shown in (a) of Figure 7B.
  • the interface includes a start printing button 613.
  • the mobile phone may display an interface 616 as shown in (b) of Figure 7B.
  • the interface 616 may include prompt information 612 to prompt the user that the mobile phone is currently establishing a remote channel and/or that the remote channel has been successfully established.
  • the mobile phone can display prompt information 614 in the interface 616 to prompt the user that the printer is currently printing.
  • the mobile phone can display prompt information 615 in the interface 616 to prompt the user that the printer has completed printing.
  • the first electronic device 100 is a mobile phone
  • the second electronic device 200 is a router
  • the third electronic device 300 is a printer
  • the first electronic device 100, the second electronic device 200, and the third electronic device 300 satisfy the requirements of Figure 2
  • the printing method provided by the embodiment of the present application includes:
  • the mobile phone receives the printing instruction input by the user.
  • S101 can be implemented as: S101a.
  • the mobile phone receives the printing instruction input by the user through the printing application.
  • Printing applications include but are not limited to smart life applications related to printing tasks.
  • the user can input a printing instruction in any available manner, and the printing instruction is used to instruct the mobile phone to remotely control the printer to perform a printing task.
  • the printing instruction may be an instruction input by the user through the interface, or may be a voice instruction input by the user.
  • the embodiment of the present application does not limit the form of the printing instruction.
  • the user can input the voice "Instruct the printer at home to print picture A in the mobile phone album" through the voice assistant, and the voice can be used as a printing instruction.
  • the smart life application receives an operation instruction from the user clicking the "Start Printing" button 613, and the operation instruction can be used as a printing instruction.
  • the mobile phone generates and intercepts printing messages.
  • the mobile phone After the mobile phone detects the print command, it can generate a print message to control the remote printer to perform the print task.
  • the printing message includes the message corresponding to the printing instruction (that is, the printing control message) and the message of the file to be printed (that is, the printing data message).
  • a file to be printed can be encapsulated into one or more messages according to the printing protocol.
  • S102 can be implemented as follows: S102a, the printing application calls the printing service provided by the mobile phone system, and S102b, the printing service generates a printing message. Afterwards, the printing service can also perform step S102c and transfer the printing message to the kernel.
  • mobile phones can forward print messages to other devices through the kernel (for example, forwarding based on the printing protocol in the mDNS LAN). However, this forwarding process is usually limited to forwarding within the same LAN. In other words, the mobile phone needs to be in the same local area network as the receiving device.
  • the mobile phone in order to enable the mobile phone to send printing messages to remote devices, the mobile phone can intercept the printing messages generated by the kernel into the printing application, and establish a remote channel between the printing application and the remote router. In this way, , you can send printing messages to the remote router through the printing application to achieve remote printing.
  • the mobile phone intercepts the print message generated by the kernel, which can The implementation is as follows steps S102d-S102g:
  • the printing application calls the VPN service
  • the VPN service sends an interception request to the kernel, and the interception request is used to request to intercept the print message.
  • the kernel After receiving the interception request, the kernel determines that one or more print packets in this print task need to be sent to the VPN service. Then, after that, when the kernel receives the print message of this print task from the print service, it needs to forward the print message to the VPN service.
  • the kernel sends a print message to the VPN service, and the VPN service intercepts the print message from the kernel.
  • the kernel after the kernel receives a certain type of message from the print service, it can identify that the message is a print message through the service name (or package name) of the message. Afterwards, the kernel intercepts the print message and sends the print message to the VPN service.
  • S102g and VPN service pass intercepted printing packets to the printing application.
  • VPN services can be implemented through related technologies.
  • the embodiment of the present application does not limit the execution order of generating and intercepting messages for printing instructions and generating and intercepting messages for files to be printed.
  • S103 can be implemented as: S103a, the mobile phone establishes a remote channel between the printing application and the router.
  • the remote channel is used to transmit printing messages between the printing application and the router.
  • remote channels include but are not limited to P2P channels.
  • P2P channels include but are not limited to P2P channels based on session traversal utilities for nat, stun technology, and network address translation based on relay traversal (traversal using relays around nat, turn) technology. P2P channel.
  • the P2P channel may include a server for relay services. If a P2P channel based on stun technology is established, the P2P channel does not need to include a server for relay services, that is, the mobile phone and the router can be directly connected, and there are no other relay nodes between the mobile phone and the router.
  • the mobile phone can establish a remote channel with the router after receiving the printing command input by the user. For example, after the mobile phone detects that the user clicks the start printing button 613 as shown in (a) of Figure 7B, the mobile phone establishes a remote channel.
  • the phone can pre-establish a remote channel with the router before receiving print instructions entered by the user. For example, the mobile phone pre-establishes a remote channel before detecting that the user clicks the start printing button 613 as shown in (b) of Figure 6 .
  • the embodiment of this application does not limit the establishment timing and specific establishment method of the remote channel.
  • the mobile phone sends the printing message to the router through the remote channel.
  • S104 can be implemented as: S104a.
  • the printing application sends a printing message to the communication module of the router through the remote channel.
  • the printing message is intercepted by the printing service and sent to the printing application.
  • the remote channel includes a server for relay services
  • the printing application may first send the printing message to the server, and then the server (an example of the fourth electronic device) sends the printing message to the router.
  • the message of the print instruction and the message of the file to be printed can be sent through the same message, or they can be sent through multiple different messages.
  • the message of the print instruction may be sent first, or the message of the file to be printed may be sent first, or the message of the print instruction and the message of the file to be printed may be sent simultaneously.
  • Printing messages include printing control messages and messages of files to be printed.
  • the printing control message may carry one or more printing parameters (such as but not limited to paper type, paper size, etc.) as shown in (a) of FIG. 7B .
  • the message of the file to be printed may be, for example, one or more messages encapsulated by the picture 611 to be printed as shown in (a) of FIG. 7B .
  • the router sends a printing message to the printer.
  • S105 can be implemented as: S105a, the communication module parses and transmits the print message to the VPN service of the router; S105b, the VPN service of the router transmits the print message to the kernel; S105c, the kernel passes The corresponding driver calls the communication module to send printing messages to the printer.
  • the router's VPN service can be based on The tun interface is implemented.
  • the printer executes the printing task.
  • the mobile phone may display prompt information 614 to remind the user that the printer is printing.
  • the printer sends a response message to the mobile phone.
  • the response message is used to indicate that the printing task has been completed.
  • the printer sends the response message to the mobile phone through the router.
  • the router can interact with the printer through the kernel.
  • the interaction process between the router and the printer can follow the printing protocol within the LAN (such as mDNS protocol).
  • the router After receiving the response message from the printer through the kernel (corresponding to step S107a shown in Figure 8A), the router determines the identifier of the response message (such as the service name), and sends the message to the first electronic device according to the identifier of the response message. Send the response message. For example, after receiving the response message, the router determines that the response message is a printing service message based on the service name of the response message, and then can call the VPN service to intercept the response message (corresponding to step S107b shown in Figure 8A), The VPN service delivers the intercepted response message to the communication module (corresponding to step S107c shown in Figure 8A), and the communication module sends the response message to the mobile phone through the above-mentioned remote channel (corresponding to step S107d shown in Figure 8A). Among them, the interaction between the communication module and the mobile phone can follow IPP.
  • the printer After the printer completes the printing task, it can send instruction information to the mobile phone. After receiving the instruction information, the mobile phone learns that the printer has completed the printing task, and can display prompt information 615 as shown in Figure 6 (d). to prompt the user that the printer has completed the printing task.
  • a channel is established between the mobile phone and the router through a printing application such as smart life, and printing messages (including messages corresponding to the printing instructions and the information of the file to be printed) are transmitted between the printing application and the router. message), and then the router can send the printing message to the printer to realize the function of the printer printing remote files (that is, printing files in devices that are not in the same LAN).
  • the printer does not support the remote function, the printing cloud box is needed to receive the files to be printed from the printing cloud, and the networking implementation is relatively complicated.
  • the technical solution of the embodiment of the present application no longer needs to be used in the networking. Print cloud that requires additional independent setup
  • the remote printing function can be realized with just one box, which reduces the complexity of networking.
  • printing messages can reach the printer via mobile phones and routers.
  • the communication path passes through fewer devices, the transmission delay is smaller, and the transmission efficiency is higher, which helps to improve the efficiency of printing tasks.
  • the router After the router receives the print message from the mobile phone, it does not need to store the print message, which can reduce the consumption of storage resources.
  • FIG. 8B shows yet another method flow according to the embodiment of the present application.
  • the mobile phone first sends a print control message through the router, and then sends the file to be printed to the printer to control the printer to perform remote printing.
  • the method includes:
  • the mobile phone receives the printing instruction input by the user.
  • the mobile phone generates and intercepts the printing control message.
  • the mobile phone sends the printing control message to the router through the remote channel.
  • the printing control message carries one or more printing parameters.
  • the router sends a printing control message to the printer.
  • the printer sends a first response message to the mobile phone for the printing message.
  • the printer sets printing parameters according to the print control message.
  • the printer can send the first response message to the mobile phone through the router.
  • the first response message is used to indicate that the printing parameters have been set.
  • This step S406 is an optional step.
  • the mobile phone sends the file to be printed to the printer.
  • the mobile phone after the mobile phone receives the first response message from the printer and learns that the printer has set corresponding printing parameters, the mobile phone sends the file to be printed to the printer.
  • the mobile phone sends the file to be printed to the printer via the router.
  • the remote channel between the mobile phone and the router includes a server
  • the mobile phone can first send the file to be printed to the server, and then the server sends the file to be printed to the printer via the router.
  • the mobile phone calls the VPN service to intercept the files to be printed, and sends the intercepted files to be printed to the router through a remote channel, and the router forwards the files to be printed to the printer.
  • the printer executes the printing task.
  • the printer After receiving the file to be printed, the printer executes the print task for the file to be printed.
  • the printer sends a second response message to the mobile phone.
  • the second response message is used to indicate that the printing task has been completed.
  • FIG. 8B only takes the mobile phone to first send the print control message and then send the file to be printed as an example.
  • the timing of sending the print control message and the file to be printed is different. It can also be determined as needed, and there are no restrictions here.
  • Embodiments of the present application also provide a printing method.
  • the server when the user expects a remote printer to perform a printing task, the server generates a printing message to control the printer to perform a remote printing task (such as a printer at home printing to a remote mobile phone). document).
  • a remote printing task such as a printer at home printing to a remote mobile phone.
  • the user selects a file (such as a photo or document, etc.) that has been uploaded to the cloud server through the terminal, and instructs the terminal to print the selected file.
  • the terminal can instruct the server where the file is stored to generate a print message to control the printer to perform the print task.
  • Figure 9A shows the flow of the method, which includes the following steps:
  • the mobile phone receives the printing instruction input by the user.
  • step S201 please refer to the above-mentioned step S101, which will not be described again here.
  • the mobile phone sends a printing instruction to the server (first electronic device).
  • the print command carries the identification of the file to be printed.
  • the mobile phone detects the user's printing instruction for the target file. If it is determined that the target file is a file that has been backed up to the server, the mobile phone sends the printing instruction to the server.
  • the print command sent by the mobile phone can carry the identification of the target file.
  • the mobile phone after detecting the user's printing instruction for the target file, the mobile phone sends the printing instruction to the server, and the server queries whether the target file has been backed up to the server.
  • the server can perform the following step S203. If the target file is not backed up to the server, the server obtains the target file from the mobile phone and executes the following step S203.
  • the mobile phone displays a remote printing interface 903, and the interface 903 includes a "cloud photo" option 901.
  • the mobile phone can jump to interface 902 as shown in (b) of Figure 9B.
  • the interface 902 may include pictures stored in the cloud server and uploaded by the mobile phone or device with the same account.
  • the mobile phone can jump to interface 904 as shown in (c) of Figure 9B.
  • the mobile phone sends a print instruction to the server.
  • the interface 903 may also include options for other cloud files (such as documents uploaded to the cloud server), and this embodiment of the present application does not limit this.
  • the server generates and intercepts print messages.
  • the server after receiving the printing instruction, the server calls the printing service, and the printing service generates a printing message according to the printing protocol (such as IPP).
  • the printing protocol such as IPP
  • the server determines the file that the user wants to print, and encapsulates the file into one or more messages.
  • the server can also encapsulate the printing instructions into corresponding printing control messages.
  • a remote channel is established between the server and the router.
  • remote channels between servers and routers including but not limited to P2P channels.
  • the embodiment of the present application does not limit the timing of establishing a remote channel.
  • the server may establish the remote channel after receiving the print instruction, or the server may establish the remote channel after the user selects the cloud file to be printed and before receiving the print instruction. Or, in other embodiments, before this printing task, the server and the router have already established a remote channel, so there is no need to establish another remote channel for this printing task.
  • the server sends the printing message to the router through the remote channel.
  • the router sends a printing message to the printer.
  • step S206 please refer to the above-mentioned step S105, which will not be described again here.
  • the printer executes the printing task.
  • the server and the router interact with each other to print messages (including print control messages and files to be printed), which shortens the communication path and helps improve the efficiency of the printing process.
  • the printer sends a response message to the server, and the response message is used to indicate that printing has been completed.
  • the server sends a response message to the mobile phone.
  • the response message is used to indicate that printing has been completed.
  • Embodiments of the present application also provide a printing method.
  • a router such as one located at home
  • a printing message to control the printer to perform a remote printing task (such as printing a company's files on your phone).
  • Figure 10 shows the flow of the method, which includes the following steps:
  • the mobile phone receives the printing instruction input by the user.
  • step S301 please refer to the above-mentioned step S101, which will not be described again here.
  • step S302 please refer to the above-mentioned step S103, which will not be described again here.
  • the mobile phone sends the file to be printed to the router through the remote channel.
  • step S302 please refer to the above-mentioned step S104, which will not be described again here.
  • the router generates a print message.
  • the router After receiving the file to be printed, the router calls the print service, and the print service generates a print message according to the print protocol (such as IPP).
  • the print protocol such as IPP
  • the router sends a printing message to the printer.
  • the printer performs the printing task.
  • the printing message only needs to be interacted between the router and the printer, and does not need to be transmitted between the mobile phone and the router, further reducing the signaling overhead required for transmitting the message.
  • the types of files to be printed provided in the above embodiments are only exemplary.
  • the interface 605 shown in (c) of Figure 5B may also include other types of files, such as document printing, web pages, etc. Print etc.
  • the interactive data between the electronic devices involved in the embodiments of the present application may be transmitted using encryption and other methods.
  • the mobile phone uploads backup data to the server, it uploads desensitized backup data.
  • the printer sends a response message to the router.
  • the response message is used to indicate that the printing task has been completed.
  • the router sends a response message to the mobile phone.
  • Figure 11 shows another flow of the printing method according to the embodiment of the present application.
  • the method includes:
  • the first electronic device receives a printing instruction.
  • the print instruction is used to instruct execution of a print task.
  • the terminal receives the printing instruction, which may be an operation instruction from the user to click the "Start Printing" button.
  • the terminal may also display a first interface; the first interface includes cards corresponding to one or more electronic devices, and the cards of the one or more electronic devices include the second a card of the electronic device; detecting the user's operation on the card of the second electronic device and displaying a second interface; the second interface includes options for the printing function associated with the second electronic device.
  • the terminal can display an interface 601 (an example of the first interface).
  • the interface 601 includes cards for electronic devices such as televisions and speakers, and also includes cards 602 for routers (second electronic devices).
  • the terminal displays the interface 603 shown in (b) of FIG. 5B (an example of the second interface).
  • the interface 603 includes the option 604 of the printing function associated with the router.
  • the mobile phone can display one or more files as shown in (c) of Figure 5B. information.
  • the one or more files include at least one of files local to the terminal and files backed up by the terminal on other devices (such as servers).
  • the user can select one or more target printing files from one or more files shown in (c) of FIG. 5B.
  • the receiving the printing instruction includes: receiving the user's operation instruction on the printing control associated with the one or more target printing files.
  • the terminal may receive the user's click instruction on the start printing button 613 and use the click instruction as a print instruction, and the print instruction is associated with the target print file selected by the user.
  • the server may receive the print instruction from the terminal.
  • the print instruction is an operation instruction associated with one or more target print files stored on the server.
  • the user can select a cloud photo (one or more target printing files) through the terminal and click the start printing button to trigger this printing task.
  • a cloud photo one or more target printing files
  • the first electronic device obtains the printing message corresponding to the printing task.
  • the first electronic device determines the identification of the printing message in response to the printing instruction, and obtains the printing message according to the identification of the printing message.
  • the identifier of the printed message may be, but is not limited to, the service name of the printed message.
  • the first electronic device can encapsulate the print data (such as pictures to be printed, documents, etc.) into one or more print data messages, and encapsulate the print instructions into one or more print control messages.
  • the print command carries one or more print parameters.
  • the first electronic device sends the printing message to the remote second electronic device.
  • the second electronic device receives the printing message from the remote first electronic device.
  • the printing message is used to control the third electronic device to perform a printing task, and the second electronic device and the third electronic device belong to the same local area network.
  • the second electronic device sends the printing message to the third electronic device.
  • sending the printing message to the third electronic device may be implemented by transparently transmitting and forwarding the printing message directly to the third electronic device. That is, the second electronic device does not need to store the printing message, but directly forwards the printing message, which can reduce the consumption of storage resources, save storage space, and improve printing efficiency.
  • the third electronic device performs the printing task.
  • Embodiments of the present application also provide a printing method.
  • the first electronic device can learn whether the third electronic device supports the remote printing function. If the third electronic device supports the remote printing function, the related technology can be used to perform the printing task. If the third electronic device supports the remote printing function, If the device does not support the remote printing function, the technical solution in the embodiment of this application is used to perform the printing task.
  • the terminal learns that the printer supports remote printing tasks, it can send the print data message to the printer via the printing cloud. printer. If the terminal learns that the printer does not support remote printing tasks, the terminal sends the print message to the router through the remote channel with the router.
  • the one or more interfaces mentioned above are examples, and other interface design methods are possible.
  • This application describes the specific design method of the interface, and the switching method between interfaces (for example, switching between interfaces can be performed by sliding up and down in the interface. Switching, or pressing specific keys to switch interfaces) is not restricted.
  • it is not limited to the interface form and operation process shown in Figure 6, Figure 7A, Figure 7B, and Figure 9B.
  • card mode may not be used.
  • the third interface and the fourth interface can be displayed, as long as the file can be selected and the print task can be triggered.
  • multiple embodiments of the present application can be combined and the combined solution can be implemented.
  • some operations in the processes of each method embodiment are optionally combined, and/or the order of some operations is optionally changed.
  • the execution order between the steps of each process is only exemplary and does not constitute a limitation on the execution order between the steps. Other execution orders are possible between the steps. It is not intended that the order of execution described is the only order in which these operations may be performed.
  • One of ordinary skill in the art will recognize various ways to reorder the operations described herein.
  • the process details involved in a certain embodiment herein are also applicable to other embodiments in a similar manner, or different embodiments can be used in combination.
  • each method embodiment can be implemented individually or in combination.
  • the electronic device in the embodiment of the present application includes a corresponding hardware structure and/or software module to perform each function.
  • the embodiments of this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
  • Embodiments of the present application can divide the electronic device into functional units according to the above method examples.
  • each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit.
  • the above integrated units can be implemented in the form of hardware or software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • FIG 12 shows a schematic block diagram of an intelligent device control device provided in an embodiment of the present application.
  • the device may be the above-mentioned first electronic device or a component with corresponding functions.
  • the device 1700 may exist in the form of software, or may be a chip that can be used in a device.
  • the device 1700 includes: a processing unit 1702 and a communication unit 1703.
  • the communication unit 1703 can also be divided into a sending unit (not shown in Figure 12) and a receiving unit (not shown in Figure 12).
  • the sending unit is used to support the device 1700 in sending information to other electronic devices.
  • the receiving unit is used to support the device 1700 to receive information from other electronic devices.
  • the device 1700 may also include a storage unit 1701 for storing program codes and data of the device 1700.
  • the data may include but is not limited to original data or intermediate data.
  • the processing unit 1702 may be used to support the receiving device to perform S502, etc. in FIG. 11, and/or other processes for the solutions described herein.
  • the communication unit 1703 is used to support communication between the device 1700 and other electronic devices (such as the above-mentioned second electronic device, etc.), for example, to support the execution of S503 in Figure 11 and so on.
  • the processing unit 1702 may be used to support the receiving device in intercepting response messages, etc., and/or other processes for the solution described herein.
  • the communication unit 1703 is used to support communication between the device 1700 and other electronic devices (such as the above-mentioned second electronic device, etc.), for example, to support the execution of S503 in Figure 11 and so on.
  • the communication unit is also used to receive input information from the user, such as receiving printing instructions input by the user (such as clicking the start printing button), etc.
  • the device 1700 may also include a display unit (not shown in Figure 12) for displaying interfaces and/or other information.
  • a display unit not shown in Figure 12 for displaying interfaces and/or other information.
  • the processing unit 1702 can be a controller or the processor 501 shown in FIG. 5A , for example, it can be a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processing (Digital Signal Processing, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
  • the processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, and so on.
  • the communication unit 1703 may include the transceiver 503 shown in FIG. 5A , and may also include a transceiver circuit, a radio frequency device, etc.
  • the storage unit 1701 may be the memory 502 shown in Figure 5A.
  • An embodiment of the present application also provides an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled to one or more processors.
  • the one or more memories are used to store computer program codes.
  • the computer program codes include computer instructions.
  • An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, and the memory is used to store programs or instructions. When the program or instructions are executed by the processor, the The chip system implements the method in any of the above method embodiments.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be implemented in hardware or software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software code stored in memory.
  • the memory may be integrated with the processor or may be provided separately from the processor, which is not limited by this application.
  • the memory can be a non-transient processor, such as a read-only memory ROM, which can be integrated on the same chip as the processor, or can be separately provided on different chips.
  • This application describes the type of memory, and the relationship between the memory and the processor. There is no specific limitation on how the processor is configured.
  • the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), or It can be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller unit , MCU), it can also be a programmable logic device (PLD) or other integrated chip.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing circuit
  • MCU microcontroller unit
  • PLD programmable logic device
  • each step in the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the method steps disclosed in conjunction with the embodiments of this application can be directly implemented by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • Computer instructions are stored in the computer-readable storage medium.
  • the electronic device causes the electronic device to execute the above related method steps to implement the above embodiments. Intelligent device control methods.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the intelligent device control method in the above embodiment.
  • inventions of the present application also provide a device.
  • the device may be a component or module.
  • the device may include a connected processor and a memory.
  • the memory is used to store computer execution instructions.
  • the processor When the device is running, the processor The computer execution instructions stored in the executable memory can cause the device to execute the intelligent device control method in each of the above method embodiments.
  • the electronic devices, computer-readable storage media, computer program products or chips provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the above provided The beneficial effects of the corresponding methods will not be described again here.
  • the electronic device includes corresponding hardware and/or software modules that perform each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
  • This embodiment can divide the electronic device into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • the disclosed method can be implemented in other ways.
  • the terminal device embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple divisions. Units or components may be combined or integrated into another system, or some features may be omitted, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of modules or units, which may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the application.
  • the aforementioned storage media include: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

一种打印方法、电子设备及系统,涉及终端技术领域。本方法能够降低打印系统的组网复杂度。该方法应用于第二电子设备,所述方法包括:从远程的第一电子设备接收打印报文;向第三电子设备发送所述打印报文,其中,所述打印报文用于控制所述第三电子设备执行打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。

Description

打印方法、电子设备及系统
本申请要求于2022年03月21日提交国家知识产权局、申请号为202210283787.1、发明名称为“打印方法、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及终端技术领域,尤其涉及打印方法、电子设备及系统。
背景技术
目前,打印机越来越多的被用户使用。用户可以通过手机等电子设备控制联网的打印机执行打印任务。根据手机与打印机是否在同一局域网,目前的打印场景可以分为本地打印和远程打印。其中,本地打印,是指手机与打印机位于同一局域网,比如手机与打印机连接同一路由器。远程打印,是指手机与打印机位于不同网络中,比如,手机位于公司,连接公司的网络,打印机位于家中,连接家中网络。
针对远程打印场景,目前的一些方案中,如图1A所示,用户家中的打印机通过路由器连接到互联网(internet),公司中的手机可以通过云端(可称为打印云)将待打印文件(比如图片、文档)发送给家里的打印机。但该方案要求打印机支持远程打印功能,否则手机无法将待打印文件发送给远程的打印机。
另一些方案中,如果打印机不支持远程打印功能,用户可以通过购买打印盒子(又可称为打印云盒)实现远程打印。如图1B所示,为了让不支持远程打印功能的打印机实现远程打印,可以在组网中加入打印云盒,由打印云盒控制打印机实现打印。但是,该方案中,组网较为复杂。
发明内容
为了解决上述的技术问题,本申请实施例提供了一种打印方法、电子设备及系统。本申请实施例提供的技术方案,能够降低打印系统的组网复杂度。
为了实现上述的技术目的,本申请实施例提供了如下技术方案:
第一方面,提供一种打印方法,应用于第二电子设备,所述方法包括:
从远程的第一电子设备接收打印报文;
向第三电子设备发送所述打印报文,其中,所述打印报文用于控制所述第三电子设备执行打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。该方案中,组网中不再需要额外独立设置的打印云盒即可实现远程打印功能,降低了组网复杂度。
并且,无需借助打印云盒,意味着,本申请实施例中,打印报文经由第一电子设备、第二电子设备就可以到达第三电子设备,通信路径经过的设备数目更少,传输时延更小,传输效率更高,有助于提升打印任务的效率。
在一种可能的设计中,向第三电子设备发送所述打印报文,包括:
向所述第三电子设备透传转发所述打印报文。该方案中,第二电子设备从手机接收打印报文后,可以无需存储打印报文,而是直接转发打印报文,能够降低存储资源 的消耗,节约存储空间,提升打印效率。
在一种可能的设计中,在向第三电子设备发送所述打印报文之后,所述方法还包括:
从所述第三电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成;
向所述第一电子设备发送所述响应报文。
在一种可能的设计中,所述方法还包括:建立与所述第一电子设备之间的通道;
从所述第一电子设备接收打印报文,包括:通过所述通道从所述第一电子设备接收所述打印报文。
在一种可能的设计中,所述方法还包括:建立与所述第一电子设备之间的通道;
向所述第一电子设备发送所述响应报文,包括:通过所述通道向所述第一电子设备发送所述响应报文。
在一种可能的设计中,所述从远程的第一电子设备接收打印报文,包括:经由第四电子设备从所述第一电子设备接收所述打印报文。
在一种可能的设计中,向所述第一电子设备发送所述响应报文,包括:经由第四电子设备向所述第一电子设备发送所述响应报文。
在一种可能的设计中,向所述第一电子设备发送所述响应报文,包括:
确定所述响应报文的标识,并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。
第二方面,提供一种打印方法,应用于第一电子设备,所述方法包括:
接收打印指令,所述打印指令用于指示执行打印任务;
响应于所述打印指令,获取所述打印任务对应的打印报文;
向远程的第二电子设备发送所述打印报文,其中,所述打印报文用于控制第三电子设备执行所述打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
在一种可能的设计中,在接收打印指令之前,所述方法还包括:
显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或多个电子设备的卡片包括所述第二电子设备的卡片;
检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
该方案中,可以通过电子设备的管理界面(比如第二界面)中设计打印功能的选项,从而将电子设备的管控与打印功能相关联,在对第二电子设备的管理过程中,实现第二电子设备控制第三电子设备执行打印的功能。
需要说明的是,电子设备的卡片还可以替换为其他UI方式,比如,可以替换为电子设备的图标等。
在一种可能的设计中,在显示第二界面之后,所述方法还包括:
检测到用户对所述打印功能的选项的操作,显示一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
确定用户从所述一个或多个文件中选择一个或多个目标打印文件;所述接收打印指令,包括:接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。
该方案中,用户可以选择打印第一电子设备本地的文件,和/或打印第一电子设备备份在其他设备(比如服务器)上的文件。
在一些示例中,用户选择打印第一电子设备本地的文件时,由第一电子设备获取打印报文,并向第二电子设备发送打印报文。
在一些示例中,用户选择打印服务器上的备份文件时,由第一电子设备向服务器发送打印指令,之后,由服务器获取打印报文,并向第二电子设备发送打印报文。或者,用户选择打印服务器上的备份文件时,由第一电子设备获取打印报文,并向第二电子设备发送打印报文。
在一种可能的设计中,在显示第二界面之后,所述方法还包括:
检测到用户对所述打印功能的选项的操作,显示第三界面;所述第三界面包括一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
检测到用户从所述一个或多个文件中选择一个或多个目标打印文件的操作,显示第四界面,所述第四界面包括用于指示开启所述打印任务的打印控件;
接收打印指令,包括:接收所述用户对所述打印控件的操作。
在一种可能的设计中,所述第一电子设备为服务器;
所述接收打印指令,包括:接收用户对所述服务器上存储的一个或多个目标打印文件关联的操作指令。该方案可以适用于诸如备份场景,服务器接收打印指令,并可以获取服务器本地文件对应的打印报文,从而向第二电子设备发送打印报文,以使得第二电子设备向同一局域网内的第三电子设备发送打印报文,进而实现第三电子设备执行打印任务。
作为一种可能的实现方式,用户通过终端选择一个或多个目标打印文件,一个或多个目标打印文件是终端上传至服务器后由服务器存储的文件。
在一种可能的设计中,所述方法还包括:建立与所述第二电子设备之间的通道。
在一种可能的设计中,在建立通道的过程中,所述方法还包括:显示第五界面,所述第五界面用于指示正在建立所述通道。
向第二电子设备发送所述打印报文,包括:通过所述通道向所述第二电子设备发送所述打印报文。该方案中,第一电子设备通过建立与第二电子设备之间的通道,使得第一电子设备能够将打印报文发送给远程的第二电子设备,进而第二电子设备能够通过打印报文控制第三设备执行打印任务。
在一种可能的设计中,在向第二电子设备发送所述打印报文之后,所述方法还包括:
从所述第二电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成。
在一种可能的设计中,所述向远程的第二电子设备发送所述打印报文,包括:
经由第四电子设备向远程的所述第二电子设备发送打印报文。
在一种可能的设计中,所述响应于所述打印指令,获取所述打印任务对应的打印报文,包括:
响应于所述打印指令,确定所述打印报文的标识;
根据所述打印报文的标识,获取所述打印报文。
第三方面,提供一种打印装置,可以是第二电子设备或用于实现第二电子设备功能的组件(比如芯片系统),该装置包括:
通信单元,用于从远程的第一电子设备接收打印报文;向第三电子设备发送所述打印报文,其中,所述打印报文用于控制所述第三电子设备执行打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
在一种可能的设计中,向第三电子设备发送所述打印报文,包括:
向所述第三电子设备透传转发所述打印报文。
在一种可能的设计中,所述通信单元,还用于从所述第三电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成;
所述通信单元,还用于向所述第一电子设备发送所述响应报文。
在一种可能的设计中,该装置还包括处理单元;所述处理单元,用于建立与所述第一电子设备之间的通道;
从所述第一电子设备接收打印报文,包括:通过所述通道从所述第一电子设备接收所述打印报文。
在一种可能的设计中,向所述第一电子设备发送所述响应报文,包括:通过所述通道向所述第一电子设备发送所述响应报文。
在一种可能的设计中,所述从远程的第一电子设备接收打印报文,包括:经由第四电子设备从所述第一电子设备接收所述打印报文。
在一种可能的设计中,向所述第一电子设备发送所述响应报文,包括:经由第四电子设备向所述第一电子设备发送所述响应报文。
在一种可能的设计中,向所述第一电子设备发送所述响应报文,包括:
确定所述响应报文的标识,并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。
第四方面,提供一种打印装置,可以是第一电子设备或实现第一电子设备功能的组件(比如芯片系统),该装置包括:
通信单元,接收打印指令,所述打印指令用于指示执行打印任务;
处理单元,用于响应于所述打印指令,获取所述打印任务对应的打印报文;
所述通信单元,还用于向远程的第二电子设备发送所述打印报文,其中,所述打印报文用于控制第三电子设备执行所述打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
在一种可能的设计中,所述装置还包括显示单元;
所述显示单元,用于显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或多个电子设备的卡片包括所述第二电子设备的卡片;
所述显示单元,还用于在所述处理单元检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
在一种可能的设计中,所述显示单元,还用于在处理单元检测到用户对所述打印功能的选项的操作,显示一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
所述处理单元,还用于确定用户从所述一个或多个文件中选择一个或多个目标打 印文件;
所述接收打印指令,包括:接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。
在一种可能的设计中,所述显示单元,还用于在所述处理单元检测到用户对所述打印功能的选项的操作,显示第三界面;所述第三界面包括一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
所述显示单元,还用于在所述处理单元检测到用户从所述一个或多个文件中选择一个或多个目标打印文件的操作,显示第四界面,所述第四界面包括用于指示开启所述打印任务的打印控件;
接收打印指令,包括:接收所述用户对所述打印控件的操作。
在一种可能的设计中,所述第一电子设备为服务器;
所述接收打印指令,包括:接收用户对所述服务器上存储的一个或多个目标打印文件关联的操作指令。
在一种可能的设计中,所述处理单元,还用于建立与所述第二电子设备之间的通道。
在一种可能的设计中,所述显示单元,还用于在建立通道的过程中,显示第五界面,所述第五界面用于指示正在建立所述通道。
向第二电子设备发送所述打印报文,包括:通过所述通道向所述第二电子设备发送所述打印报文。
在一种可能的设计中,所述通信单元,还用于从所述第二电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成。
在一种可能的设计中,所述向远程的第二电子设备发送所述打印报文,包括:
经由第四电子设备向远程的所述第二电子设备发送打印报文。
在一种可能的设计中,所述响应于所述打印指令,获取所述打印任务对应的打印报文,包括:
响应于所述打印指令,确定所述打印报文的标识;
根据所述打印报文的标识,获取所述打印报文。
第五方面,提供一种打印系统,包括:
第一电子设备,用于接收打印指令,并响应于所述打印指令,获取所述打印任务对应的打印报文;还用于向远程的第二电子设备发送所述打印报文,其中,所述打印报文用于控制第三电子设备执行所述打印任务,所述第二电子设备和所述第三电子设备属于同一局域网;所述打印指令用于指示执行打印任务;
所述第二电子设备,用于从远程的第一电子设备接收打印报文,并向第三电子设备发送所述打印报文。
在一种可能的设计中,所述第二电子设备,用于向第三电子设备发送所述打印报文,包括:
用于向所述第三电子设备透传转发所述打印报文。
在一种可能的设计中,所述第一电子设备,还用于:
显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或多个电子设备的卡片包括所述第二电子设备的卡片;
检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
在一种可能的设计中,所述第一电子设备,还用于:
检测到用户对所述打印功能的选项的操作,显示一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
确定用户从所述一个或多个文件中选择一个或多个目标打印文件;
所述第一电子设备,用于接收打印指令,包括:用于接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。
在一种可能的设计中,所述第一电子设备为服务器;
所述第一电子设备,用于接收打印指令,包括:接收用户对所述服务器上存储的一个或多个目标打印文件关联的操作指令。
在一种可能的设计中,所述第二电子设备,还用于从所述第三电子设备接收响应报文,并向所述第一电子设备发送所述响应报文;所述响应报文用于指示所述打印任务已完成;
所述第一电子设备,还用于从所述第二电子设备接收响应报文。
在一种可能的设计中,所述第二电子设备,还用于建立与所述第一电子设备之间的通道;所述第一电子设备,还用于建立与所述第二电子设备之间的通道;
所述第二电子设备,用于从所述第一电子设备接收打印报文,包括:用于通过所述通道从所述第一电子设备接收所述打印报文;
所述第一电子设备,用于向第二电子设备发送所述打印报文,包括:用于通过所述通道向所述第二电子设备发送所述打印报文。
在一种可能的设计中,所述打印报文包括打印控制报文和打印数据报文。
在一种可能的设计中,所述第一电子设备,用于向远程的第二电子设备发送所述打印报文,包括:经由第四电子设备向远程的所述第二电子设备发送打印报文;
所述第二电子设备,用于从远程的第一电子设备接收打印报文,包括:经由第四电子设备从所述第一电子设备接收所述打印报文。
在一种可能的设计中,所述第二电子设备,用于向所述第一电子设备发送所述响应报文,包括:
确定所述响应报文的标识,并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。
在一种可能的设计中,所述第一电子设备,用于响应于所述打印指令,获取所述打印任务对应的打印报文,包括:
用于响应于所述打印指令,确定所述打印报文的标识;
根据所述打印报文的标识,获取所述打印报文。
在上述任意方面的可能的设计中,所述打印报文包括打印控制报文和打印数据报文。
在上述任意方面的可能的设计中,打印报文的标识可以但不限于是打印报文的服务名称。
在上述任意方面的可能的设计中,所述通道包括端到端P2P通道。
第六方面,本申请实施例提供一种电子设备,该电子设备具有实现如上述任意方面及其中任一种可能的实现方式中所述的打印方法的功能;或者,该电子设备具有实现如上述任意方面及其中任一种可能的实现方式中所述的打印方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第七方面,本申请实施例提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被电子设备执行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方。
第八方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。
第九方面,本申请实施例提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行第一方面或第一方面中任意一种实施方式的方法;或者,处理电路被配置为执行第二方面或第二方面中任意一种实施方式的方法。
第十方面,本申请实施例提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行第一方面或第一方面中任意一种实施方式的方法;或者,当至少一个处理器执行指令时,至少一个处理器执行第二方面或第二方面中任意一种实施方式的方法。
附图说明
图1A为本申请实施例提供的系统架构的示意图;
图1B为本申请实施例提供的系统架构的示意图;
图2为本申请实施例提供的系统架构的示意图;
图3为本申请实施例提供的电子设备的硬件结构示意图;
图4为本申请实施例提供的电子设备的软件结构示意图;
图5A为本申请实施例提供的电子设备的硬件结构示意图;
图5B为本申请实施例提供的用户界面示意图;
图6为本申请实施例提供的用户界面示意图;
图7A、图7B为本申请实施例提供的用户界面示意图;
图7C为本申请实施例提供的打印方法的流程示意图;
图8A为本申请实施例提供的打印方法的流程示意图;
图8B为本申请实施例提供的打印方法的流程示意图;
图9A为本申请实施例提供的打印方法的流程示意图;
图9B为本申请实施例提供的用户界面示意图;
图10为本申请实施例提供的打印方法的流程示意图;
图11为本申请实施例提供的打印方法的流程示意图;
图12为本申请实施例提供的打印装置的结构示意图。
具体实施方式
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例中,“用户”不限定是电子设备的拥有者或某个特定使用者,也可以是动物、硬物或其它物体。用户的对电子设备的操作也可以是动物、硬物或其它物体对电子设备的操作。使用“用户”或者“用户的操作”等词旨在作为示例性的说明,具体是谁执行的该操作,本申请实施例不做限定。
本申请实施例的打印方法可应用于打印系统中。示例性的,如图2示出了本申请实施例的技术方案所适用的打印系统的一种示例。该系统包括第一电子设备100、第二电子设备200以及第三电子设备300。
其中,第一电子设备100可以位于第一网络内。可选的,第一网络可以是任何可以使用的网络。比如,蜂窝网,或无线高保真(wireless fidelity,Wi-Fi)网络。
第一电子设备100中可以安装控制打印任务的应用(可简称为打印应用),该应用可以通过第三网络与第二电子设备200交互打印协议相关的报文(可简称为打印协议报文,或打印服务报文,或打印报文)。可选的,第一电子设备100可以但不限于是:手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)等电子设备,本申请实施例对此不做任何限制。
在一些实施例中,第一电子设备100还可以是服务器。
可选的,第三网络包括广域网。可选的,第三网络中可以设置有服务器。服务器与第一电子设备100、第二电子设备200的厂商可以相同,可以不同。在一些示例中, 用户可以对第一电子设备100中的部分数据进行备份,上传到服务器,服务器可以存储这些备份数据。后续,第一电子设备100接收到用户输入的针对目标数据的打印指令时,可以指示服务器将服务器存储的目标数据传递给远程的打印机,以实现打印机的远程打印。在另一些示例中,第一电子设备100接收到用户输入的针对目标数据的打印指令后,将打印数据(比如待打印的图片)发送给第三网络中的服务器,服务器不保存打印数据,而是直接将打印数据通过路由器发送给打印机。可选地,在一些可能的场景中,用于保存用户打印数据的服务器和用于将打印数据通过路由器发送给打印机的服务器可以不同。
可选的,打印协议包括但不限于因特网打印协议/多播域名系统(internet printing protocol/multicast domain name system,IPP/mDNS)。
第二电子设备200、第三电子设备300位于第二网络内。可选的,第二网络可以是任何可以使用的局域网,比如Wi-Fi网络。
第二电子设备200可以是为第三电子设备300提供联网功能的设备。在一些示例中,第二电子设备200用于从打印应用接收打印协议的相关报文(可以简称为打印协议报文,或打印服务报文,或打印报文),并将打印报文发送给第三电子设备300。可选的,第二电子设备200例如可以是无线路由器、客户前置设备(Customer Premise Equipment,CPE)等。
可选的,打印报文包括打印指令对应的报文(可简称为打印控制报文),和/或打印数据的报文。其中,打印指令对应的报文,也可以称为打印控制报文,可以用于设置第三电子设备300的打印参数等。打印数据的报文,是待打印文件的报文。
第三电子设备300用于通过第二电子设备200接收来自第一电子设备100的打印报文,并根据打印报文执行待打印文件的打印任务。可选的,第三电子设备300为打印机,该打印机可以支持远程打印功能,也可以不支持远程打印功能。
其中,打印机支持远程打印功能,指的是打印机支持直接从打印云获取待打印文件。比如,图1A所示打印场景中,打印机支持远程打印功能,则打印机可以直接从打印云获取待打印文件,之后,打印机执行针对该待打印文件的打印任务。
打印机不支持远程打印功能,指的是打印机不支持直接从打印云获取待打印文件。作为一种解决方案,如图1B,在组网中引入打印云盒,由打印云盒从打印云获取并存储待打印文件,并将待打印文件转发给打印机。其中,打印云盒需要向打印云进行注册,注册方式包括但不限于扫码注册等。如此,导致借助打印云盒实现远程打印的过程中,用户的操作复杂度提升,用户体验不佳。
可选的,上述第一网络与第二网络可以是支持相同或不同协议的网络。示例性的,第一网络为蜂窝数据网,第二网络为Wi-Fi网络。
示例性的,图3示出了第一电子设备100的结构示意图。第一电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器,使处理器110与触摸传感器通过I2C总线接口通信,实现电子设备的触摸功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备的显示功能。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140 可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所 述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频 输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。电子设备可以通过音频模块170,例如音乐播放,录音等。音频模块170可以包括扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。
上述图3仅为电子设备的结构的可能示例,并不构成对电子设备结构的限制。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
上述电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的系统为例,示例性说明电子设备100的软件结构。
图4是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序。
如图4所示,应用程序可以包括通话,备忘录,浏览器,联系人,相机,图库,日历,地图,蓝牙,音乐,视频,短信息等APP(应用,application)。
在本申请的一些实施例中,应用还可以包括与打印任务相关的应用,比如用于控制执行打印任务的应用。可选的,用于控制打印任务的应用可以是第一电子设备100出厂时预先安装的,也可以是用户使用第一电子设备100时从应用市场下载并安装的,本申请实施例对此不做任何限制。
示例性的,本申请实施例中,用于控制执行打印任务的应用包括但不限于智慧生活应用。智慧生活应用可提供相关界面,用户可通过相关界面选择待打印的文件(比如图片/文档),用户选择待打印的图片/文档后,第一电子设备100可控制打印机执行远程打印。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,资源管理器,通知管理器等。
其中,窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
本申请实施例中,框架层可以包括打印服务。智慧生活应用可以调用打印服务,打印服务按照打印协议(比如IPP)生成打印报文(包括打印指令对应的报文和/或待打印文件的报文),打印报文通过框架层等可以传递到内核层。
每个打印服务具有相应的服务名称(或称包名),比如,对于系统,打印服务的名称为hwprintservices,对于原生打印服务的名称为BuiltinPrintService。打印服务的实现协议可以但不限于是IPP/mDNS。
框架层还可提供虚拟专用网络(virtual private network)服务(或称VPN通道)。应用程序可以调用VPN服务,实现从内核层拦截打印报文。之后,应用可以将拦截的打印报文发送给第二电子设备200,以使得第二电子设备200(比如路由器)向第三电子设备300(比如打印机)转发该打印报文。
可选的,打印报文可以是基于任何打印协议(比如IPP)的报文。
可以理解,图4仅是第一电子设备100所适用的软件架构的一种示例,在实际实现时,某个层的一些模块或功能还可以由其他的一个或多个层实现。比如,还可以由内核层实现VPN服务,由框架层对外提供VPN服务,或者,由多个层分别实现VPN服务的部分功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图 层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动等,本申请实施例对此不做任何限制。
第二电子设备200的结构也可以参考图3所示第一电子设备100的结构,第二电子设备200可以具有比图3所示的结构更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
例如,第二电子设备200为路由器时,如图5A,第二电子设备200可以包括处理器501、存储器502、收发器503等。其中,收发器503用于与其他设备进行通信。第二电子设备200的其他组件请参考图3的第一电子设备100中相关结构的描述,这里不再赘述。
如下以第一电子设备100为手机,第二电子设备200为路由器,且手机与路由器位于不同局域网为例对本申请实施例的技术方案进行说明。
示例性的,以用于控制打印任务的应用为智慧生活应用为例,响应于用户打开智慧生活应用的操作,手机显示如图5B的(a)所示界面601。其中,界面601包括家中各电子设备的卡片。其中,路由器AA的卡片的标记为602。若检测到用户点击卡片602,则手机可跳转到如图5B的(b)所示界面603。可选的,该界面603可展示路由器AA的接入设备。可选的,界面603还可以包括远程打印选项604。若检测到用户点击远程打印选项604,则手机可跳转到如图5B的(c)所示远程打印界面605。可选的,界面605包括本地照片选项606和本地文档选项607。其中,本地照片选项606用于用户选择待打印的本地照片,本地文档选项607用于用户选择待打印的本地文档。
在一些示例中,若手机检测用户点击如图5B的(c)所示本地照片选项606,则手机可跳转到如图5B的(d)所示相册界面608,用户可以从相册中选择待打印的本地照片。响应于用户选择待打印照片的操作,比如点击如图5B的(d)所示照片后,如图6的(a)所示,手机可跳转到远程打印界面605,并且,手机开始建立与路由器之间的远程通道(比如点到点(peer-to-peer,P2P)通道)。可选的,手机可以显示“正在建立远程通道…”信息609,以提示用户当前正在与路由器建立远程通道。手机建立与路由器之间的远程通道后,可显示如图6的(b)所示界面610。
可选的,该界面可包括提示信息612,以提示用户当前已建立与路由器之间的远程通道。
可选的,界面610还可包括待打印的照片的预览信息611。
可选的,界面610还包括打印功能相关的选项。可选的,打印功能相关的选项包括但不限于:用于选择打印机的选项619,用于选择打印份数的选项,用于选择纸张类型的选项,用于选择打印模式(黑白、彩色打印)的选项,用于选择纸张尺寸的选项。
其中,如图7A的(a)所示,响应于用户点击选项619的操作,手机可显示如图7A的(b)所示打印机选择界面617。若检测到用户在界面617上点击控件618的操作,则手机确定用户想要使用打印机XX执行本次打印任务。检测到用户在界面617上点击控件618的操作后,手机可跳转回如图7A的(a)所示界面610。
可选的,界面610还包括开始打印按钮613。响应于用户点击开始打印按钮613的操作,手机调用系统提供的打印服务,打印服务按照打印协议生成打印报文。手机还可以调用系统提供的VPN接口,以便拦截并向路由器发送该打印报文。打印报文包括打印指令对应的报文以及待打印文件的报文。
路由器接收到该打印报文后,可向连接的打印机转发该打印报文。可选的,打印指令对应的报文可携带如图6的(b)所示一个或多个打印参数。比如,携带打印的份数、纸张类型(普通纸)、打印模式(黑白)、纸张尺寸(A4)。手机可以通过打印报文为打印机设置该一个或多个打印参数。
打印机通过路由器接收到来自手机的打印报文之后,可以根据打印报文执行打印任务。示例性的,打印机根据打印指令对应的报文中携带的打印参数,设置纸张类型等,设置完打印参数后,开始对待打印文件进行打印。
可选的,响应于用户点击如图6的(b)所示开始打印按钮613的操作,如图6的(c)所示,手机可以跳转到远程打印界面605,并显示提示信息614,以便提示用户当前正在执行打印任务。
可选的,在打印机完成打印任务后,打印机可以通过路由器向手机发送任务完成响应,用于指示打印任务已执行完毕。手机获知打印任务已执行完毕的情况下,如图6的(d),手机可在界面605中显示提示信息615,以提示用户打印任务已执行完毕。
本申请实施例的上述技术方案中,在接收到用户输入的打印指令之后,手机可以建立与路由器之间的远程通道,并通过该远程通道经由路由器向打印机发送打印指令对应的报文以及待打印文件。如此,打印机能够根据打印指令对应的报文以及待打印文件执行打印任务。可见,在打印机不支持远程打印功能或支持远程打印功能的情况下,打印机均能够通过路由器接收来自手机的打印指令对应的报文以及待打印文件,并执行该打印任务,提升了远程打印任务的执行成功率。
此外,上述技术方案中,在打印机不支持远程打印功能的情况下,手机可以拦截打印报文,并通过路由器向打印机发送拦截的打印报文,该过程中,无需额外引入打印云盒,不仅降低了家庭网络的组网复杂度,还能够避免打印云盒注册导致的高操作复杂度。
需要说明的是,图6中以手机在用户点击“开始打印”按钮613之前建立与路由 器之间的远程通道为例,在另一些实施例中,手机还可以在检测到用户点击“开始打印”按钮613之后建立上述远程通道,本申请实施例并不限制手机建立上述远程通道的时机或触发条件。
示例性的,若检测到用户在如图5B的(d)所示界面608中选择(比如单击)待打印图片的操作,则手机可显示如图7B的(a)所示界面610,该界面包括开始打印按钮613。在检测到用户点击开始打印按钮613后,手机可显示如图7B的(b)所示界面616。可选的,界面616可包括提示信息612,用于提示用户手机当前正在建立远程通道和/或远程通道已建立成功。在远程通道建立成功之后,如图7B的(c)所示,手机可在界面616中显示提示信息614,用于提示用户打印机当前正在打印。待打印机打印完成后,如图7B的(d)所示,手机可在界面616中显示提示信息615,用于提示用户打印机已完成打印。
如下,对打印过程中上述各电子设备之间的交互进行介绍。示例性的,以第一电子设备100为手机,第二电子设备200为路由器,第三电子设备300为打印机,且第一电子设备100、第二电子设备200、第三电子设备300满足图2所示系统架构为例,如图7C所示,本申请实施例提供的打印方法包括:
S101、手机接收用户输入的打印指令。
作为一种可能的实现方式,如图8A,S101可以实现为:S101a、手机通过打印应用接收用户输入的打印指令。打印应用包括但不限于与打印任务相关的智慧生活等应用。
本申请实施例中,用户可以以任何可用方式输入打印指令,该打印指令用于指示手机远程控制打印机执行打印任务。可选的,打印指令可以是用户通过界面输入的指令,也可以是用户输入的语音指令,本申请实施例对打印指令的形式不做限制。
示例性的,用户可以通过语音助手输入语音“让家里的打印机打印手机相册中的图片A”,该语音可以作为打印指令。
再示例性的,如图6的(b)所示,智慧生活应用接收到用户点击“开始打印”按钮613的操作指令,该操作指令可作为打印指令。
S102、手机生成并拦截打印报文。
手机检测到打印指令之后,可以生成打印报文,以便控制远程打印机执行打印任务。打印报文包括打印指令对应的报文(即打印控制报文)以及待打印文件的报文(即打印数据报文)。可选的,一个待打印文件可按照打印协议封装为一个或多个报文。
作为一种可能的实现方式,如图8A所示,S102可以实现为:S102a、打印应用调用手机系统提供的打印服务,S102b、打印服务生成打印报文。之后,打印服务还可以执行步骤S102c、向内核传递该打印报文。在相关技术中,手机可以通过内核向其他设备转发打印报文(比如基于mDNS局域网内的打印协议进行转发),但是,该转发过程通常限于同一局域网内的转发。也就是说,手机需要与接收设备在同一局域网内。本申请实施例中,为了使得手机能够向远程的设备发送打印报文,手机可以将内核生成的打印报文拦截到打印应用中,并建立打印应用与远程路由器之间的远程通道,如此一来,可以通过打印应用向远程路由器发送打印报文,以便实现远程打印。
作为一种可能的实现方式,如图8A,手机对内核生成的打印报文进行拦截,可以 实现为如下步骤S102d-S102g:
S102d、打印应用调用VPN服务;
S102e、VPN服务向内核发送拦截请求,该拦截请求用于请求拦截打印报文。
内核接收拦截请求后,确定需要将本次打印任务中的一个或多个打印报文发送给VPN服务。那么,此后,当内核从打印服务接收本次打印任务的打印报文后,需要将该打印报文转发给VPN服务。
S102f、内核向VPN服务发送打印报文,VPN服务从内核拦截到打印报文。
作为一种可能的实现方式,内核从打印服务接收某个类型的报文后,可以通过该报文的服务名称(或称包名)识别出该报文是打印报文。之后,内核拦截该打印报文,并将该打印报文发送给VPN服务。
S102g、VPN服务将拦截的打印报文传递到打印应用中。
可选的,VPN服务可以通过相关技术实现。示例性的,对于安装系统的手机,VPN服务可以基于vpnservice接口实现。
需要说明的是,对生成、拦截打印指令的报文,以及生成、拦截待打印文件的报文的执行顺序,本申请实施例不做限制。
S103、手机与路由器之间建立远程通道。
作为一种可能的实现方式,如图8A,S103可以实现为:S103a、手机建立打印应用和路由器之间的远程通道。可选的,该远程通道用于打印应用和路由器之间传输打印报文。
可选的,远程通道包括但不限于是P2P通道。可选的,P2P通道包括但不限于基于会话穿越应用的网络地址转换(session traversal utilities for nat,stun)技术的P2P通道、基于中继穿越的网络地址转换(traversal using relays around nat,turn)技术的P2P通道。
示例性的,若建立基于turn技术的P2P通道,则该P2P通道可以包括用于中继服务的服务器。若建立基于stun技术的P2P通道,则该P2P通道可以不包括用于中继服务的服务器,即手机与路由器之间可以直接连接,手机与路由器之间不存在其他中继节点。
需要说明的是,手机可以在接收用户输入的打印指令之后,建立与路由器之间的远程通道。比如,手机在检测到用户点击如图7B的(a)所示的开始打印按钮613之后,建立远程通道。或者,手机可以在接收用户输入的打印指令之前,预先建立与路由器之间的远程通道。比如,手机在检测到用户点击如图6的(b)所示的开始打印按钮613之前,预先建立远程通道。本申请实施例对远程通道的建立时机与具体建立方式不做限制。
S104、手机通过远程通道向路由器发送打印报文。
作为一种可能的实现方式,如图8A,S104可以实现为:S104a、打印应用通过远程通道向路由器的通信模块发送打印报文。其中,该打印报文是由打印服务拦截到打印应用中的。可选的,若远程通道包括用于中继服务的服务器,则打印应用可以先向服务器发送打印报文,再由服务器(第四电子设备的一个示例)向路由器发送打印报文。
需要说明的是,打印指令的报文与待打印文件的报文,可以通过同一消息发送,也可以通过不同的多个消息发送。对于通过多个消息发送报文的情况,可以先发送打印指令的报文,或者先发送待打印文件的报文,或者,同时发送打印指令的报文以及待打印文件的报文。
示例性的,手机在检测到用户点击如图7B的(a)所示的开始打印按钮613之后,开始向路由器发送打印报文。打印报文包括打印控制报文以及待打印文件的报文。打印控制报文可携带如图7B的(a)所示的一个或多个打印参数(比如但不限于纸张类型、纸张尺寸等)。待打印文件的报文比如可以是如图7B的(a)所示的待打印图片611封装形成的一个或多个报文。
S105、路由器向打印机发送打印报文。
作为一种可能的实现方式,如图8A,S105可以实现为:S105a、通信模块解析并向路由器的VPN服务传递打印报文;S105b、路由器的VPN服务向内核传递打印报文;S105c、内核通过相应驱动调用通信模块向打印机发送打印报文。
可选的,路由器的VPN服务可以基于的tun接口实现。
S106、打印机执行打印任务。
示例性的,如图6的(c)所示,打印机执行打印任务的过程中,手机可显示提示信息614,以提示用户打印机正在打印。
S107、打印机向手机发送响应报文。
其中,该响应报文用于指示已完成打印任务。
作为一种可能的实现方式,打印机通过路由器向手机发送该响应报文。
可选的,由于打印机与路由器在同一局域网内,因此,路由器可以通过内核与打印机进行交互。可选的,路由器与打印机之间的交互流程可以遵循局域网内的打印协议(比如mDNS协议)。
路由器通过内核从打印机接收响应报文(对应图8A所示步骤S107a)后,确定所述响应报文的标识(比如服务名称),并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。示例性的,路由器接收响应报文后,根据响应报文的服务名称,确定响应报文是打印服务的报文,则可以调用VPN服务拦截该响应报文(对应图8A所示步骤S107b),VPN服务将拦截的响应报文传递给通信模块(对应图8A所示步骤S107c),由通信模块通过上述远程通道将响应报文发送给手机(对应图8A所示步骤S107d)。其中,通信模块与手机之间的交互可以遵循IPP。
示例性的,在打印机执行完打印任务后,可以向手机发送指示信息,手机接收到指示信息后,获知打印机已执行完打印任务,则可以显示如图6的(d)所示的提示信息615,以提示用户打印机已完成打印任务。
上述实施例中,在远程打印场景下,手机通过智慧生活等打印应用和路由器之间建立通道,并通过打印应用和路由器之间传递打印报文(包括打印指令对应的报文、待打印文件的报文),进而路由器能够将打印报文发送给打印机,实现打印机打印远程文件(即打印不在同一局域网中的设备内的文件)的功能。与图1B所示方案中在打印机不支持远程功能时,需要借助打印云盒才能从打印云接收待打印文件,组网实现较为复杂相比,本申请实施例的技术方案,组网中不再需要额外独立设置的打印云 盒即可实现远程打印功能,降低了组网复杂度。
并且,本申请实施例中,打印报文经由手机、路由器就可以到达打印机,通信路径经过的设备数目更少,传输时延更小,传输效率更高,有助于提升打印任务的效率。
此外,路由器从手机接收打印报文后,可以无需存储打印报文,能够降低存储资源的消耗。
示例性的,如图8B示出了本申请实施例的又一方法流程。在流程中,手机先通过路由器发送打印控制报文,再向打印机发送待打印文件,以控制打印机执行远程打印。如图8B,该方法包括:
S401、手机接收用户输入的打印指令。
S402、手机生成并拦截打印控制报文。
S403、手机与路由器之间建立远程通道。
S404、手机通过远程通道向路由器发送打印控制报文。
示例性的,打印控制报文携带一个或多个打印参数。
S405、路由器向打印机发送打印控制报文。
S406、打印机向手机发送针对打印报文的第一响应报文。
可选的,打印机接收打印控制报文后,根据打印控制报文设置打印参数。设置完打印参数后,打印机可以通过路由器向手机发送该第一响应报文,第一响应报文用于表征打印参数已设置完成。
该步骤S406为可选步骤。
S407、手机向打印机发送待打印文件。
在一些实施例中,手机接收来自打印机的第一响应报文后,获知打印机已设置好相应打印参数,则手机向打印机下发待打印文件。
作为一种可能的实现方式,手机经由路由器向打印机发送待打印文件。可选的,若手机与路由器之间的远程通道包括服务器,则手机可以先向服务器发送待打印文件,再由服务器经由路由器向打印机发送待打印文件。
手机向打印机发送待打印文件的流程,可参见手机向打印机发送打印控制报文的流程。手机调用VPN服务对待打印文件进行拦截,并将拦截的待打印文件通过远程通道发送给路由器,由路由器将待打印文件转发给打印机。
S408、打印机执行打印任务。
打印机接收待打印文件之后,执行针对该待打印文件的打印任务。
S409、打印机向手机发送第二响应报文。
其中,第二响应报文用于指示已完成打印任务。
需要说明的是,图8B所示实施例中仅以手机先发送打印控制报文,后发送待打印文件为例进行说明,在另一些实施例中,打印控制报文和待打印文件的发送时机还可以根据需要确定,这里不做限制。
本申请实施例还提供一种打印方法,该方法中,在用户期望远程的打印机执行打印任务时,由服务器生成打印报文,以控制打印机执行远程打印任务(比如家中的打印机打印远程的手机中的文件)。比如,在一些场景中,用户通过终端选择已上传至云服务器的文件(比如照片或文档等),并指示终端打印选择的文件。此种场景中, 终端可指示存储有该文件的服务器生成打印报文,以控制打印机执行打印任务。示例性的,如图9A示出了该方法的流程,该方法包括如下步骤:
S201、手机接收用户输入的打印指令。
其中,S201的具体实现可参见上述步骤S101,这里不再赘述。
S202、手机向服务器(第一电子设备)发送打印指令。
可选的,打印指令携带待打印文件的标识。
作为一种可能的实现方式,手机检测到用户对目标文件的打印指令,若确定该目标文件是已经备份到服务器中的文件,则手机向服务器发送打印指令。可选的,手机发送的该打印指令可以携带目标文件的标识。
或者,手机检测到用户对目标文件的打印指令之后,向服务器发送打印指令,由服务器查询该目标文件是否已备份到服务器。在目标文件已备份到服务器的情况下,服务器可执行如下步骤S203。在目标文件没有备份到服务器的情况下,服务器从手机获取目标文件,并执行如下步骤S203。
示例性的,如图9B的(a),手机显示远程打印界面903,界面903包括“云照片”选项901。检测到用户点击选项901的操作后,手机可跳转到如图9B的(b)所示界面902。界面902可包括云服务器中存储的,且由该手机或同账号设备上传的图片。可选的,检测到用户从云图库中选择一张或多张图片的操作后,手机可跳转到如图9B的(c)所示的界面904。在检测到用户点击开始打印按钮613的操作之后,手机向服务器发送打印指令。
可选的,界面903还可以包括其他云文件(比如上传至云服务器的文档)的选项,本申请实施例对此不做限制。
S203、服务器生成并拦截打印报文。
作为一种可能的实现方式,服务器接收打印指令后,调用打印服务,打印服务按照打印协议(比如IPP)生成打印报文。示例性的,服务器从手机接收打印指令(可携带待打印文件的标识)后,确定用户想要打印的文件,并将该文件封装为一个或多个报文。服务器还可以将打印指令封装为对应的打印控制报文。
S204、服务器与路由器之间建立远程通道。
服务器与路由器之间建立远程通道的流程,可参见手机与路由器之间建立远程通道的流程。可选的,服务器与路由器之间的远程通道,包括但不限于P2P通道。
本申请实施例对建立远程通道的时机不做限制。服务器可以是在接收打印指令之后建立远程通道,或者,在用户选择待打印的云文件之后,且接收打印指令之前,服务器建立远程通道。或者,在另一些实施例中,在本次打印任务之前,服务器与路由器已经建立过远程通道,则无需为本次打印任务再建立远程通道。
S205、服务器通过远程通道向路由器发送打印报文。
S206、路由器向打印机发送打印报文。
其中,S206的具体实现可参见上述步骤S105,这里不再赘述。
S207、打印机执行打印任务。
该实现方式中,通过服务器与路由器交互打印报文(包括打印控制报文和待打印文件),通信路径缩短,有助于提升打印流程的效率。
S208、打印机向服务器发送响应报文,该响应报文用于指示已完成打印。
S209、服务器向手机发送响应报文,该响应报文用于指示已完成打印。
本申请实施例还提供一种打印方法,该方法中,在用户期望远程的打印机执行打印任务时,由路由器(比如位于家中)生成打印报文,以控制打印机执行远程打印任务(比如打印公司的手机中的文件)。示例性的,如图10示出了该方法的流程,该方法包括如下步骤:
S301、手机接收用户输入的打印指令。
其中,S301的具体实现可参见上述步骤S101,这里不再赘述。
S302、手机与路由器之间建立远程通道。
其中,S302的具体实现可参见上述步骤S103,这里不再赘述。
S303、手机通过远程通道向路由器发送待打印文件。
其中,S302的具体实现可参见上述步骤S104,这里不再赘述。
S304、路由器生成打印报文。
作为一种可能的实现方式,路由器接收到待打印文件之后,调用打印服务,打印服务按照打印协议(比如IPP)生成打印报文。
S305、路由器向打印机发送打印报文。
S306、打印机执行打印任务。
可见,本实施例的技术方案,打印报文仅需在路由器与打印机之间交互,无需在手机与路由器之间传输,进一步降低了传输报文所需的信令开销。
需要说明的是,上述实施例提供的界面仅是示例性的,界面还可以有其他设计方式,本申请对此不做限制。
并且,上述实施例提供的待打印文件的类型仅是示例性的,在另一些实施例中,如图5B的(c)所示界面605中还可以包括其他类型的文件,比如证件打印、网页打印等。
此外,考虑到信息安全问题,本申请实施例所涉及电子设备之间的交互数据,可以采用加密等方式进行数据传输。比如,手机向服务器上传备份数据时,上传脱敏的备份数据。
S307、打印机向路由器发送响应报文,该响应报文用于指示已完成打印任务。
S308、路由器向手机发送响应报文。
图11示出了本申请实施例的打印方法的又一流程。应用于第二电子设备,所述方法包括:
S501、第一电子设备接收打印指令。
其中,所述打印指令用于指示执行打印任务。
在一些示例中,若第一电子设备是终端等设备,则终端接收打印指令,可以是接收到用户的点击“开始打印”按钮的操作指令。
可选的,在终端接收打印指令之前,终端还可以显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或多个电子设备的卡片包括所述第二电子设备的卡片;检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
示例性的,如图5B的(a),终端可以显示界面601(第一界面的一个示例),界面601包括电视、音箱等电子设备的卡片,还包括路由器(第二电子设备)的卡片602。检测到用户针对路由器的卡片602的操作之后,终端显示图5B的(b)所示界面603(第二界面的一个示例),界面603包括路由器关联的打印功能的选项604。
可选的,在显示第二界面之后,如图5B的(b),若检测到用户对打印功能的选项604的操作,则手机可以显示图5B的(c)所示一个或多个文件的信息。一个或多个文件包括所述终端本地的文件和终端在其他设备(比如服务器)上备份的文件中的至少一种。用户可以从图5B的(c)所示的一个或多个文件中选择一个或多个目标打印文件。
所述接收打印指令,包括:接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。示例性的,如图6的(b),终端可以接收用户对开始打印按钮613的单击指令,并将该单击指令作为打印指令,该打印指令与用户选择的目标打印文件关联。
在另一些示例中,在云备份场景中,若第一电子设备为服务器,则第一电子设备接收打印指令,可以是服务器从终端接收打印指令。该打印指令是所述服务器上存储的一个或多个目标打印文件关联的操作指令。
示例性的,如图9B所示,用户可以通过终端选择云照片(一个或多个目标打印文件),并点击开始打印按钮,以触发此次打印任务。
S502、第一电子设备响应于所述打印指令,获取所述打印任务对应的打印报文。
作为一种可能的实现方式,第一电子设备响应于所述打印指令,确定所述打印报文的标识,并根据所述打印报文的标识,获取所述打印报文。
可选的,打印报文的标识可以但不限于打印报文的是服务名称。第一电子设备接收打印指令后,可以将打印数据(比如待打印的图片、文档等)封装成一个或多个的打印数据报文,将打印指令封装成一个或多个打印控制报文。可选的,打印指令携带一个或多个打印参数。
S503、第一电子设备向远程的第二电子设备发送所述打印报文。
相应的,第二电子设备从远程的第一电子设备接收打印报文。
其中,所述打印报文用于控制所述第三电子设备执行打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
S504、第二电子设备向第三电子设备发送所述打印报文。
作为一种可能的实现方式,向第三电子设备发送所述打印报文,可以实现为:直接向所述第三电子设备透传转发所述打印报文。即,第二电子设备无需存储打印报文,而是直接转发打印报文,能够降低存储资源的消耗,节约存储空间,提升打印效率。
S505、第三电子设备执行打印任务。
本申请实施例还提供一种打印方法,第一电子设备可以获知第三电子设备是否支持远程打印功能,若第三电子设备支持远程打印功能,则可以沿用相关技术执行打印任务,若第三电子设备不支持远程打印功能,则采用本申请实施例的技术方案执行打印任务。以第一电子设备是终端,第二电子设备是路由器,第三电子设备是打印机为例,若终端获知打印机支持远程打印任务,则可以将打印数据报文经由打印云发送给 打印机。若终端获知打印机不支持远程打印任务,则终端通过与路由器之间的远程通道,将打印报文发送给路由器。
上述一个或多个界面均是示例性的,还可以有其他的界面设计方式,本申请对界面的具体设计方式,界面之间的切换方式(比如可以通过在界面中上下滑动进行界面之间的切换,或者,按下特定按键实现界面切换)不做限制。比如,不限于图6、图7A、图7B、图9B给出的界面形式和操作流程。例如,在另一些实施例中,可以不使用卡片模式。再比如,可以显示第三界面、第四界面,只要能选中文件并触发打印任务即可。
在一些方案中,可以对本申请的多个实施例进行组合,并实施组合后的方案。可选的,各方法实施例的流程中的一些操作任选地被组合,并且/或者一些操作的顺序任选地被改变。并且,各流程的步骤之间的执行顺序仅是示例性的,并不构成对步骤之间执行顺序的限制,各步骤之间还可以是其他执行顺序。并非旨在表明所述执行次序是可以执行这些操作的唯一次序。本领域的普通技术人员会想到多种方式来对本文所述的操作进行重新排序。另外,应当指出的是,本文某个实施例涉及的过程细节同样以类似的方式适用于其他实施例,或者,不同实施例之间可以组合使用。
示例性的,图7C中,对于步骤S102和步骤S105之间的执行顺序不做限制。
此外,方法实施例中的某些步骤可等效替换成其他可能的步骤。或者,方法实施例中的某些步骤可以是可选的,在某些使用场景中可以删除。或者,可以在方法实施例中增加其他可能的步骤。
并且,各方法实施例之间可以单独实施,或结合起来实施。
可以理解的是,本申请实施例中的电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的技术方案的范围。
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
图12示出了本申请实施例中提供的智能设备控制装置的一种示意性框图,该装置可以为上述的第一电子设备或具有相应功能的组件。该装置1700可以以软件的形式存在,还可以为可用于设备的芯片。装置1700包括:处理单元1702和通信单元1703。可选的,通信单元1703还可以划分为发送单元(并未在图12中示出)和接收单元(并未在图12中示出)。其中,发送单元,用于支持装置1700向其他电子设备发送信息。接收单元,用于支持装置1700从其他电子设备接收信息。
可选的,装置1700还可以包括存储单元1701,用于存储装置1700的程序代码和数据,数据可以包括不限于原始数据或者中间数据等。
若装置1700为第一电子设备或相关装置,则处理单元1702可以用于支持接收设备执行诸如图11中的S502等,和/或用于本文所描述的方案的其它过程。通信单元1703用于支持该装置1700和其他电子设备(例如上述第二电子设备等)之间的通信,例如支持执行图11中的S503等。
若装置1700为第二电子设备或相关装置,则处理单元1702可以用于支持接收设备拦截响应报文等,和/或用于本文所描述的方案的其它过程。通信单元1703用于支持该装置1700和其他电子设备(例如上述第二电子设备等)之间的通信,例如支持执行图11中的S503等。
可选的,在一些实例中,通信单元,还用于接收用户的输入信息,比如,接收用户输入的打印指令(比如点击开始打印按钮)等。
可选的,装置1700还可以包括显示单元(未在图12中示出),用于显示界面和/或其他信息。
一种可能的方式中,处理单元1702可以是控制器或图5A所示的处理器501,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理(Digital Signal Processing,DSP),应用专用集成电路(Application Specific Integrated Circuit,ASIC),现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
一种可能的方式中,通信单元1703可以包括图5A所示的收发器503、还可以包括收发电路、射频器件等。
一种可能的方式中,存储单元1701可以是图5A所示的存储器502。
本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的智能设备控制方法。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gatearray,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processorunit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的智能设备控制方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的智能设备控制方法。
另外,本申请的实施例还提供一种装置,该装置具体可以是组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使装置执行上述各方法实施例中的智能设备控制方法。
其中,本申请实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。例如,以上所描述的终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多 个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序指令的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (31)

  1. 一种打印方法,其特征在于,应用于第二电子设备,所述方法包括:
    从远程的第一电子设备接收打印报文;
    向第三电子设备发送所述打印报文,其中,所述打印报文用于控制所述第三电子设备执行打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
  2. 根据权利要求1所述的方法,其特征在于,向第三电子设备发送所述打印报文,包括:
    向所述第三电子设备透传转发所述打印报文。
  3. 根据权利要求1或2所述的方法,其特征在于,在向第三电子设备发送所述打印报文之后,所述方法还包括:
    从所述第三电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成;
    向所述第一电子设备发送所述响应报文。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:建立与所述第一电子设备之间的通道;
    从所述第一电子设备接收打印报文,包括:通过所述通道从所述第一电子设备接收所述打印报文。
  5. 根据权利要求3所述的方法,其特征在于,所述方法还包括:建立与所述第一电子设备之间的通道;
    向所述第一电子设备发送所述响应报文,包括:通过所述通道向所述第一电子设备发送所述响应报文。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述打印报文包括打印控制报文和打印数据报文。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述从远程的第一电子设备接收打印报文,包括:经由第四电子设备从所述第一电子设备接收所述打印报文。
  8. 根据权利要求3所述的方法,其特征在于,向所述第一电子设备发送所述响应报文,包括:经由第四电子设备向所述第一电子设备发送所述响应报文。
  9. 根据权利要求3所述的方法,其特征在于,向所述第一电子设备发送所述响应报文,包括:
    确定所述响应报文的标识,并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。
  10. 一种打印方法,其特征在于,应用于第一电子设备,所述方法包括:
    接收打印指令,所述打印指令用于指示执行打印任务;
    响应于所述打印指令,获取所述打印任务对应的打印报文;
    向远程的第二电子设备发送所述打印报文,其中,所述打印报文用于控制第三电子设备执行所述打印任务,所述第二电子设备和所述第三电子设备属于同一局域网。
  11. 根据权利要求10所述的方法,其特征在于,在接收打印指令之前,所述方法还包括:
    显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或 多个电子设备的卡片包括所述第二电子设备的卡片;
    检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
  12. 根据权利要求11所述的方法,其特征在于,在显示第二界面之后,所述方法还包括:
    检测到用户对所述打印功能的选项的操作,显示一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
    确定用户从所述一个或多个文件中选择一个或多个目标打印文件;所述接收打印指令,包括:接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。
  13. 根据权利要求10-12中任一项所述的方法,其特征在于,所述第一电子设备为服务器;
    所述接收打印指令,包括:接收用户对所述服务器上存储的一个或多个目标打印文件关联的操作指令。
  14. 根据权利要求10-13中任一项所述的方法,其特征在于,所述方法还包括:建立与所述第二电子设备之间的通道;
    向第二电子设备发送所述打印报文,包括:通过所述通道向所述第二电子设备发送所述打印报文。
  15. 根据权利要求10-14中任一项所述的方法,其特征在于,在向第二电子设备发送所述打印报文之后,所述方法还包括:
    从所述第二电子设备接收响应报文,所述响应报文用于指示所述打印任务已完成。
  16. 根据权利要求10-15中任一项所述的方法,其特征在于,所述打印报文包括打印控制报文和打印数据报文。
  17. 根据权利要求10-16中任一项所述的方法,其特征在于,所述向远程的第二电子设备发送所述打印报文,包括:
    经由第四电子设备向远程的所述第二电子设备发送打印报文。
  18. 根据权利要求10-17中任一项所述的方法,其特征在于,所述响应于所述打印指令,获取所述打印任务对应的打印报文,包括:
    响应于所述打印指令,确定所述打印报文的标识;
    根据所述打印报文的标识,获取所述打印报文。
  19. 一种打印系统,其特征在于,包括:
    第一电子设备,用于接收打印指令,并响应于所述打印指令,获取所述打印任务对应的打印报文;还用于向远程的第二电子设备发送所述打印报文,其中,所述打印报文用于控制第三电子设备执行所述打印任务,所述第二电子设备和所述第三电子设备属于同一局域网;所述打印指令用于指示执行打印任务;
    所述第二电子设备,用于从远程的第一电子设备接收打印报文,并向第三电子设备发送所述打印报文。
  20. 根据权利要求19所述的系统,其特征在于,所述第二电子设备,用于向第三电子设备发送所述打印报文,包括:
    用于向所述第三电子设备透传转发所述打印报文。
  21. 根据权利要求19或20所述的系统,其特征在于,所述第一电子设备,还用于:
    显示第一界面;所述第一界面包括一个或多个电子设备对应的卡片,所述一个或多个电子设备的卡片包括所述第二电子设备的卡片;
    检测到用户针对所述第二电子设备的卡片的操作,显示第二界面;所述第二界面包括所述第二电子设备关联的打印功能的选项。
  22. 根据权利要求21所述的系统,其特征在于,所述第一电子设备,还用于:
    检测到用户对所述打印功能的选项的操作,显示一个或多个文件的信息;所述一个或多个文件包括所述第一电子设备本地的文件和所述第一电子设备在其他设备上备份的文件中的至少一种;
    确定用户从所述一个或多个文件中选择一个或多个目标打印文件;
    所述第一电子设备,用于接收打印指令,包括:用于接收用户对与所述一个或多个目标打印文件关联的打印控件的操作指令。
  23. 根据权利要求19-22中任一项所述的系统,其特征在于,所述第一电子设备为服务器;
    所述第一电子设备,用于接收打印指令,包括:接收用户对所述服务器上存储的一个或多个目标打印文件关联的操作指令。
  24. 根据权利要求19-23中任一项所述的系统,其特征在于,
    所述第二电子设备,还用于从所述第三电子设备接收响应报文,并向所述第一电子设备发送所述响应报文;所述响应报文用于指示所述打印任务已完成;
    所述第一电子设备,还用于从所述第二电子设备接收响应报文。
  25. 根据权利要求19-24中任一项所述的系统,其特征在于,所述第二电子设备,还用于建立与所述第一电子设备之间的通道;所述第一电子设备,还用于建立与所述第二电子设备之间的通道;
    所述第二电子设备,用于从所述第一电子设备接收打印报文,包括:用于通过所述通道从所述第一电子设备接收所述打印报文;
    所述第一电子设备,用于向第二电子设备发送所述打印报文,包括:用于通过所述通道向所述第二电子设备发送所述打印报文。
  26. 根据权利要求19-25中任一项所述的系统,其特征在于,所述打印报文包括打印控制报文和打印数据报文。
  27. 根据权利要求19-26中任一项所述的系统,其特征在于,
    所述第一电子设备,用于向远程的第二电子设备发送所述打印报文,包括:经由第四电子设备向远程的所述第二电子设备发送打印报文;
    所述第二电子设备,用于从远程的第一电子设备接收打印报文,包括:经由第四电子设备从所述第一电子设备接收所述打印报文。
  28. 根据权利要求24所述的系统,其特征在于,所述第二电子设备,用于向所述第一电子设备发送所述响应报文,包括:
    确定所述响应报文的标识,并根据所述响应报文的标识向所述第一电子设备发送所述响应报文。
  29. 根据权利要求19-28中任一项所述的系统,其特征在于,所述第一电子设备,用于响应于所述打印指令,获取所述打印任务对应的打印报文,包括:
    用于响应于所述打印指令,确定所述打印报文的标识;
    根据所述打印报文的标识,获取所述打印报文。
  30. 一种电子设备,其特征在于,包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求1-9中任意一项所述的方法,或执行如权利要求10-18中任意一项所述的方法。
  31. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1-9中任意一项所述的方法,或执行如权利要求10-18中任意一项所述的方法。
PCT/CN2023/082581 2022-03-21 2023-03-20 打印方法、电子设备及系统 WO2023179561A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210283787.1 2022-03-21
CN202210283787.1A CN116820355A (zh) 2022-03-21 2022-03-21 打印方法、电子设备及系统

Publications (1)

Publication Number Publication Date
WO2023179561A1 true WO2023179561A1 (zh) 2023-09-28

Family

ID=88099946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/082581 WO2023179561A1 (zh) 2022-03-21 2023-03-20 打印方法、电子设备及系统

Country Status (2)

Country Link
CN (1) CN116820355A (zh)
WO (1) WO2023179561A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6958824B2 (en) * 2001-01-31 2005-10-25 Hewlett-Packard Development Company, L.P. System and method for accessing and using a commercial print service
CN105005455A (zh) * 2015-06-26 2015-10-28 丁四涛 智能终端的打印控制方法及装置
CN109388357A (zh) * 2018-11-05 2019-02-26 用友网络科技股份有限公司 打印控制方法、服务器和计算机可读存储介质
CN109582256A (zh) * 2018-11-29 2019-04-05 珠海奔图电子有限公司 打印方法、装置及系统
CN114115756A (zh) * 2020-08-31 2022-03-01 华为终端有限公司 分享数据的方法、图形用户界面、相关设备及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6958824B2 (en) * 2001-01-31 2005-10-25 Hewlett-Packard Development Company, L.P. System and method for accessing and using a commercial print service
CN105005455A (zh) * 2015-06-26 2015-10-28 丁四涛 智能终端的打印控制方法及装置
CN109388357A (zh) * 2018-11-05 2019-02-26 用友网络科技股份有限公司 打印控制方法、服务器和计算机可读存储介质
CN109582256A (zh) * 2018-11-29 2019-04-05 珠海奔图电子有限公司 打印方法、装置及系统
CN114115756A (zh) * 2020-08-31 2022-03-01 华为终端有限公司 分享数据的方法、图形用户界面、相关设备及系统

Also Published As

Publication number Publication date
CN116820355A (zh) 2023-09-29

Similar Documents

Publication Publication Date Title
WO2021023220A1 (zh) 一种内容接续方法、系统及电子设备
US20230422154A1 (en) Method for using cellular communication function, and related apparatus and system
WO2021121052A1 (zh) 一种多屏协同方法、系统及电子设备
WO2020051968A1 (zh) 数据分享的方法、图形用户界面、电子设备及系统
WO2022127661A1 (zh) 应用共享方法、电子设备和存储介质
WO2022143077A1 (zh) 一种拍摄方法、系统及电子设备
EP4240034A1 (en) Communication method and system, and electronic device
WO2023284650A1 (zh) 通信方法及电子设备
CN115514882B (zh) 一种分布式拍摄方法,电子设备及介质
WO2023207761A1 (zh) 外设控制方法、电子设备及系统
CN114554000A (zh) 摄像头调用方法、系统及电子设备
CN113395364B (zh) 一种应用服务器的访问方法及终端
EP4287048A1 (en) Login authentication method and electronic device
EP4293997A1 (en) Display method, electronic device, and system
CN113472477A (zh) 无线通信系统及方法
WO2023179561A1 (zh) 打印方法、电子设备及系统
CN114928898B (zh) 建立基于WiFi直接连接的会话的方法和装置
WO2021218544A1 (zh) 一种提供无线上网的系统、方法及电子设备
CN114007202A (zh) 一种绑定关系的建立方法以及相关设备
WO2024027238A1 (zh) 一种多设备协同方法、电子设备及相关产品
WO2024001812A1 (zh) 消息管理方法、电子设备及系统
WO2023071558A9 (zh) 蜂窝通信功能的使用方法和装置
WO2022194105A1 (zh) 一种设备连接方法、终端设备和分布式系统
WO2024083133A1 (zh) 分布式数据管理方法、电子设备及系统
WO2024001813A1 (zh) 输入控制方法、电子设备及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23773808

Country of ref document: EP

Kind code of ref document: A1