File printing method and device, electronic equipment and storage medium

By performing data compression on the file on the server side and sending it directly to the printing device, the problem of encrypted files that cannot be forwarded for printing is solved, and the security and efficiency of file printing are improved.

CN118550484APending Publication Date: 2024-08-27STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410214569.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Some files are encrypted and cannot be forwarded and printed through the application, leading to the risk of file leakage and affecting security.

Method used

Receive the file on the server side, compress the file through the trained data compression model, generate the target compression value, reduce the file size, reduce network bandwidth requirements, and directly send the compressed file to the printing device to avoid file forwarding. Improve security.

Benefits of technology

It improves the security of document printing, reduces the risk of document leakage, and improves printing speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550484A
    Figure CN118550484A
Patent Text Reader

Abstract

The invention provides a file printing method and device, electronic equipment and a storage medium, and the method comprises the steps: receiving an initial target file and target printing equipment sent by a terminal, and enabling a server to be connected with at least one piece of printing equipment; the initial target file is input into a data compression model, a target compression value is obtained through processing of the data compression model, and the data compression model is obtained by training an initial model and is a model with the size equal to that of a compressed file; performing compression processing on the initial target file according to the target compression value to obtain a target file; and sending the target file to the target printing equipment, so that the target printing equipment receives and prints the target file. According to the method and the device, while the file is printed, the printing safety is improved, and the situation of file leakage is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a file printing method, device, electronic device and storage medium. Background Art

[0002] With the development of information technology, especially the widespread application of Internet technology, when printing files, in addition to using storage media to copy to a terminal connected to a printer and then printing, you can also forward the file to the terminal connected to the printer through an application for printing.

[0003] However, some files are encrypted and cannot be forwarded externally using applications. They can only be copied, which poses a risk of important file leakage and causes losses.

[0004] In view of this, how to print files while improving printing security and avoiding file leakage has become an important problem to be solved. Summary of the invention

[0005] In view of this, the purpose of the present disclosure is to provide a file printing method, device, electronic device and storage medium to solve or partially solve the above-mentioned problems.

[0006] Based on the above purpose, the first aspect of the present disclosure provides a file printing method, which is applied to a server, and the method includes:

[0007] receiving an initial target file and a target printing device sent by a terminal, wherein the server is connected to at least one printing device;

[0008] Inputting the initial target file into a data compression model, and obtaining a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model, and outputting a model of the size of the compressed file;

[0009] Compressing the initial target file according to the target compression value to obtain a target file;

[0010] The target file is sent to the target printing device, so that the target printing device receives and prints the target file.

[0011] Based on the same inventive concept, the second aspect of the present disclosure proposes a file printing device, which is arranged on a server and includes:

[0012] A file receiving module configured to receive an initial target file and a target printing device sent by a terminal, wherein the server is connected to at least one printing device;

[0013] A compression value determination module is configured to input the initial target file into a data compression model, and obtain a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model, and outputs a model of the size of the compressed file;

[0014] A compression processing module, configured to compress the initial target file according to the target compression value to obtain a target file;

[0015] The file sending module is configured to send the target file to the target printing device so that the target printing device receives and prints the target file.

[0016] Based on the same inventive concept, the third aspect of the present disclosure proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the file printing method as described above when executing the computer program.

[0017] Based on the same inventive concept, a fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the file printing method as described above.

[0018] As can be seen from the above, the present disclosure proposes a file printing method, device, electronic device and storage medium. The server is connected to at least one printing device, and the server communicates with the terminal to receive the target file and the target printing device sent by the terminal. The initial target file is the file to be printed, and the target printing device is the printing device selected by the user to print the initial target file. The initial target file is input into the data compression model, and the data compression model is a model of the size of the compressed file after training. The target compression value corresponding to the initial target file is obtained through the data compression model processing, and the target file is compressed according to the target compression value to obtain the target file. The compressed file size is obtained by using the trained data compression model, and the target compression value is determined more accurately. The initial target file is compressed, the file size is reduced, and the network bandwidth is reduced, and the overall printing speed is improved. The target file is sent to the target printing device so that the target printing device receives and prints the target file, and the file is successfully printed. Through the above scheme, all printing devices are connected to the server, avoiding the forwarding of the initial target file between different applications, reducing the risk of file leakage, and improving the security of file printing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flowchart of a file printing method according to an embodiment of the present disclosure;

