Compression processing method and device, computer storage medium and terminal

文档序号:1287553 发布日期:2020-08-28 浏览:7次 中文

阅读说明:本技术 一种压缩处理的方法、装置、计算机存储介质及终端 (Compression processing method and device, computer storage medium and terminal ) 是由 邓斌 于 2019-02-01 设计创作,主要内容包括:一种压缩处理的方法、装置、计算机存储介质及终端,包括:确定文档可被压缩的各项文档内容的压缩值;根据确定的可被压缩的各项文档内容的压缩值,选择压缩的一项或一项以上文档内容,以进行文档的压缩处理。本发明实施例减少了文档压缩的处理次数,提升了用户的编辑体验及效率。(A compression processing method, device, computer storage medium and terminal include: determining compression values of various document contents of which the documents can be compressed; and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document. The embodiment of the invention reduces the processing times of document compression and improves the editing experience and efficiency of users.)

1. A method of compression processing, comprising:

determining compression values of various document contents of which the documents can be compressed;

and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

2. The method of claim 1, wherein determining the compression value of each item of document content that the document can be compressed comprises:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

3. The method of claim 1 or 2, wherein the document content comprises one or more of:

image, embedded font, private data.

4. The method according to claim 1 or 2, wherein the document comprises:

portable document format PDF documents.

5. An apparatus for compression processing, comprising: a determination unit and a processing unit; wherein the content of the first and second substances,

the determination unit is used for: determining compression values of various document contents of which the documents can be compressed;

the processing unit is used for: and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

6. The apparatus according to claim 5, wherein the determining unit is specifically configured to:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

7. The apparatus of claim 5 or 6, wherein the document content comprises one or more of:

image, embedded font, private data.

8. The apparatus of claim 5 or 6, wherein the document comprises:

portable document format PDF documents.

9. A computer storage medium having stored therein computer-executable instructions for performing the method of compression processing of any one of claims 1-4.

10. A terminal, comprising: a memory and a processor; wherein the content of the first and second substances,

the processor is configured to execute program instructions in the memory;

the program instructions read on the processor to perform the following operations:

determining compression values of various document contents of which the documents can be compressed;

and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

Technical Field

The present disclosure relates to, but not limited to, office application technologies, and more particularly, to a method, an apparatus, a computer storage medium, and a terminal for compression processing.

Background

When exporting a Portable Document Format (PDF) document, the application that generates the PDF document inserts an image, an embedded font, and some private data (data that can be reconverted into a document of another format or data that can be subjected to other arithmetic processing) into the generated PDF document.

Before uploading PDF documents on websites such as forums or blogs, a user generally compresses the PDF documents according to the parameter requirements of the websites on the document formats and sizes, and if the size of the compressed PDF documents does not meet the website requirements, the user re-compresses the PDF documents until the parameter requirements of the websites are met, and normal uploading of the PDF documents can not be realized.

To sum up, after the PDF document is compressed, when the parameter requirements of the size of the website cannot be met, the user needs to compress the PDF document again until the parameter requirements are met, and the PDF document can be uploaded, so that the use experience and the working efficiency of the user are influenced.

Disclosure of Invention

The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

The embodiment of the invention provides a compression processing method and device, a computer storage medium and a terminal.

The embodiment of the invention provides a compression processing method, which comprises the following steps:

determining compression values of various document contents of which the documents can be compressed;

and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

Optionally, the determining compression values of document contents that the document can be compressed includes:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

Optionally, the document content includes one or more of the following:

image, embedded font, private data.

Optionally, the document includes:

portable document format PDF documents.

On the other hand, an embodiment of the present invention further provides a compression processing apparatus, including: a determination unit and a processing unit; wherein the content of the first and second substances,

the determination unit is used for: determining compression values of various document contents of which the documents can be compressed;

the processing unit is used for: and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

Optionally, the determining unit is specifically configured to:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

Optionally, the document content includes one or more of the following:

image, embedded font, private data.

Optionally, the document includes:

portable document format PDF documents.

In still another aspect, an embodiment of the present invention further provides a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and the computer-executable instructions are used to execute the method for compressing.

In another aspect, an embodiment of the present invention further provides a terminal, including: a memory and a processor; wherein the content of the first and second substances,

the processor is configured to execute program instructions in the memory;

the program instructions read on the processor to perform the following operations:

determining compression values of various document contents of which the documents can be compressed;

and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

Compared with the related art, the technical scheme of the application comprises the following steps: determining compression values of various document contents of which the documents can be compressed; and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document. The embodiment of the invention reduces the processing times of document compression and improves the editing experience and efficiency of users.

Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

Drawings

The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.

FIG. 1 is a flow chart of a method of compression processing according to an embodiment of the present invention;

fig. 2 is a block diagram of a compression apparatus according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.

