A linked printing method, an electronic device, and a computer readable storage medium
By setting a web link recognition area in an instant messaging application, various web link types can be identified and processed, enabling the printing of web links other than file links. This solves the printing failure problem caused by the instant messaging application's inability to recognize other types of links, and improves the printing success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI PANTUM INTELLIGENT MFG CO LTD
- Filing Date
- 2024-12-06
- Publication Date
- 2026-06-09
Smart Images

Figure CN122173039A_ABST
Abstract
Description
[Technical Field]
[0001] This application relates to the field of printing, and more particularly to a link printing method, electronic device, and computer-readable storage medium. [Background Technology]
[0002] A web browser, often simply called a browser, is an application used to retrieve and display information resources on the World Wide Web. These resources can be web pages, images, videos, audio-visual content, or other content, and they are identified by Uniform Resource Identifiers. Hyperlinks in these resources allow users to easily browse related information. Web browsers primarily interact with web servers and retrieve web pages via the HTTP protocol. These web pages are specified by URLs, and the file format is usually HTML.
[0003] Currently, printing webpage content is becoming an increasingly common need for users. The method involves copying and pasting the webpage link into an instant messaging application that communicates with the printing device. This application then sends the webpage content to the printing device to complete the printing process. However, in this method, the instant messaging application typically only recognizes file-type webpage links. [Summary of the Invention]
[0004] This application provides a link printing method that can solve the problem that instant messaging applications can only recognize web page links of file type.
[0005] On one hand, this application provides a link printing method, comprising: displaying a printing interface in response to a first user operation command, and receiving a user operation command based on the printing interface; wherein the printing interface includes a webpage link identification area, the webpage link identification area supporting the identification of at least two webpage link types; obtaining a webpage link based on the webpage link identification area; in response to a second user operation command based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area, and displaying the webpage content corresponding to the webpage link; and in response to a third user operation command, sending the webpage link or the webpage content corresponding to the webpage link to a printing device, and instructing the printing device to print out the webpage content corresponding to the webpage link.
[0006] In one embodiment, before displaying the webpage content corresponding to the webpage link, the method further includes: displaying a webpage mode control to instruct the user to determine the printing mode of the webpage content corresponding to the webpage link; and displaying the webpage content corresponding to the webpage link when the user's operation instruction to determine the printing mode of the webpage content corresponding to the webpage link based on the webpage mode control is received.
[0007] In one embodiment, the printing interface further includes at least one link type icon, and in response to a user's triggering operation based on the at least one link type icon, displays at least one guide page corresponding to the at least one link type icon, the at least one guide page instructing the user to obtain at least one operation of the webpage link corresponding to the at least one link type icon.
[0008] In one embodiment, displaying the web content corresponding to the webpage link includes: displaying a preview page of the webpage content corresponding to the webpage link, the preview page including at least one webpage content setting option and a webpage content preview area, the webpage content preview area displaying the webpage content, and the display of the webpage content being adapted to the settings of the at least one webpage content setting option; when a setting instruction is obtained based on the at least one webpage content setting option, changing the display of the webpage content in the webpage content area.
[0009] In one implementation, the preview page of the web page content also includes the printer model. When a trigger command based on the printer model is received from the user, a list of printer models is displayed. When the user selects one of the printer models from the list, the printer is switched to the printer corresponding to the selected printer model.
[0010] In one implementation, when the webpage link type is a file link, the webpage mode control includes: displaying the webpage mode control when the size of the webpage content corresponding to the file link exceeds a threshold.
[0011] In one implementation, the step of responding to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area, and displaying the webpage content corresponding to the webpage link includes: responding to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area; when the identification result of the webpage link type is not a file link, displaying the webpage content corresponding to the webpage link, and not displaying a webpage content retrieval failure control.
[0012] In one implementation, the webpage link identification area supports the identification of at least two webpage link types, including: the webpage link identification area identifies at least two webpage link types based on the webpage link identifier.
[0013] In one implementation, the step of obtaining the identification result of the webpage link type in the webpage link identification area in response to the user's second operation instruction based on the printing interface includes: in response to the user's second operation instruction based on the printing interface, verifying the webpage link; when the webpage link verification is successful, requesting the cloud service to provide feedback on the identification result of the webpage link type; when the cloud service identifies the webpage link type in the webpage link identification area as a non-file link, rendering the webpage content corresponding to the webpage link, converting the rendered webpage content into a predetermined format, and obtaining webpage content in the predetermined format.
[0014] On the other hand, embodiments of this application also provide an electronic device, including: a processor; a memory; the memory storing a computer program, which, when executed, causes the electronic device to perform the link printing method as described above.
[0015] In another aspect, embodiments of this application also provide a computer-readable storage medium, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the link printing method as described above.
[0016] The embodiments of this application can identify at least two types of web page links through the web page recognition area, especially web page links other than file links. This can improve the success rate of printing multiple types of web page links and solve the problem that instant messaging clients can only recognize file links, which means that the content of the web page cannot be successfully printed when the web page link entered by the instant messaging client is not a file link. [Attached Image Description]
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of a link printing method provided in an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of another link printing method provided in an embodiment of this application;
[0020] Figure 3 A schematic diagram of a printing interface provided for an embodiment of this application;
[0021] Figure 4 A preview page diagram provided for an embodiment of this application;
[0022] Figure 5 This is a schematic flowchart of another link printing method provided in an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
Detailed Implementation Methods
[0024] To better understand the technical solution of this application, the embodiments of this application will be described more comprehensively below in conjunction with the relevant accompanying drawings.
[0025] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0026] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0027] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0028] In this application embodiment, the printing device is a device having at least one image-forming related function, which may include, but is not limited to, printing, scanning, copying, and faxing functions. For example: a single-function printer: an image-forming device with only printing functionality. A multifunction printer: an image-forming device with printing, copying, scanning, and / or faxing functions, and the ability to selectively set the number of paper trays. A digital multifunction printer: based on copying functionality, with standard or optional printing, scanning, and faxing functions, using digital principles and laser printing for document output, allowing for image and text editing as needed, possessing a large-capacity paper tray, high memory, large hard drive, strong network support, and multi-tasking parallel processing capabilities.
[0029] In this embodiment, the instant messaging client is a terminal device such as a mobile phone, PC, or laptop. The instant messaging application is represented by an APP, and it is assumed that the instant messaging application runs within the instant messaging client.
[0030] Cloud services, cloud environments, or independent physical hosts in the cloud can also be server clusters, and at least one instant messaging server program corresponding to the instant messaging client can be running on the server.
[0031] Currently, among the solutions for printing links in instant messaging applications, instant messaging applications can only recognize file links. Other types of web page links may fail to be recognized, resulting in the inability to print web page content correctly.
[0032] In one application scenario, a user needs to print an electronic invoice during the expense reimbursement process. The user first applies for an invoice, and after the application is successful, they receive an invoice link. However, this invoice link is a webpage link, and it is not a file link. Therefore, the instant messaging application cannot accurately recognize the invoice link, preventing the user from using the link to obtain the invoice content and print it out.
[0033] Please refer to Figure 1 This application provides a schematic flowchart of a link printing method, which includes:
[0034] S10, in response to the user's first operation command, displays the printing interface and receives the user's operation command based on the printing interface.
[0035] In one implementation, the first operation instruction instructs the printing interface to start, for example, by triggering an instant messaging application or triggering a link printing function within the instant messaging application.
[0036] The printing interface includes a webpage link recognition area, which supports the recognition of at least two types of webpage links; webpage links can be obtained based on this webpage link recognition area, especially at least two types of webpage links.
[0037] The types of web page links include, but are not limited to, at least two of the following: file links, file download links, and compressed file links. File links are web page links whose content can be directly downloaded or converted to a predetermined format, such as PDF (Portable Document Format). File download links are links whose content cannot be directly converted to a predetermined format or requires pre-processing, such as rendering or format conversion. Compressed file links are links generated from compressed files that can be directly converted to a predetermined format, such as converting files in a compressed archive to PDF. Furthermore, file links allow direct access to the corresponding file and its content, while file download links require conversion and downloading the file to access the file and its content. In one implementation, file download links include ordinary web page links. Ordinary web pages are resources on the internet, typically written in languages such as HTML, CSS, and JavaScript, used to provide users with information and interactive functions. They can contain elements such as text, images, videos, and audio, as well as hyperlinks to other web pages or resources. When a user clicks a file download link, the server needs to perform a certain amount of processing before returning the corresponding webpage content to the user. File links include portals for obtaining and downloading digital content via the internet. Through file links, users can easily view the corresponding content with just one click.
[0038] Specifically, the webpage link recognition area supports recognizing at least two types of webpage links, or, when a user inputs a webpage link type other than a file link, the webpage link recognition area can retrieve the webpage content corresponding to that link type. In other words, "supporting recognition of at least two webpage link types" can mean that the webpage link recognition area can perform recognition operations for at least two webpage link types, or it can mean that the webpage link recognition area can retrieve the webpage content corresponding to at least two webpage link types.
[0039] S11, in response to the user's second operation command based on the printed interface, obtain the recognition result of the webpage link type in the webpage link recognition area, and display the webpage content corresponding to the webpage link.
[0040] In one implementation, the second operation instruction indicates a trigger instruction for the webpage link identification area, such as an input instruction for entering a webpage link, or a retrieval instruction for obtaining the webpage content corresponding to the webpage link after entering a webpage link.
[0041] S12, in response to a third user operation command, sends a webpage link or the webpage content corresponding to the webpage link to the printing device, instructing the printing device to print out the webpage content corresponding to the webpage link.
[0042] In one implementation, the third operation instruction indicates a webpage content sending instruction or a webpage content printing instruction, primarily used to instruct the webpage link or the webpage content corresponding to the link to be sent to the printing device for printing. Specifically, in response to the user's third operation instruction, the instant messaging application can send the webpage content to the printing device, instructing the printing device to print the webpage content. Alternatively, in response to the user's third operation instruction, the instant messaging application can send a webpage link to the printing device, and the printing device can retrieve the webpage content based on the link and perform printing.
[0043] In one implementation, before displaying the webpage content corresponding to the webpage link, the method further includes: displaying a webpage mode control, which instructs the user to determine the printing mode of the webpage content corresponding to the webpage link. Webpage modes include original mode, text mode, image mode, video mode, audio mode, and multimedia mode. Original mode includes all content in the webpage content, including images and text; text mode only includes text content; video mode only includes video content; audio mode only includes audio content; and multimedia mode only includes multimedia content. When the user selects any mode based on the webpage mode control, the system receives an operation instruction from the user to determine the printing mode of the webpage content corresponding to the webpage link based on the webpage mode control, and then displays the webpage content corresponding to the webpage link.
[0044] In one implementation, when the webpage link type is a file link, displaying the webpage mode control includes: displaying the webpage mode control when the size of the webpage content corresponding to the file link exceeds a threshold.
[0045] In one implementation, the printing interface further includes at least one link type icon. In response to a user's triggering operation based on the at least one link type icon, at least one guide page corresponding to the at least one link type icon is displayed. The at least one guide page instructs the user to perform at least one operation to obtain a webpage link corresponding to the at least one link type icon.
[0046] Please refer to Figure 3This application provides a schematic diagram of a printing interface. The diagram includes a webpage link identification area, print / preview options, and icons for supported link types. When a user triggers any of these icons, a guide page is displayed, instructing the user on at least one operation to obtain a webpage link. For example, when icon 1 indicates the WeChat application, triggering icon 1 displays a guide page instructing the user on how to obtain a webpage link within the WeChat application. There can be one or multiple guide pages. In a single guide page scenario, the user can view all the steps to obtain a webpage link in WeChat on a single page. In a scenario with multiple guide pages, the user can switch between pages by swiping to view all the steps to obtain a webpage link in WeChat. Alternatively, in another implementation, when the user triggers icon 1, they are taken to the webpage interface within WeChat to obtain the corresponding webpage link.
[0047] In one implementation, displaying the web content corresponding to a webpage link includes: displaying a preview page of the webpage content corresponding to the webpage link, as shown in the reference. Figure 4 This application provides a preview page illustration. The preview page includes at least one webpage content setting option and a webpage content preview area. The webpage content preview area displays webpage content, and the display of the webpage content is adapted to the settings of at least one webpage content setting option. When a setting instruction is obtained based on at least one webpage content setting option, the display of the webpage content in the webpage content area is changed.
[0048] In one implementation, the preview page of the web page content also includes the printer model. When a user triggers a command based on the printer model, a list of printer models is displayed. When the user selects a printer model from the list, the printer is switched to the printer model corresponding to the selected printer model.
[0049] In one implementation, responding to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area and displaying the webpage content corresponding to the webpage link includes: responding to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area; when the identification result of the webpage link type is not a file link, displaying the webpage content corresponding to the webpage link and not displaying a webpage content acquisition failure control.
[0050] In one implementation, the webpage link identification area supports the identification of at least two webpage link types, including: the webpage link identification area identifies at least two webpage link types based on the webpage link identifier.
[0051] In one implementation, in response to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area further includes: in response to the second operation command from the user based on the printing interface, verifying the webpage link; when the webpage link verification is successful, requesting the cloud service to return the identification result of the webpage link type; when the cloud service identifies the webpage link type in the webpage link identification area as a non-file link, rendering the webpage content corresponding to the webpage link, converting the rendered webpage content into a predetermined format, and obtaining webpage content in the predetermined format.
[0052] Please refer to Figure 2 This provides a flowchart of another link printing method, which includes the following steps.
[0053] S200: Launch the instant messaging application, complete account login, and establish a communication connection between the instant messaging application and the server.
[0054] S201, displaying the printing interface.
[0055] The instant messaging application receives a user's command to initiate a printing interface and displays the printing interface. Please refer to [reference needed]. Figure 3 This printing interface can receive user operation commands, allowing users to perform operations based on the interface to print web links. The printing interface includes a web link recognition area that supports the recognition of at least two types of web links. Specifically, this web link recognition area is used to obtain web links.
[0056] S202, Obtain the webpage link and verify the webpage link.
[0057] Instant messaging applications acquire web links input by users based on web link recognition areas, or receive web links shared by users from other instant messaging applications. In one implementation, the user copies a web link from another instant messaging application. Upon launching the printing interface, the copied web link is automatically input into the web link recognition area, allowing the recognition area to retrieve the corresponding web link. In another implementation, the user copies a web link from another instant messaging application. Upon launching the printing interface, a pop-up message prompts the user that a copied web link exists, asking for confirmation before pasting it. When the user confirms pasting, the copied web link is input into the web link recognition area, allowing the recognition area to retrieve the corresponding web link. Yet another implementation allows the user to manually input a web link based on the web link recognition area, allowing the recognition area to retrieve the web link. After retrieving the web link from the recognition area, the instant messaging application verifies the validity of the web link. If the verification result is valid, step S203 is executed; if the verification result is invalid, a message box indicating invalidity is displayed, prompting the user to check the correctness of the link address.
[0058] S203, Request the content of the webpage corresponding to the webpage link.
[0059] The instant messaging application sends a request to the server, which includes a webpage link. The server could be a printing equipment manufacturer's server, encompassing content services, print services, cloud conversion services, etc. Specifically, the instant messaging application sends a request to the content service within the server.
[0060] S204 identifies the type of webpage link.
[0061] The server identifies the type of webpage link obtained based on the request from the instant messaging application. Specifically, the content service identifies the webpage link type based on the identifier of the webpage link obtained from the instant messaging application. In one implementation, the content service identifies whether the webpage link identifier is HTML; if not, it is identified as a file link type; otherwise, it is identified as a file download link type. In another implementation, if the content service identifies the webpage link identifier as HTML, it identifies the webpage link as a file download link type; if the content service identifies the webpage link identifier as "pdf, doc, docx, ppt, pptx, xls, xlsx, txt, png, jpg, jpeg, bmp, excel", it identifies the webpage link as a file link type; and if the content service identifies the webpage link identifier as "zip, rar, 7z", it identifies the webpage link as a compressed file link type.
[0062] When the content service identifies a webpage link as a file download link, step S204 further includes: S2041, the content service obtains the file based on the file download link; S2042, the browser plugin is invoked to render the webpage content corresponding to the webpage link; S2043, the rendered webpage content is converted into a file in a predetermined format, such as converting the rendered webpage content into a PDF file; S2044, the converted file in the predetermined format is uploaded to another server; and S2045, the storage address returned by the other server after storing the file in the predetermined format is received.
[0063] When the content service identifies the webpage link as a compressed file link type, S204 further includes: S20411, the content service or the content service calls a decompression plugin to decompress the compressed file and obtain the decompressed file; S20412, converting the decompressed file into a file of a predetermined format; S20413, uploading the file of the predetermined format to another server; S20414, receiving the storage address returned by the other server after storing the file of the predetermined format. Alternatively, S204 further includes: S20416, the content service transmits the compressed file link to another server; S20417, receiving the storage address corresponding to the compressed file obtained by the other server based on the compressed file link, after decompressing the compressed file, converting its format, and storing it.
[0064] S205, Returns webpage link information.
[0065] The content service returns webpage link information to the instant messaging application. This webpage link information includes the webpage link type, the file name, file size, and file type of the corresponding webpage content. When S204 identifies a file link, the file link name, the corresponding file name, file size, and file type are returned to the instant messaging application. When S204 identifies a file download link, the file download link name, the file name, file size, file type, and the file link address where the file is stored on another server are returned to the instant messaging application. When S204 identifies a compressed file link, the compressed file link name, the file name, file size, file type, and the file link address where the file is stored on another server are returned to the instant messaging application. Specifically, when the content service identifies a webpage link as a file download link, S205 further includes: returning the storage address (i.e., the file link address) of a predefined format file on another server to the instant messaging application, and returning the file name, file size, and file type corresponding to the storage address to the instant messaging application. When the content service identifies a webpage link as a compressed file link type, step S205 further includes: returning the storage address (i.e., the file link address) of the file corresponding to the compressed file link from another server to the instant messaging application, and returning the file name, file size, and file type corresponding to the storage address to the instant messaging application. The other servers can be the instant messaging application server or an Alibaba Cloud server. This applies even if the instant messaging application is application software or an application embedded within application software. It should be noted that when the content service identifies a webpage link as a file download link type or a compressed file link type, it will not display a control indicating that the webpage content retrieval failed; subsequent printing operations can still be performed.
[0066] S206, determine whether printing is supported.
[0067] The instant messaging application, based on the webpage link information received in S205, determines whether printing the content of the webpage corresponding to the link is supported. Specifically, the instant messaging application determines whether printing is supported based on the file type, file size, etc., in the webpage link information. If the file type is a predefined format or does not exceed a predefined size, printing is supported; otherwise, printing is not supported. Predefined file formats include, for example, pdf, doc, docx, ppt, pptx, xls, xlsx, txt, png, jpg, jpeg, bmp, and excel. Predefined sizes include, for example, 30MB. This is only an example and does not represent a limitation on format and size. When printing is supported, S207 is executed. When printing is not supported, the user is prompted that printing is not supported and the reason for this is not supported. For example, a pop-up message may appear stating, "File retrieval failed. Please check the validity of the link address and whether the file format is within the supported range. Supported file types are pdf, doc, docx, ppt, pptx, xls, xlsx, txt, png, jpg, jpeg, and bmp." Alternatively, a pop-up message may appear stating "File parsing failed; file size exceeds 30MB limit."
[0068] S207, pass in the webpage link address.
[0069] Instant messaging applications pass the web link address entered by the user in the web link recognition area to the content service.
[0070] S208, returns the file stream.
[0071] The content service retrieves the file corresponding to the webpage link address received in S207, and returns the file to the instant messaging application in the form of a file stream. The file stream includes the data stream of the webpage content corresponding to the webpage link.
[0072] S209, save the file to the instant messaging client.
[0073] Instant messaging applications obtain complete file data based on the received file stream and save the file data to the instant messaging client.
[0074] S210, return the storage address.
[0075] The instant messaging client stores file data and returns the storage address of the file data to the instant messaging application.
[0076] S211, upload storage address.
[0077] Instant messaging applications upload the storage address of files in the instant messaging client to the content service.
[0078] In addition, to avoid excessive files causing memory pressure on the instant messaging client, after the instant messaging application uploads the storage address of the files in the instant messaging client to the content service, the instant messaging application notifies the instant messaging client to release the file storage space. This allows the instant messaging client to release file storage space in a timely manner, reducing memory pressure and ensuring the operating efficiency of the instant messaging client.
[0079] S212, returns the file link address.
[0080] The content service retrieves the file based on the storage address obtained from the instant messaging client, stores the file, and then returns the corresponding storage address to the instant messaging application. This storage address is the URL where the file is stored on the server.
[0081] S213, Create a print job.
[0082] In one implementation, after the instant messaging application receives the returned file link address, it displays a preview page of the webpage content corresponding to the file link address, see reference [link to relevant documentation]. Figure 4 The preview page includes at least one settings option and a preview area. Print settings options include number of copies, single / double-sided printing, range, page mode, black and white, color, and more. The more settings options include further options such as print density. The preview area displays the document content. When the user sets settings based on at least one of the above options, the displayed document content in the preview area corresponds to the settings corresponding to at least one option. For example, for a 10-page document, if the user sets the number of copies to 1, the single / double-sided printing to single-sided, and the page mode to the second option (2-in-1), then the preview area will display the content of two pages of the document merged into one page, presented as single-sided, for a total of 5 pages. The preview page also includes the model and status of the printer currently connected to the instant messaging application. Users can determine whether to switch printers based on the printer status, or determine whether the currently connected device is the desired printer based on the printer model. If it is not the desired printer, users can determine whether to switch printers. When a user triggers a printer model, a list of printer model numbers is displayed. This list shows connectable printers, including previously connected printers, printers on the same local area network (LAN), and printers that can be connected remotely. The printer model number uniquely identifies the printer. The printer model number can also be the printer name, printer IP address, printer identifier, etc., as long as it uniquely identifies the printer; there are no specific limitations here.
[0083] It should be noted that in one implementation, after receiving the returned file link address, the instant messaging application displays a preview page of the webpage content corresponding to the file link address. When the user makes settings based on at least one setting option in the preview page, the corresponding settings are uploaded to the content service. The content service adjusts the file content accordingly based on the acquired at least one setting option and sends the adjusted content to the instant messaging application. The instant messaging application then displays the file content adapted to at least one setting option based on the preview page. In another implementation, the instant messaging application receives the virtual file data corresponding to the returned file link address simultaneously. When it receives a setting instruction from the user based on at least one setting option in the preview page, it adjusts the virtual file data to the corresponding format based on the settings of at least one setting option and displays the file content adapted to at least one setting option in the preview area of the preview page.
[0084] After receiving the storage address, the instant messaging application creates a print job and sends it to the print service. Alternatively, a print job is created when a user sets at least one configuration option based on a preview page and triggers a print command. The print job includes the file content and at least one configuration option.
[0085] S214, Send file conversion message.
[0086] After receiving a print job, the print service sends a file conversion message to the conversion service. This file conversion message includes the file data and the conversion request.
[0087] S215, Perform file format conversion.
[0088] The conversion service performs file format conversion, transforming files into file formats supported by the printing device.
[0089] S216, Send the file conversion result.
[0090] The conversion service sends files in formats supported by the printing device to the print service.
[0091] S217, Send a print message.
[0092] The print service sends a print message to the printing device, which includes file data and print settings corresponding to at least one setting option.
[0093] S218, execute printing.
[0094] The printing device performs a printing operation on the file data based on at least one printing setting.
[0095] S219, returns the status of the print job completion.
[0096] The printing device returns the print job completion status to the print service.
[0097] S220, issue a command to query the status of the print job.
[0098] Users issue print job status query commands via instant messaging applications. In one implementation, the user refreshes the printing interface and issues the print job status query command via the instant messaging application. In another implementation, the user triggers the printing device status via the instant messaging application and issues the print job status query command.
[0099] S221, query the status of the print job.
[0100] Instant messaging applications send print job status query commands to the print service to request a query on the print job status.
[0101] S222, return to print task status.
[0102] The print service returns print job status to instant messaging applications.
[0103] In one implementation, steps S220-S222 can be replaced by the print service returning the print job completion status to the print service in step S219, and then the print service feeding back the received print job completion status to the instant messaging application. In another implementation, the print job status query command issued in step S220 can also set up a status query mechanism for the instant messaging application. This mechanism includes polling the print job status at predetermined intervals after the print job is created and scheduled. This allows for timely and automatic updates to the print job status, reducing user operations.
[0104] In one implementation, step S204, identifying the webpage link type, can also be performed by an instant messaging application. After the instant messaging application executes S202 and confirms the webpage link is valid, it executes S204, whereby the instant messaging application begins identifying the webpage link type. Similarly, the webpage link type is identified based on the webpage link identifier. After identifying and determining the webpage link type, the webpage link information is obtained, and execution continues with S206.
[0105] In one implementation, after the content service in S204 identifies and determines the type of the webpage link, the content service in S205 returns the webpage link information to the instant messaging application, along with a prompt for mode selection. When the instant messaging application receives the webpage link information and the mode selection prompt, a pop-up window displays a webpage mode control, prompting the user to select a webpage mode as the printing mode for the webpage content corresponding to the webpage link. Webpage modes include original mode, text mode, image mode, video mode, audio mode, and multimedia mode. In original mode, the webpage content corresponding to the webpage link is maintained without modification. In text mode, the text content of the webpage content corresponding to the webpage link is retained, while other content is deleted. In image mode, the image content of the webpage content corresponding to the webpage link is retained, while other content is deleted. In video, audio, and multimedia mode, the video, audio, and multimedia content of the webpage content corresponding to the webpage link is retained, while other content is deleted, such as retaining only the images corresponding to the video, audio, and multimedia content. After receiving the user's operation instruction based on the printing mode determined by the webpage mode control, the final webpage content displayed on the preview page corresponds to the webpage mode. For example, when a user selects text mode using the webpage mode control, the content service processes the webpage content, retaining the text content, deleting all other content, and maintaining the original formatting of the webpage content. Alternatively, when a user selects text mode using the webpage mode control, the instant messaging application processes the webpage content, retaining the text content, deleting all other content, and maintaining the original formatting of the webpage content.
[0106] In one implementation, when the content service determines that a webpage link is a file download link, it returns a mode selection prompt along with the webpage link information. When the content service determines that the webpage link is a file link, it returns the webpage link information but does not return the mode selection prompt.
[0107] In one implementation, when the content service determines that the file size corresponding to a webpage link exceeds a predetermined size, such as 30MB, it returns a prompt message indicating the mode selection along with the webpage link information. Different webpage modes correspond to different webpage content, and other webpage modes besides the original mode only include a portion of the webpage content. When the user selects another webpage mode, it can reduce the processing pressure on the webpage content of the instant messaging application; moreover, it can continue printing through other webpage modes even when the remaining toner in the printing device is insufficient to print the webpage content of the original mode.
[0108] In one implementation, when the content service determines that the file size corresponding to the webpage link exceeds a predetermined size, such as 30MB, but the file size does not exceed 30MB if only text is retained, a mode selection prompt is returned along with the webpage link information. In order to reduce user operations and improve link printing efficiency, after returning the mode selection prompt, the webpage mode control displayed in the instant messaging application pop-up is set to text mode by default.
[0109] Furthermore, since webpage links are the address of other servers, the webpage content, such as files, corresponding to those links are stored on those servers. Different servers have different validity periods for their corresponding files; that is, different webpage links have different expiration times. Therefore, to avoid webpage links or files becoming invalid, the link printing method provided in this application sends the webpage link to a printing device server. The printing device server retrieves the corresponding file based on the link address and returns the file as a file stream to the instant messaging application for caching locally. When the printing device server sends the file to the instant messaging application, it prompts the user to set the file's validity period. Specifically, when the instant messaging application receives the file from the printing device server, a pop-up prompts the user to set a validity period for the file. The user can set a reasonable validity period based on their actual needs, such as 3 days or one week. This avoids the instant messaging application or printing device failing to retrieve the file corresponding to the webpage link due to invalid webpage links or files, thus improving the effectiveness of link printing. Moreover, allowing users to set their own file validity period better meets user needs and ensures file security.
[0110] The link printing method described above, as provided in this application, can identify different types of web links by recognizing web link identifiers and perform different processing on different types of web links, thus enabling the printing of web links of types other than file links. This solves the problem that current instant messaging applications can only recognize file links and cannot recognize other types of web links, leading to printing failures.
[0111] Please refer to Figure 5 This application provides a schematic flowchart of another link printing method, which includes the following steps.
[0112] S501, enter the link printing interface.
[0113] Users launch the instant messaging application and enter the link printing function interface.
[0114] S502, determine if there is an operation command.
[0115] The instant messaging application receives user operation instructions based on a printed interface. In one implementation, the instant messaging application determines whether there is a web link copy operation instruction. If there is, it executes S503; otherwise, it executes S504.
[0116] S503 prompts whether to enter a link.
[0117] When a webpage link copy command is available, a pop-up window prompts the user whether they want to paste the webpage link. Alternatively, the user is prompted to enter the webpage link in the webpage link recognition area. When the user confirms that they need to paste the webpage link or enter the webpage link, S504 is executed.
[0118] S504, Get Webpage Link.
[0119] When a user confirms that a web link needs to be pasted, the web link recognition area retrieves the web link corresponding to the copy operation command. Alternatively, when a user confirms that a web link needs to be entered based on prompts, the user enters the web link in the web link recognition area, and the instant messaging application retrieves the corresponding entered web link.
[0120] S505, determine the validity of the link.
[0121] The instant messaging application determines whether a webpage link obtained based on the webpage link identification area is valid. If the webpage link is determined to be valid, step S506 is executed; otherwise, step S507 is executed.
[0122] S506 receives user operations.
[0123] The instant messaging application receives user operations. Specifically, when a user enters a webpage link based on the webpage link identification area, and the user needs to determine whether to print the webpage content corresponding to the webpage link, a webpage content preview operation is performed. The instant messaging application receives the preview operation performed by the user and executes the process described above in steps S203-S205.
[0124] S507 indicates an invalid error.
[0125] The instant messaging application displayed a pop-up message indicating that the current webpage link was invalid.
[0126] S508, Determine the link type.
[0127] Similarly, the server can determine the type of a webpage link and return the result to the instant messaging application; alternatively, the instant messaging application can determine the type of a webpage link and obtain the result. Webpage link types include file links, file download links, and compressed file links. When the link is determined to be a file link or a compressed file link, execute step S510; when it is determined to be a file download link, execute step S509.
[0128] S509, Determine the validity of the link.
[0129] Even if the communication application or the server determines whether a webpage link is valid, if the webpage link is determined to be valid, execute S511; otherwise, execute S515.
[0130] S510, determine the validity of the link.
[0131] Even if the communication application or the server determines whether a webpage link is valid, if the webpage link is determined to be valid, execute S512; otherwise, execute S515.
[0132] S511, mode selection.
[0133] When the file download link is confirmed to be valid, the user is prompted to select a mode. For example, a webpage mode selection control can be displayed, specifically prompting the user to select a mode from options such as original mode, text mode, and image mode via a pop-up window, and accepting the user's selection operation based on any mode triggered by the control.
[0134] In one implementation, when the webpage link type is a compressed file link, and the compressed file link includes multiple files, a file selection step S516 (not shown) is also included between S510 and S512. Specifically, the instant messaging application displays a file selection control that includes multiple file names from the compressed file. This control prompts the user to select at least one file from the multiple file names as the target print file.
[0135] S512, determine whether the file size exceeds the predetermined size.
[0136] The instant messaging application determines whether the file size corresponding to the webpage link exceeds a predetermined size, or the server determines whether the file size corresponding to the webpage link exceeds a predetermined size, and sends the result back to the instant messaging application. If the file size exceeds the predetermined size, execute S513; otherwise, execute S514.
[0137] S513, indicating that the file size has been exceeded.
[0138] Instant messaging applications may display a pop-up message indicating that a file linked to a webpage has exceeded its specified size.
[0139] S514, displaying the preview page.
[0140] Even when the communication application displays a preview page, the preview page includes part or all of the content of the webpage linked to it. When the webpage link is a file download link, if the user selects a non-original mode, the preview page includes part of the content of the webpage linked to it; if the user selects the original mode, the preview page includes all of the content of the webpage linked to it. When the webpage link is a file link, the preview page includes all of the content of the webpage linked to it.
[0141] S515, indicating an invalid link.
[0142] Even if a communication application pops up a message indicating that the current webpage link is invalid.
[0143] It should be noted that in one implementation, when the webpage link is determined to be a file link, step S511 is executed to prompt the user to select a mode. Alternatively, in another implementation, after executing steps S509-S510, it is determined whether the file size corresponding to the current webpage link exceeds a threshold. If it does, step S511 is executed, displaying the webpage mode control and prompting the user to select a mode. Since different modes correspond to different file sizes, prompting the user to select a mode when the file size exceeds the threshold allows the user to choose another mode with a relatively smaller file size. This provides the user with an opportunity to continue printing, ensuring the validity of the link printing more effectively than simply indicating failure when the file size exceeds the threshold. For example, if the file size corresponding to the webpage link is 32MB and the threshold is 30MB, although the file size exceeds the threshold, if text mode is used for that file, the file size in text mode becomes 29MB. Thus, the file size in text mode does not exceed the threshold, and subsequent printing operations can continue. The file sizes in the different modes mentioned above can be obtained by the instant messaging application adjusting the file size according to the file content adaptation mode, or by the server adjusting the file size according to the file content adaptation mode. Alternatively, in another implementation, after executing S509-S510, it is determined whether the file size corresponding to the current webpage link exceeds a threshold. If the file size does not exceed the threshold, S511 is executed, displaying the webpage mode control and prompting the user to select a mode. In this implementation, if the file size corresponding to the webpage link exceeds the threshold, subsequent printing operations are not supported. In this way, the instant messaging application or server does not need to adjust to different modes to obtain different file sizes, reducing the memory usage of the instant messaging application or server and ensuring the operating efficiency of the instant messaging application or server.
[0144] Additionally, embodiments of this application also provide an electronic device, see reference. Figure 6This application provides a schematic diagram of the structure of an electronic device 600, which includes a processor 610, a memory 611, and a computer program stored in the memory 611 and executable on the processor 610. When the processor 610 executes the program, it implements the steps in the aforementioned method embodiments.
[0145] In addition, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when the program is running, controls the device where the computer-readable storage medium is located to execute the link printing method described above.
[0146] In the description of this application, unless otherwise expressly specified and limited, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; unless otherwise specified or explained, the term "multiple" refers to two or more, and the term "various types" refers to two or more; the terms "connection," "fixed," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, an integral connection, or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0147] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this specification includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which the embodiments of this specification pertain.
[0148] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0149] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0150] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A link printing method, characterized in that, include: In response to a user's first operation command, a printing interface is displayed, and the user's operation command is received based on the printing interface; wherein, the printing interface includes a webpage link identification area, which supports the identification of at least two types of webpage links; and the webpage link is obtained based on the webpage link identification area. In response to a second operation command from the user based on the printing interface, the recognition result of the webpage link type in the webpage link recognition area is obtained, and the webpage content corresponding to the webpage link is displayed. In response to a third user operation command, the webpage link or the webpage content corresponding to the webpage link is sent to the printing device, instructing the printing device to print out the webpage content corresponding to the webpage link.
2. The method according to claim 1, characterized in that, Before displaying the webpage content corresponding to the webpage link, the method further includes: Display a webpage mode control to instruct the user to determine the printing mode of the webpage content corresponding to the webpage link; When a user's instruction to determine the printing mode of the webpage content corresponding to the webpage link based on the webpage mode control is received, the webpage content corresponding to the webpage link is displayed.
3. The method according to claim 1, characterized in that, The printing interface also includes at least one type of link icon. In response to a user's triggering operation based on the at least one type of link icon, at least one guide page corresponding to the at least one type of link icon is displayed. The at least one guide page instructs the user to perform at least one operation to obtain the webpage link corresponding to the at least one type of link icon.
4. The method according to claim 1, characterized in that, The display of the web content corresponding to the webpage link includes: A preview page is provided that displays the webpage content corresponding to a webpage link. The preview page includes at least one webpage content setting option and a webpage content preview area. The webpage content preview area displays the webpage content, and the display of the webpage content is adapted to the settings of the at least one webpage content setting option. When a setting instruction is obtained based on at least one webpage content setting option, the display of webpage content in the webpage content area is changed.
5. The method according to claim 4, characterized in that, The preview page of the webpage content also includes the printing device model. When a user triggers a command based on the printing device model, a list of printing device models is displayed. When the user selects one of the printing device models from the list, the printing device is switched to the printing device corresponding to the selected model.
6. The method according to claim 2, characterized in that, When the webpage link type is a file link, the webpage display mode control includes: When the size of the webpage content corresponding to the file link exceeds the threshold, the webpage mode control is displayed.
7. The method according to claim 1, characterized in that, The step of responding to a second operation command from the user based on the printing interface, obtaining the identification result of the webpage link type in the webpage link identification area, and displaying the webpage content corresponding to the webpage link includes: In response to a second operation command from the user based on the printing interface, the identification result of the webpage link type in the webpage link identification area is obtained; When the identification result of the webpage link type is not a file link, the webpage content corresponding to the webpage link is displayed, and the webpage content retrieval failure control is not displayed.
8. The method according to claim 1, characterized in that, The webpage link identification area supports the identification of at least two types of webpage links, including: The webpage link identification area identifies at least two types of webpage links based on the webpage link identifier.
9. The method according to claim 1, characterized in that, The step of obtaining the identification result of the webpage link type in the webpage link identification area in response to the user's second operation command based on the printing interface includes: In response to the user's second operation command based on the printing interface, the webpage link is verified. When the webpage link is successfully verified, the cloud service is requested to provide feedback on the identification result of the webpage link type. When the cloud service identifies the webpage link type in the webpage link identification area as a non-file link, it renders the webpage content corresponding to the webpage link, converts the rendered webpage content into a predetermined format, and obtains webpage content in the predetermined format.
10. An electronic device, characterized in that, include: processor; Memory; The memory stores a computer program that, when executed, causes the electronic device to perform the method described in any one of claims 1-9.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1-9.