[0021] Figure 2 is a structural block diagram of a file printing device according to an embodiment of the present disclosure;

[0022] Figure 3 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0024] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0025] Based on the above description, this embodiment proposes a file printing method, such as Figure 1 As shown, applied to a server, the method includes:

[0026] Step 101: receiving an initial target file and a target printing device sent by a terminal, wherein a server is connected to at least one printing device.

[0027] In specific implementation, the server may be a cloud server, and the terminal may be a terminal device used by the user to upload the initial target file and select the target printing device. The terminal may contain the file to be printed, i.e., the initial target file. The terminal may include at least one of the following: a mobile phone, a laptop, a tablet computer, a watch or a bracelet, etc. The printing device may be a device for printing files, and the printing device may include at least one of the following: a laser printer, an inkjet printer, a thermal printer, a dot matrix printer, or an electrostatic printer.

[0028] The server establishes a connection with the terminal to receive the file to be printed and the target printing device selected by the user for printing the file sent by the terminal, and the server is connected to at least one printing device to send the file to be printed to the printing device for printing. This avoids the leakage of the initial target file caused by forwarding the initial target file between different applications when the terminal prints the file.

[0029] Step 102, input the initial target file into a data compression model, and obtain a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model, and the output is a model of the compressed file size.

[0030] In specific implementation, the initial model is trained in advance to obtain a data compression model that outputs the compressed file size. The acquired initial target file is input into the data compression model, and the data compression model is processed to output a target compression value, wherein the target compression value is the file size of the initial target file after compression.

[0031] Step 103: compress the initial target file according to the target compression value to obtain a target file.

[0032] In specific implementation, the initial target file is compressed according to the target compression value obtained in the above steps to obtain the target file, which reduces the file size, so that when the target file is subsequently transmitted to the target printing device, the network bandwidth requirement is reduced, thereby improving the overall printing speed.

[0033] Step 104: Send the target file to the target printing device, so that the target printing device receives and prints the target file.

[0034] During specific implementation, the target file is sent to a target printing device, and the target printing device prints the target file after receiving the target file.

[0035] Through the above scheme, the target file and the target printing device sent by the receiving terminal, the initial target file is the file to be printed, and the target printing device is the printing device selected by the user to print the initial target file. The initial target file is input into the data compression model, and the data compression model is a model of the size of the compressed file after training. The target compression value corresponding to the initial target file is obtained through the data compression model, and the target file is compressed according to the target compression value. The compressed file size is obtained by using the trained data compression model, and the target compression value is determined more accurately. The initial target file is compressed, the file size is reduced, and the network bandwidth is reduced, and the overall printing speed is improved. The target file is sent to the target printing device for the target printing device to receive and print the target file, and the file is successfully printed. Through the above scheme, all printing devices are connected to the server, so as to avoid forwarding the initial target file between different applications, reduce the risk of file leakage, and improve the security of file printing.

[0036] In some embodiments, step 104 specifically includes:

[0037] Step 1041: receiving the target printing attributes sent by the terminal.

[0038] In a specific implementation, the target printing attributes sent by the receiving terminal are the file attribute information selected by the user when printing, wherein the target printing attributes include at least one of the following: file resolution, content form information in the file, or paper specification information corresponding to the file, etc. The content form information in the file includes at least one of the following: font size, font color, font type, or a special style of the font, etc. The special style of the font includes at least one of the following: bold, underlined, italic, or highlighted, etc.

[0039] Step 1042, obtain the file type corresponding to the initial target file, input the file type and the target printing attributes into the template detection model, and obtain the initial target template through processing by the template detection model, wherein the template detection model is obtained by training the initial detection model, and outputs a model of the template corresponding to the file type and printing attributes.