The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.

Fig. 1 is a flowchart of a compression processing method according to an embodiment of the present invention, as shown in fig. 1, including:

step 101, determining compression values of all document contents of which the documents can be compressed;

it should be noted that, the embodiments of the present invention determine the compression value of each item of content that can be compressed in a document, and can perform estimation by using an estimation method that is already known in the related art. The compression value for each item of content may include the number of bits that may reduce the document when each item of content is compressed.

Optionally, the determining the compression value of each item of document content of which the document can be compressed according to the embodiment of the present invention includes:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

It should be noted that the compression parameter information implemented by the present invention may include selection information for determining whether to select the document content, for example, to determine whether to compress the document content by checking.

Optionally, the content of the document in the embodiment of the present invention includes one or more of the following:

image, embedded font, private data.

It should be noted that compressing the image may include: the image is compressed and converted into an image in a format that occupies a small content, and the embedded font and the private data are compressed, which can be understood as deleting each private data of the embedded font. The special data of the embodiment of the invention comprises the following data: the PDF file can be reconverted into data of a document in another format, or data that can be subjected to other arithmetic processing.

Optionally, the document of the embodiment of the present invention includes:

portable document format PDF documents.

102, selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed, so as to compress the document.

It should be noted that, after selecting the compressed document content, the embodiment of the present invention may implement the compression processing of the document by referring to the existing compression method in the related art.

In addition, the purpose of compressing the document in the embodiment of the invention is to obtain the document meeting the website requirement. The embodiment of the invention can manually select the document contents to be compressed, and can also set the maximum value of the compressed documents according to the website requirements, and add the document contents to be compressed one by one according to the set maximum value and the preset priority order.

Compared with the related art, the technical scheme of the application comprises the following steps: determining compression values of various document contents of which the documents can be compressed; and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document. The embodiment of the invention reduces the processing times of document compression and improves the editing experience and efficiency of users.

Fig. 2 is a block diagram of a compression processing apparatus according to an embodiment of the present invention, and as shown in fig. 2, the compression processing apparatus includes: a determination unit and a processing unit; wherein the content of the first and second substances,

the determination unit is used for: determining compression values of various document contents of which the documents can be compressed;

it should be noted that, the embodiments of the present invention determine the compression value of each item of content that can be compressed in a document, and can perform estimation by using an estimation method that is already known in the related art. The compression value for each item of content may include the number of bits that may reduce the document when each item of content is compressed.

Optionally, the determining unit in the embodiment of the present invention is specifically configured to:

receiving input compression parameter information through a preset interactive interface;

and determining each item of compressible content of the document with the determined compression value according to the received compression parameter information.

It should be noted that the compression parameter information implemented by the present invention may include selection information for determining whether to select the document content, for example, to determine whether to compress the document content by checking.

Optionally, the content of the document in the embodiment of the present invention includes one or more of the following:

image, embedded font, private data.

It should be noted that compressing the image may include: the image is compressed and converted into an image in a format that occupies a small content, and the embedded font and the private data are compressed, which can be understood as deleting each private data of the embedded font. The special data of the embodiment of the invention comprises the following data: the PDF file can be reconverted into data of a document in another format, or data that can be subjected to other arithmetic processing.

Optionally, the document of the embodiment of the present invention includes:

portable document format PDF documents.

The processing unit is used for: and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

It should be noted that, after selecting the compressed document content, the embodiment of the present invention may implement the compression processing of the document by referring to the existing compression method in the related art.

In addition, the purpose of compressing the document in the embodiment of the invention is to obtain the document meeting the website requirement. The embodiment of the invention can manually select the document contents to be compressed, and can also set the maximum value of the compressed documents according to the website requirements, and add the document contents to be compressed one by one according to the set maximum value and the preset priority order.

Compared with the related art, the technical scheme of the application comprises the following steps: determining compression values of various document contents of which the documents can be compressed; and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document. The embodiment of the invention reduces the processing times of document compression and improves the editing experience and efficiency of users.

The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used for executing the compression processing method.

An embodiment of the present invention further provides a terminal, including: a memory and a processor; wherein the content of the first and second substances,

the processor is configured to execute program instructions in the memory;

the program instructions read on the processor to perform the following operations:

determining compression values of various document contents of which the documents can be compressed;

and selecting one or more compressed document contents according to the determined compression value of each item of document contents which can be compressed so as to perform compression processing on the document.

It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by a program instructing associated hardware (e.g., a processor) to perform the steps, and the program may be stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in hardware, for example, by an integrated circuit to implement its corresponding function, or in software, for example, by a processor executing a program/instruction stored in a memory to implement its corresponding function. The present invention is not limited to any specific form of combination of hardware and software.

Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种图像转换方法、装置及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!