[0040] In a specific implementation, the initial detection model is trained in advance to obtain a template detection model of a template corresponding to a file type and a printing attribute. The file type corresponding to the initial target file is obtained, wherein the file type includes at least one of the following: word, pdf, excel or ppt. The file type and the target printing attribute are input into the template detection model, and an initial target template is output through the template detection model, wherein the initial target template includes the target printing attribute.

[0041] Step 1043: Send the initial target template to the terminal.

[0042] Step 1044: Receive feedback information sent by the terminal, and obtain the target template included in the feedback information.

[0043] Step 1045: Send the target file and the target template to the target printing device, so that the target printing device prints the target file according to the target template.

[0044] During specific implementation, the initial target template is sent to the terminal.

[0045] Case 1:

[0046] When the number of the initial target template is one, after the initial target template is sent to the terminal, a print preview can also be provided to the user, and the print preview is to display the target file on the initial target template, so that the user can determine whether to use the initial target template according to the print preview.

[0047] Determine that feedback information sent by the user through the terminal is received, and the feedback information is information of whether the user chooses to use the initial target template. When the user chooses to use the initial target template, the target file and the initial target template are sent to the target printing device, so that the target printing device prints the target file according to the initial target template. When the user chooses not to use the initial target template, the target file is sent to the target printing device and printed according to the target printing attributes.

[0048] At the same time, when viewing the print preview, the user can also modify the initial target template through the terminal, save the modified initial target template and send it to the server by the terminal. The server receives the modified initial target template, and sends the target file and the modified initial target template to the target printing device, so that the target printing device can print the target file according to the modified target template.

[0049] Case 2:

[0050] When there are multiple initial target templates, all of the multiple initial target templates can be sent to the terminal and displayed on the terminal for selection by the user.

[0051] Determine that feedback information sent by a user is received, the feedback information including a target template selected by the user from a plurality of initial target templates. Send the target file and the target template to the target printing device, so that the target printing device prints the target file according to the target template.

[0052] Similarly, when viewing the print preview, the user can also modify the initial target template through the terminal, save the modified initial target template and send it to the server by the terminal. The server receives the modified initial target template, sends the target file and the modified initial target template to the target printing device, so that the target printing device can print the target file according to the modified target template.

[0053] In some embodiments, the training process of the template detection model in step 1042 includes:

[0054] Obtain historical file types and historical templates, construct a training data set based on the historical file types and the historical templates, and use the data in the training data set to train the initial detection model to obtain a first training result. Construct a loss function based on the first training result and the historical template corresponding to the historical file type. Iterate the initial detection model, and when the number of iterations reaches a preset number of iterations or the loss function converges, the training is completed and a template detection model is obtained.

[0055] In some embodiments, step 102 specifically includes:

[0056] Step 1021: input the initial target file into a data compression model, and use the data compression model to identify preset redundant information contained in the initial target file.

[0057] In a specific implementation, the initial target file is input into a data compression model, and the data compression model is used to identify preset redundant information contained in the initial target file, wherein the redundant information includes at least one of the following: repeated data segments, redundant metadata, and invalid formats or encodings, wherein the repeated data segments are texts, images, or formatting information that appear multiple times during the printing process, and the redundant metadata refers to labels or identifiers that may be contained in the data set.

[0058] Step 1022: the data compression model obtains an initial file size of the initial target file and a redundant information size of preset redundant information contained in the initial target file.

[0059] Step 1023, determining a target compression value according to the initial file size and the redundant information size, and the data compression model outputs the target compression value.

[0060] During specific implementation, the initial file size of the initial target file and the redundant information size of the preset redundant information contained in the initial target file are obtained, and the difference between the initial file size and the redundant information size is calculated. The difference is the file size of the initial target file after compression, that is, the target compression value. The target compression value is output using the data compression model.

[0061] Through the above scheme, the trained data compression model can identify the redundant information contained in the file, where repeated data segments are data that appear multiple times and can be compressed. Redundant metadata is not necessary in the printing process and can be compressed or simplified. Redundant information or encoding methods will not directly affect the printing results, and the data volume can be reduced by standardizing or optimizing the encoding method. By calculating the redundant information size corresponding to the redundant information and obtaining the file size of the initial target file, the difference between the two is calculated as the target compression value, which effectively reduces the size of the printed data, thereby reducing the demand for network bandwidth and increasing the printing speed.

[0062] In some embodiments, step 103 specifically includes:

[0063] Step 1031, obtaining a file type corresponding to the initial target file, and obtaining preset format information corresponding to the file type according to the file type.

[0064] During specific implementation, the file type corresponding to the initial target file is obtained, and a database is searched according to the file type to obtain preset format information corresponding to the file type, wherein the database stores the correspondence between the file type and the preset format information, and the correspondence form may include at least one of the following: a relationship table, a function relationship, a curve relationship, and a bar chart relationship. In this embodiment, the information table form is preferred.

[0065] Step 1032: Standardize the initial target file using the preset format information to obtain a standardized initial target file.

[0066] Step 1033: compress the standardized initial target file using a dynamic compression algorithm according to the target compression value to obtain a target file.

[0067] In specific implementation, the preset format information determined in the above steps is used to standardize the initial target file to obtain a standardized initial target file. According to the target compression value output by the data compression model, the standardized initial target file is compressed using a dynamic compression algorithm to obtain a target file. At the same time, the compression rate can also be calculated, and by combining a strategy for controlling the compression rate, the accuracy of the data can be ensured during the compression process.

[0068] In some embodiments, it is determined that the number of the initial target files is multiple, and step 104 specifically includes:

[0069] Step 1041, determining whether the emergency level corresponding to each initial target file sent by the terminal is received.

[0070] Step 1042, determining the urgency level corresponding to each received initial target file, and sorting the multiple initial target files from high to low according to the urgency level to obtain an urgency order.

[0071] Step 1043: Send the target files and the urgent order to a target printing device, so that the target printing device prints the multiple target files according to the urgent order.

[0072] In specific implementation, when the terminal needs to print multiple files at the same time, while sending multiple initial target files, the terminal can also be used to input the urgency of each initial target file, wherein the urgency includes at least one of the following: urgent, expedited, urgent, general, and unlimited. When multiple initial target files sent by the terminal are received, it is determined whether the urgency level corresponding to each initial target file sent by the terminal is received.

[0073] If the urgency level corresponding to each initial target file is received, the multiple initial target files are sorted from high to low according to the urgency level to obtain an urgency order, and the target files and the urgency order are sent to the target printing device, so that the target printing device prints the multiple target files according to the order of the level.

[0074] Exemplarily, if three initial target files sent by the terminal are received, and the urgency levels corresponding to the three initial target files are received, the urgency levels of the three initial target files are respectively obtained, the urgency level of the initial target file A is urgent, the urgency level of the initial target file B is general, and the urgency level of the initial target file C is urgent, then the urgency order is ACB. The target files and the urgency order ACB are sent to the target printing device, so that the target printing device prints the multiple target files according to the urgency order ACB.

[0075] Through the above scheme, when multiple initial target files are received and the urgency levels corresponding to the initial target files are received, the multiple initial target files are sorted according to the urgency level selected by the user to obtain the urgency order, and printed according to the urgency order to meet the user's usage needs.

[0076] In some embodiments, it is determined that the number of the initial target files is multiple, and step 104 specifically includes:

[0077] Step 104A: determine whether the emergency level corresponding to each initial target file sent by the terminal is received.

[0078] Step 104B: determine that the urgency level corresponding to each of the initial target files has not been received, and obtain page number information of each of the initial target files.

[0079] Step 104C: sort the multiple initial target files from least to most according to the page number information to obtain a file order.

[0080] Step 104D: Send the target files and the file sequence to a target printing device, so that the target printing device prints the multiple target files according to the file sequence.

[0081] In specific implementation, when the terminal needs to print multiple files at the same time, while sending multiple initial target files, the terminal can also be used to input the urgency of each initial target file, wherein the urgency includes at least one of the following: urgent, expedited, urgent, general, and unlimited. When multiple initial target files sent by the terminal are received, it is determined whether the urgency level corresponding to each initial target file sent by the terminal is received.

[0082] If the urgency level corresponding to each initial target file is not received, the server obtains the page number information of each initial target file, sorts the multiple initial target files in order of the number of pages from small to large according to the page number information, and obtains a file sequence. The target files and the file sequence are sent to the target printing device, so that the target printing device prints the multiple target files according to the file sequence.

[0083] Exemplarily, if four initial target files are received from the terminal and the urgency levels corresponding to the four initial target files are not received, the page number information of each initial target file is obtained. The number of pages of the initial target file A is 20 pages, the number of pages of the initial target file B is 10 pages, the number of pages of the initial target file C is 15 pages, and the number of pages of the initial target file D is 2 pages. The files are sorted from the least to the most in terms of page number, and the file sequence is obtained as DBCA. The target files and the file sequence are sent to the target printing device, so that the printing device prints them according to the DBCA sequence.

[0084] Through the above scheme, when multiple initial target files are received and the urgency level corresponding to the initial target files is not received, the initial target files can be sorted by the number of pages contained in each initial target file, and files with fewer pages can be printed first, which can better meet the daily needs of users.

[0085] In some embodiments, step 104 specifically includes:

[0086] Step 104a: obtaining current status information of the target printing device.

[0087] Step 104b: determine that the current status information is a running status, and send a prompt message to the terminal, wherein the prompt message is used to prompt that the target printing device is running.

[0088] Step 104c: receiving feedback information corresponding to the prompt information sent by the terminal, and acquiring the desired printing device contained in the feedback information.

[0089] Step 104d: sending the target file to the desired printing device, so that the desired printing device receives and prints the target file.

[0090] or,

[0091] Step 104e: determine that the current state information is a standby state, and send the target file to the target printing device so that the target printing device receives and prints the target file.

[0092] In a specific implementation, the current status information of the target printing device selected by the user is obtained, and it is determined whether the target printing device is currently in an operating state according to the current status information.

[0093] Case 1:

[0094] If the target printing device is in operation, a prompt message is sent to the terminal to prompt the user that the target printing device selected is being used. At the same time, selection information can also be displayed for the user to choose whether to use other printing devices to print or wait for the target printing device.

[0095] The receiving terminal sends feedback information corresponding to the prompt information, wherein the feedback information includes a desired printing device selected by the user, wherein the desired printing device is the target printing device or other printing devices except the target printing device.

[0096] If the desired printing device is the target printing device, that is, the user chooses to wait for the target printing device, the server obtains the progress of the current printing task of the target printing device and sends a progress prompt message to the user, wherein the progress prompt message is used to remind the user of the relevant information of the target printing device, including at least one of the following: estimated printing time, total number of tasks to be printed, number of tasks currently printed, number of tasks remaining to be printed, etc. When the target printing device completes printing, a completion prompt message is sent to the user to remind the user that the target printing device has completed the previous printing task and can print the target file for the user.

[0097] If the desired printing device is another printing device other than the target printing device, the target file is sent to the other printing device so that the other printing device receives and prints the target file.

[0098] Case 2:

[0099] If the target printing device is in a standby state, the target file is sent to the target printing device so that the target printing device receives and prints the target file.

[0100] Through the above scheme, by judging whether the current state of the target printing device is running state or standby state, when it is in running state, a prompt message is sent to the terminal, so that the terminal can choose to continue waiting or choose other devices for printing according to its own situation, avoiding the problem of users waiting for a long time and wasting their time.

[0101] In some embodiments, the server can obtain the operating status information and basic information of each printing device. If an abnormality is detected in the printing device, such as lack of paper, lack of ink, paper jam, abnormal operation, etc., an abnormal prompt information is generated to provide timely feedback to the user, prompting the user to check the abnormality and resolve it.

[0102] In some embodiments, the server sets permission control for each user and records user information to ensure that only authorized users can access and execute printing tasks, thereby improving security and reliability.

[0103] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0104] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0105] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a file printing device.

[0106] refer to Figure 2 , Figure 2 The document printing device of the embodiment comprises:

[0107] The file receiving module 201 is configured to receive an initial target file and a target printing device sent by a terminal, wherein the server is connected to at least one printing device;

[0108] A compression value determination module 202 is configured to input the initial target file into a data compression model and obtain a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model and outputting a model of the size of the compressed file;

[0109] A compression processing module 203 is configured to compress the initial target file according to the target compression value to obtain a target file;

[0110] The file sending module 204 is configured to send the target file to the target printing device, so that the target printing device receives and prints the target file.

[0111] In some embodiments, the file sending module 204 specifically includes:

[0112] A printing attribute receiving unit, configured to receive target printing attributes sent by a terminal;

[0113] an initial target template determination unit, configured to obtain a file type corresponding to an initial target file, input the file type and the target printing attribute into a template detection model, and obtain an initial target template through processing by the template detection model, wherein the template detection model is obtained by training the initial detection model, and outputs a model of a template corresponding to the file type and the printing attribute;

[0114] an initial target template sending unit, configured to send the initial target template to the terminal;

[0115] a target template determining unit, configured to receive feedback information sent by the terminal, and obtain a target template included in the feedback information;

[0116] The file printing unit is configured to send the target file and the target template to the target printing device, so that the target printing device prints the target file according to the target template.

[0117] In some embodiments, the compression value determination module 202 specifically includes:

[0118] A redundant information identification unit is configured to input the initial target file into a data compression model, and use the data compression model to identify preset redundant information contained in the initial target file;

[0119] A redundant information size determining unit, configured to obtain, for the data compression model, an initial file size of the initial target file and a redundant information size of preset redundant information included in the initial target file;

[0120] The target compression value determination unit is configured to determine the target compression value according to the initial file size and the redundant information size, and the data compression model outputs the target compression value.

[0121] In some embodiments, the compression processing module 203 specifically includes:

[0122] a format information acquisition unit, configured to acquire a file type corresponding to the initial target file, and acquire preset format information corresponding to the file type according to the file type;

[0123] A standardization processing unit, configured to perform standardization processing on the initial target file using the preset format information to obtain a standardized initial target file;

[0124] The target file determination unit is configured to compress the standardized initial target file using a dynamic compression algorithm according to the target compression value to obtain a target file.

[0125] In some embodiments, it is determined that the number of the initial target files is multiple, and the file sending module 204 is specifically configured to:

[0126] Determine whether the emergency level corresponding to each initial target file sent by the terminal is received;

[0127] Determine the urgency level corresponding to each of the received initial target files, and sort the multiple initial target files from high to low according to the urgency level to obtain an urgency order;

[0128] The target files and the urgent order are sent to a target printing device, so that the target printing device prints the multiple target files according to the urgent order.

[0129] In some embodiments, it is determined that the number of the initial target files is multiple, and the file sending module 204 is further configured to:

[0130] Determine whether the emergency level corresponding to each initial target file sent by the terminal is received;

[0131] Determine that the emergency level corresponding to each of the initial target files has not been received, and obtain page number information of each of the initial target files;

[0132] According to the page number information, multiple initial target files are sorted from few to many according to the page number information to obtain a file order;

[0133] The target files and the file sequence are sent to a target printing device, so that the target printing device prints the multiple target files according to the file sequence.

[0134] In some embodiments, the file sending module 204 is further configured to:

[0135] Acquire current status information of the target printing device;

[0136] Determining that the current status information is a running status, sending a prompt message to the terminal, wherein the prompt message is used to prompt that the target printing device is running;

[0137] Receiving feedback information corresponding to the prompt information sent by the terminal, and acquiring the desired printing device contained in the feedback information;

[0138] Sending the target file to the desired printing device so that the desired printing device receives and prints the target file;

[0139] or,

[0140] It is determined that the current state information is a standby state, and the target file is sent to the target printing device so that the target printing device receives and prints the target file.

[0141] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0142] The device of the above embodiment is used to implement the corresponding file printing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0143] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the file printing method described in any of the above embodiments is implemented.

[0144] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0145] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0146] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0147] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0148] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0149] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0150] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0151] The electronic device of the above embodiment is used to implement the corresponding file printing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0152] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the file printing method described in any of the above embodiments.

[0153] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0154] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the file printing method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0155] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0156] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0157] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0158] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0159] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0160] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0161] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0162] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A file printing method, characterized in that: Applicable to servers, including: receiving an initial target file and a target printing device sent by a terminal, wherein the server is connected to at least one printing device; Inputting the initial target file into a data compression model, and obtaining a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model, and outputting a model of the size of the compressed file; Compressing the initial target file according to the target compression value to obtain a target file; The target file is sent to the target printing device, so that the target printing device receives and prints the target file.

2. The method according to claim 1, characterized in that The sending the target file to the target printing device comprises: Receive the target printing attributes sent by the terminal; Obtaining a file type corresponding to an initial target file, inputting the file type and the target printing attribute into a template detection model, and obtaining an initial target template through processing by the template detection model, wherein the template detection model is obtained by training the initial detection model, and outputting a model of a template corresponding to the file type and the printing attribute; Sending the initial target template to the terminal; receiving feedback information sent by the terminal, and acquiring a target template contained in the feedback information; The target file and the target template are sent to the target printing device, so that the target printing device prints the target file according to the target template.

3. The method according to claim 1, characterized in that The step of inputting the initial target file into a data compression model and obtaining a target compression value through processing by the data compression model includes: Inputting the initial target file into a data compression model, and using the data compression model to identify preset redundant information contained in the initial target file; The data compression model obtains the initial file size of the initial target file and the redundant information size of the preset redundant information contained in the initial target file; A target compression value is determined according to the initial file size and the redundant information size, and the data compression model outputs the target compression value.

4. The method according to claim 1, characterized in that The step of compressing the initial target file according to the target compression value to obtain the target file comprises: Acquire a file type corresponding to the initial target file, and acquire preset format information corresponding to the file type according to the file type; Performing standardization processing on the initial target file using the preset format information to obtain a standardized initial target file; According to the target compression value, the standardized initial target file is compressed using a dynamic compression algorithm to obtain a target file.

5. The method according to claim 1, characterized in that Determine that the number of the initial target files is multiple, The sending the target file to the target printing device comprises: Determine whether the emergency level corresponding to each initial target file sent by the terminal is received; Determine the urgency level corresponding to each of the received initial target files, and sort the multiple initial target files from high to low according to the urgency level to obtain an urgency order; The target files and the urgent order are sent to a target printing device, so that the target printing device prints the multiple target files according to the urgent order.

6. The method according to claim 1, characterized in that Determine that the number of the initial target files is multiple, The sending the target file to the target printing device comprises: Determine whether the emergency level corresponding to each initial target file sent by the terminal is received; Determine that the emergency level corresponding to each of the initial target files has not been received, and obtain page number information of each of the initial target files; According to the page number information, multiple initial target files are sorted from few to many according to the page number information to obtain a file order; The target files and the file sequence are sent to a target printing device, so that the target printing device prints the multiple target files according to the file sequence.

7. The method according to claim 1, characterized in that The sending the target file to the target printing device comprises: Acquire current status information of the target printing device; Determining that the current status information is a running status, sending a prompt message to the terminal, wherein the prompt message is used to prompt that the target printing device is running; Receiving feedback information corresponding to the prompt information sent by the terminal, and acquiring the desired printing device contained in the feedback information; Sending the target file to the desired printing device so that the desired printing device receives and prints the target file; or, It is determined that the current state information is a standby state, and the target file is sent to the target printing device so that the target printing device receives and prints the target file.

8. A document printing device, characterized in that: Set on the server, including: A file receiving module configured to receive an initial target file and a target printing device sent by a terminal, wherein the server is connected to at least one printing device; A compression value determination module is configured to input the initial target file into a data compression model, and obtain a target compression value through processing by the data compression model, wherein the data compression model is a model obtained by training the initial model, and outputs a model of the size of the compressed file; A compression processing module, configured to compress the initial target file according to the target compression value to obtain a target file; The file sending module is configured to send the target file to the target printing device so that the target printing device receives and prints the target file.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the file printing method according to any one of claims 1 to 7 when executing the program.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the file printing method according to any one of claims 1 to 7.