CN110298895B - Picture compression method, device, equipment and storage medium based on artificial intelligence - Google Patents

Picture compression method, device, equipment and storage medium based on artificial intelligence Download PDF

Info

Publication number
CN110298895B
CN110298895B CN201910383813.6A CN201910383813A CN110298895B CN 110298895 B CN110298895 B CN 110298895B CN 201910383813 A CN201910383813 A CN 201910383813A CN 110298895 B CN110298895 B CN 110298895B
Authority
CN
China
Prior art keywords
compression
user
picture
compressed
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910383813.6A
Other languages
Chinese (zh)
Other versions
CN110298895A (en
Inventor
郭勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910383813.6A priority Critical patent/CN110298895B/en
Publication of CN110298895A publication Critical patent/CN110298895A/en
Priority to PCT/CN2019/117738 priority patent/WO2020224215A1/en
Application granted granted Critical
Publication of CN110298895B publication Critical patent/CN110298895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application belongs to the technical field of picture processing, and relates to a picture compression method, device, equipment and storage medium based on artificial intelligence, wherein the method comprises the following steps: receiving a picture compression instruction input by a user; compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked; presenting the compressed picture to be checked to a user so as to enable the user to check; when receiving a command that the user's audit is not passed, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for audit; and uploading the compressed picture confirmed by the user to the target position when receiving the audit passing instruction of the user. The application can enable the user to select the compression mode matched with the target scene and compress the picture by the compression parameters to adapt to various different target scenes, is convenient to operate, can adjust the parameters for recompression for many times, and greatly meets the personal requirements of the user.

Description

Picture compression method, device, equipment and storage medium based on artificial intelligence
Technical Field
The embodiment of the invention belongs to the technical field of picture compression, and particularly relates to a picture compression method, device and equipment based on artificial intelligence and a storage medium.
Background
The scenes which are suitable for the picture compression software in the prior art are single, for example, some scenes have high requirements on picture quality, some scenes have small picture sizes, some scenes have small memory of pictures, some scenes are not suitable for zooming the uploaded pictures due to the uploaded picture sizes, and aiming at the various different scenes, only various different compression software or technologies can be searched for adapting to various different scenes, so that the operation of a user is very inconvenient, and parameters cannot be replaced for compression only once even if the compression effect is poor, so that the personal requirements of the user cannot be well met.
Disclosure of Invention
In order to solve the problems, the embodiment of the invention provides a picture compression method, device, equipment and storage medium based on artificial intelligence, which are used for solving the problems that in the prior art, a plurality of compression software is needed for compressing pictures aiming at a plurality of different scenes, so that the operation is inconvenient and the parameters cannot be replaced to better meet the requirements of users.
In a first aspect, an embodiment of the present invention provides an artificial intelligence-based picture compression method, including:
Receiving a picture compression instruction input by a user, wherein the instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode;
Compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked;
presenting the compressed picture to be checked to a user so that the user checks the compressed picture;
when receiving a command that the user's audit is not passed, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for audit;
and uploading the compressed picture confirmed by the user to the target position when receiving the audit passing instruction of the user.
In one embodiment, the compression mode includes at least two compression parameters having priority levels; the step of compressing the original picture according to the compression mode and at least one compression parameter includes:
compressing the original picture according to the compression mode and the compression parameter with the highest priority level;
The step of re-adjusting the compression parameters, re-compressing the original picture with the newly adjusted compression parameters and presenting the re-compressed original picture to the user for auditing comprises the steps of:
and selecting the compression parameters of the next level as the newly adjusted compression parameters according to the order of the priority levels, and recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for auditing.
In one embodiment, after the step of re-adjusting the compression parameters and re-compressing the original picture with the newly adjusted compression parameters and presenting the re-compressed original picture to the user for review, the method further includes:
if all the compressed pictures cannot pass the verification of the user, gradually increasing and/or decreasing the value of the compression parameter with the highest priority according to the preset interval and the preset step length;
Respectively recompressing the original pictures by taking the compression parameters which are gradually increased and/or decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected;
simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user;
and when receiving a selection instruction confirmed by the user, uploading the compressed picture selected by the user to a target position.
In one embodiment, the presentation of the compressed pictures to be selected to the user simultaneously is that the compressed pictures to be selected are presented to the user in order of magnitude of the compression parameters after gradually increasing and/or decreasing.
In one embodiment, after the step of presenting the compressed picture to be selected to the user simultaneously to obtain the selection of the compressed picture to be selected by the user, the method further includes:
when a cancel selection instruction of a user is received, an instruction for acquiring the self-defined compression parameters is sent to the user;
And receiving the user-defined compression parameters input by the user, and recompressing and auditing the original picture according to the user-defined compression parameters input by the user.
In one embodiment, the compression mode includes only one compression parameter; and when receiving an audit failing instruction of a user, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for audit, wherein the step of the user comprises the following steps of:
Gradually increasing and/or decreasing the value of the compression parameter according to a preset interval and a preset step length;
Respectively recompressing the original pictures by taking the compression parameters which are gradually increased and/or decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected;
simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user;
And when receiving a confirmation selection instruction of the user, uploading the compressed picture selected by the user to a target position.
In one embodiment, after the step of presenting the compressed picture to be selected to the user simultaneously to obtain the selection of the compressed picture to be selected by the user, the method further includes:
when a cancel selection instruction of a user is received, an instruction for acquiring the self-defined compression parameters is sent to the user;
And receiving the user-defined compression parameters input by the user, recompressing the original picture according to the user-defined compression parameters input by the user, and presenting the recompression to the user for auditing.
In a second aspect, an embodiment of the present invention provides an artificial intelligence-based picture compression apparatus, including:
The device comprises an instruction receiving module, a storage module and a display module, wherein the instruction receiving module is used for receiving a picture compression instruction input by a user, the instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode;
the compression module is used for compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked;
The presentation module is used for presenting the compressed picture to be checked to a user so that the user can check the compressed picture;
the parameter adjustment recompression module is used for recompressing the original picture by the newly adjusted compression parameters and presenting the original picture to the user for verification when receiving a command that the user's verification fails;
and the image uploading module is used for uploading the compressed image confirmed by the user to the target position when receiving the audit passing instruction of the user.
Some embodiments of the application also disclose a computer device, in which the memory stores a computer program, which when executed by the processor implements the steps of the artificial intelligence based picture compression method as described above.
Some embodiments of the application also disclose a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the artificial intelligence based picture compression method as described above.
Compared with the prior art, the technical scheme disclosed by the application has the following main beneficial effects:
In the embodiment of the application, a user inputs a picture compression instruction matched with a target scene, wherein the compression instruction carries an original picture and compression mode information; the method compresses the original picture according to the compression mode information; presenting the compressed picture to a user so that the user can audit the compressed picture; therefore, the user can check whether the compression effect is wanted or not, if not, the compression parameters can be automatically adjusted to recompress and audit, the personal requirements of the user are met greatly, the user can adapt to various different target scenes by selecting the compression mode suitable for the target scene and compressing the original picture by the compression parameters in one software or program, the defect of single compression function of the existing compression software or program is avoided, and the operation is convenient.
Drawings
In order to more clearly illustrate the solution of the present invention, a brief description will be given below of the drawings required for the description of the embodiments, it being apparent that the drawings in the following description are some embodiments of the present invention and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a picture compression method according to an embodiment of the present application;
FIG. 2 is a block flow diagram of an embodiment of a method for compressing pictures according to the present application;
FIG. 3 is a block flow diagram of another embodiment of a method for compressing pictures according to the present application;
FIG. 4 is a block diagram of an artificial intelligence based picture compression apparatus according to an embodiment of the present application;
FIG. 5 is a block diagram illustrating another embodiment of an artificial intelligence based picture compression device of the present application;
fig. 6 is a block diagram of a hardware structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
An embodiment of the application provides a picture compression method based on artificial intelligence, as shown in fig. 1, fig. 1 is a flow chart of the picture compression method provided by the embodiment of the application;
The method comprises the following steps:
S101, receiving a picture compression instruction input by a user, wherein the picture compression instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode.
Specifically, a plurality of compression mode information suitable for picture compression of different target scenes is preset, the compression mode information comprises a compression mode, at least one compression parameter is contained in the compression mode, and the compression mode information is stored, so that a user can input the compression mode information matched with the target scenes in a mode of selecting and inputting or a mode of manually inputting when encountering different target scenes.
When only one compression parameter is included in the compression mode, the default parameter is called;
When at least two compression parameters are included in the compression mode, the compression parameters are set with priority levels. For example, the first parameter, the second parameter, the third parameter may be sequentially increased or decreased in priority, and so on.
The compression modes set in the embodiment include, but are not limited to, the following modes for a plurality of different target scenes:
a. preset compression ratio (compression ratio=actual occupied space size/occupied space size before compression) mode:
Suitable target scenario: at present, most websites can upload pictures, the high-definition pictures with higher general pixels of the pictures shot by the mobile phone occupy large storage space, each user can occupy large storage space due to uploading 3M pictures, and the cost of a required hard disk and a required storage disk can be increased; on the other hand, the picture memory is too large, the waiting time of loading the webpage by the user is too long under the same network speed condition, the experience of the user is reduced, in order to avoid the situation that the waiting time of loading the webpage by the user is too long, the network speed is either increased or decreased, and the cost of the network speed is too high, therefore, the picture memory is preferably decreased, the picture can be compressed, and by setting different compression ratios, for example, the compression ratios can be but not limited to 1.0, 0.5, 0.3 and 0.1, and the compression parameters in the compression mode comprise preset compression ratios. The compression mode comprises at least one compression parameter, one or more compression parameters can be set according to the requirements and experience of a corresponding target scene, when only one compression parameter is called a default parameter, when a plurality of compression parameters are set, the compression parameters are provided with priority levels, for example, the priority level of a first parameter is highest, the priority level of a second parameter is next highest, and the priority level of a third parameter is lowest.
B. Scaling mode:
Suitable target scenario: when uploading some icons such as QQ, weChat, microblog and APP in some websites in some scenes, the pictures are only used for distinguishing and identifying, so that people can know who the head is at a glance, specific content information of the pictures is not needed to be known at all, and the size of the pictures can be scaled;
including equal scaling, unequal scaling.
The compression parameters in the compression mode include scaling (post-compression/pre-compression dimensions), e.g., 80%, 70%, 50%, 20%, etc.
The compression mode comprises at least one compression parameter, one or more compression parameters can be set according to the requirements and experience of a corresponding target scene, when only one compression parameter is called a default parameter, when a plurality of compression parameters are set, the compression parameters are provided with priority levels, for example, the first parameter, the second parameter and the third parameter priority level are sequentially increased or decreased.
S102, compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked.
And S103, presenting the compressed picture to be checked to a user so that the user can check the compressed picture.
Specifically, the compressed picture to be checked is presented to the user in an interface form, so that the user checks the compressed picture.
In some scenes requiring smaller memory, because the memory sizes of the pictures which are allowed to be uploaded by different websites are different, the compression parameters required by the target scenes corresponding to the different websites are different, or because the sizes of the pictures which are uploaded each time may have larger difference, some pictures are a few megabytes, and some pictures are tens megabytes, the same compression parameters are adopted to compress in the same mode, so that the requirements (such as definition requirements) of users may not be met or the pictures may not be normally uploaded to the target position (target website); for example, in some scenes with smaller required picture sizes, the same compression parameter may not meet the requirement of a user or may not be uploaded to a target position normally due to different picture sizes required by target websites involved each time or larger picture size differences to be uploaded each time in the same mode; under the condition that the user is unsatisfied or cannot upload to the target position normally, the user can indicate that the user is unsatisfied with the current compressed picture according to a preset operation instruction, and the auditing is not passed.
And S104, when receiving a verification failing instruction of the user, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for verification.
S105, when receiving the audit passing instruction of the user, uploading the compressed picture confirmed by the user to the target position.
In the embodiment of the application, a user inputs a picture compression instruction matched with a target scene, wherein the compression instruction carries an original picture and compression mode information; the method compresses the original picture according to the compression mode information; presenting the compressed picture to a user so that the user can audit the compressed picture; therefore, the user can check whether the compression effect is wanted or not, if not, the compression parameters can be automatically adjusted to recompress and audit, the personal requirements of the user are met greatly, the user can adapt to various different target scenes by selecting the compression mode suitable for the target scene and compressing the original picture by the compression parameters in one software or program, the defect of single compression function of the existing compression software or program is avoided, and the operation is convenient.
Referring to fig. 2, fig. 2 is a flow chart of an embodiment of an artificial intelligence based picture compression method provided by the present application;
In the present embodiment of the present invention, in the present embodiment,
S201, receiving a picture compression instruction input by a user, wherein the instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least two compression parameters with priority levels in the compression mode.
S202, compressing the original picture according to the compression parameter with the highest priority level and the compression mode.
And S203, presenting the compressed picture to be checked to a user so that the user checks the compressed picture.
And S204, when receiving an audit failing instruction of the user, selecting a compression parameter of the next level as a newly adjusted compression parameter according to the order of the priority level, recompressing the original picture by the newly adjusted compression parameter and presenting the recompression to the user for audit.
Specifically, taking two compression parameters as an example, compressing an original picture according to the compression mode and the compression parameter with the highest priority level, such as the first parameter, redisplaying the recompressed picture to the user so as to enable the user to recheck the compressed picture, when an instruction that the user does not pass the checking is received, re-selecting a second parameter in the picture compression instruction according to the priority level order as a newly adjusted compression parameter due to the parameters, recompressing the original picture with the newly adjusted compression parameter, and redisplaying the recompressed picture to the user so as to enable the user to recheck the compressed picture.
S205, when receiving the audit passing instruction of the user, uploading the compressed picture confirmed by the user to the target position. The setting has the advantages that when the original picture compressed by adopting the compression parameter with the highest priority level cannot pass the verification of the user, other parameters in the compression parameter are replaced to be recompressed, so that the opportunity of meeting the user requirement is increased.
Further, referring to fig. 3, fig. 3 is a flow chart of another embodiment of a picture compression method according to the present application;
If all the compression parameters are replaced and still cannot meet the requirements of the user, and no other parameters can be replaced at the moment, namely, the compression parameters are selected in the picture compression instruction again according to the order of priority as the newly adjusted compression parameters, the original picture is recompressed by the newly adjusted compression parameters, the recompressed picture is reapplied to the user, and after the step of enabling the user to review the compressed picture again, the method further comprises the following steps:
S301, if all the compressed pictures adopting the compression parameters cannot pass the verification of the user, gradually increasing and/or decreasing the value of the compression parameter with the highest priority according to a preset interval and a preset step length;
S302, respectively recompressing original pictures by taking the compression parameters which are gradually increased and/or decreased as newly adjusted compression parameters to obtain compressed pictures to be selected;
And S303, simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user. The compressed pictures to be selected are simultaneously presented to the user, wherein the compressed pictures to be selected are sequentially arranged and presented to the user according to the size of the compression parameters after being gradually increased and/or decreased; the preset interval may be an interval formed by floating the value of the compression parameter up or down by a certain range, for example [ the value of the compression parameter (1-10%), the value of the compression parameter (1+10%) ], [ the value of the compression parameter (1-10%), the value of the compression parameter ], [ the value of the compression parameter, the value of the compression parameter (1+10%) ], etc.; the preset step length may be equal to a preset interval divided into a plurality of small segments, for example, 1%, 2%, 5% of the preset interval may be the preset step length, etc.
If the user is not satisfied with all the compressed pictures, then
S304, when a user cancel selection instruction is received, an instruction for acquiring the self-defined compression parameters is sent to the user;
S305, receiving user-defined compression parameters input by a user, re-compressing the original picture according to the user-defined compression parameters input by the user, and displaying the compressed picture to the user for auditing.
S306, returning to the step S305 when receiving an audit failing instruction of the user;
S105, when receiving the audit passing instruction of the user, uploading the compressed picture confirmed by the user to the target position.
If the user sends out the instruction for confirming the selection, then
S307, when receiving the selection instruction confirmed by the user, uploading the compressed picture selected by the user to the target position.
In this embodiment, the value of the compression parameter with the highest priority level is gradually increased and/or decreased according to the preset interval and the preset step length; and the compression parameters which are gradually increased and/or decreased are used as the newly adjusted compression parameters, the original pictures are respectively recompressed and checked, and more pictures with different effects can be compressed for users to select the pictures which are most suitable for the needs of the users.
Alternatively, in some other embodiments, only one compression parameter, also referred to as a default parameter, is included in the compression mode; the step S102 of compressing the original picture according to the compression mode and at least one compression parameter includes:
and compressing the original picture according to the compression mode and default parameters in the compression mode.
And when receiving an audit failing instruction of a user, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for audit, wherein the step of the user comprises the following steps of:
gradually increasing and/or decreasing the value of the default parameter according to a preset interval and a preset step length;
And respectively recompressing the original pictures by taking the compression parameters which are gradually increased and decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected.
And simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user.
And when receiving a confirmation selection instruction of the user, uploading the compressed picture selected by the user to a target position.
If the user is not satisfied with all the compressed pictures and sends a deselect instruction, the step of presenting the compressed pictures to be selected to the user simultaneously to obtain the selection of the compressed pictures to be selected by the user further comprises: when a cancel selection instruction of a user is received, an instruction for acquiring the custom compression parameters is sent to the user, the custom compression parameters input by the user are received, and the original picture is recompressed according to the custom compression parameters input by the user and presented to the user for verification; and uploading the compressed picture confirmed by the user to the target position when receiving the audit passing instruction of the user. And when receiving a user audit failing instruction, returning to the step to receive the user-input custom compression parameters, and re-compressing the original picture according to the user-input custom compression parameters and presenting the original picture to the user audit.
In this embodiment, when only one compression parameter is included in the compression mode and when an audit failed instruction of a user is received, gradually increasing and/or decreasing the value of the default parameter according to a preset interval and a preset step length; and the compression parameters which are gradually increased and decreased are used as the newly adjusted compression parameters, the original pictures are respectively recompressed, and more pictures with different effects can be compressed for the user to select the picture which is most suitable for the user's own needs.
When a user deselection instruction is received, namely the user is dissatisfied with all compressed pictures to send the deselection instruction, sending an instruction for acquiring the self-defined compression parameters to the user;
Receiving a user-defined compression parameter instruction input by a user, re-compressing an original picture according to the user-defined compression parameter input by the user, and displaying the compressed picture to the user for auditing;
When receiving an audit passing instruction of a user, uploading the compressed picture confirmed by the user to a target position;
When the user is not satisfied with the compression effect of the compression parameters preset in the compression mode, the user can select the compression parameters to be input, the set benefits can better adapt to the requirements of the user, and the probability that the user obtains qualified compressed pictures is improved.
An embodiment of the present application further provides a picture compression device based on artificial intelligence, as shown in fig. 4, and fig. 4 is a block diagram of the picture compression device according to the embodiment of the present application. The device comprises:
The device comprises an instruction receiving module 1, a display module and a display module, wherein the instruction receiving module 1 is used for receiving a picture compression instruction input by a user, the instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode;
The compression module 2 is used for compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked;
The presentation module 3 is used for presenting the compressed picture to be checked to a user so that the user can check the compressed picture;
The adjustment parameter recompression module 5 is used for recompressing the original picture with the newly adjusted compression parameter and presenting the original picture to the user for verification when receiving the instruction that the user's verification fails;
and the image uploading module 4 is used for uploading the compressed image confirmed by the user to the target position when receiving the verification passing instruction of the user.
In the embodiment of the application, a command receiving module 1 receives a picture compression command carrying compression mode information input by a user, a compression module 2 responds to the picture compression command, and compresses an original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked; thus, a user can input a picture compression instruction matched with a target scene, and compress an original picture according to compression mode information to obtain a compressed picture to be checked; the presentation module 3 presents the compressed picture to be checked to a user so that the user checks the compressed picture; therefore, the user can check whether the compression effect is wanted or not, if so, the user confirms that the compression effect is passed, and the picture uploading module 4 uploads the compressed picture confirmed by the user to the target position after receiving the verification passing instruction of the user, so that the user can self-define and select the compression mode and the compression parameter suitable for the target scene to compress the original picture.
In some scenes requiring smaller memory, because the memory sizes of the pictures that are allowed to be uploaded by different websites are different, compression parameters required by target scenes corresponding to different websites are different, or because the sizes of the pictures uploaded each time may have larger differences, some pictures are several megabytes, and some pictures are tens of megabytes, compression by adopting parameters with the highest priority level in the same mode may not meet the requirements (such as definition requirements) of users or may not be normally uploaded to a target position such as a target website. Or in some scenes with smaller required picture sizes, the parameters with the highest priority level are adopted to compress in the same mode because of different picture sizes required by target websites involved each time or larger picture size difference to be uploaded each time, so that the requirements of users can not be met or the users can not upload to target positions normally. Under the condition that the user is not satisfied or can not upload to the target position normally, the user can indicate that the audit is not passed according to a preset operation instruction.
The adjustment parameter recompression module 5 is used for recompressing the original picture by the newly adjusted compression parameter when receiving an instruction that the user's audit is failed; and the presentation module 3 is used for re-presenting the re-compressed picture to the user so as to enable the user to review the compressed picture again, and then the picture uploading module 4 uploads the compressed picture confirmed by the user to the target position when receiving a review passing instruction of the user. By setting the adjustment parameter recompression module 5, realizes the compression by changing different compression parameters to meet the requirements of users, the purpose of satisfying the user.
Specifically, in some possible embodiments, the compression mode carried in the picture compression instruction received by the instruction receiving module 1 and input by the user includes at least two compression parameters with priority levels;
At this time, the compression module 2 is configured to compress the original picture according to the compression mode and the compression parameter with the highest priority level;
The adjustment parameter recompression module 5 is configured to select, according to the order of priority levels, a compression parameter of a next level as a newly adjusted compression parameter, recompress an original picture with the newly adjusted compression parameter, and present the recompression result to the user for review.
More specifically, taking two compression parameters as an example, the compression module 2 compresses the original picture according to the compression mode and the compression parameter with the highest priority, for example, the first parameter; when the parameter recompression adjusting module 5 receives an instruction that the user's audit is failed, the second parameter can be replaced as a new compression parameter to recompress the original picture.
In a possible case, the user checks and sends out a command that the user checks and passes, and the picture uploading module 4 is used for uploading the compressed picture confirmed by the user to the target position when receiving the command that the user checks and passes.
Because the number of the compression parameters in the compression mode is limited, the image compression device based on artificial intelligence can change parameters until all the compression parameters are used but all the compression images cannot pass the verification of the user, so in the embodiment, the device is further used for gradually increasing and/or decreasing the value of the compression parameter with the highest priority according to the preset interval and the preset step length when the image compressed by the compression parameters in the image compression instruction cannot pass the verification of the user on the basis of the embodiment of fig. 4; respectively recompressing the original pictures by taking the compression parameters which are gradually increased and/or decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected; the presentation module 3 is further configured to simultaneously present the compressed pictures to be selected to a user, so as to obtain a selection of the compressed pictures to be selected by the user; the image uploading module 4 is further configured to upload the compressed image selected by the user to the target position when receiving the selection instruction confirmed by the user.
The compressed pictures to be selected are presented to the user at the same time, wherein the compressed pictures to be selected are presented to the user according to the sequence of the compression parameters after the gradual increase and/or decrease.
Referring to fig. 5, fig. 5 is a block diagram illustrating an embodiment of a picture compression apparatus according to the present application.
The present embodiment further includes a custom parameter acquisition recompression module 6 based on the embodiment of fig. 4.
Specifically, the custom parameter obtaining and recompressing module 6 is configured to send a custom compression parameter obtaining instruction to a user when receiving a user deselection instruction, receive a custom compression parameter instruction input by the user, recompress an original picture according to the custom compression parameter input by the user, and present the recompression to the user for auditing.
The image uploading module 4 is further configured to upload the compressed image confirmed by the user to the target location when receiving the audit passing instruction of the user.
The embodiment enables the user to input the custom parameters by himself when the user is not satisfied with one check or is still satisfied with the check after the parameters are readjusted for a plurality of times, so that the compression meets the requirements of the target scene and the user.
In order to solve the technical problem, an embodiment of the application also discloses a computer device. Referring specifically to FIG. 6, a basic block diagram of a computer device 100 according to an embodiment of the present application is shown.
As illustrated in fig. 6, the computer device 100 includes a memory 101, a processor 102, and a network interface 103 communicatively coupled to each other via a system bus. It should be noted that only computer device 100 having components 101-103 is shown in FIG. 6, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may alternatively be implemented. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing according to predetermined or stored instructions, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 101 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 101 may be an internal storage unit of the computer device 100, such as a hard disk or a memory of the computer device 100. In other embodiments, the memory 101 may also be an external storage device of the computer device 100, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 100. Of course, the memory 101 may also include both internal storage units of the computer device 100 and external storage devices. In this embodiment, the memory 101 is generally used to store an operating system and various application software installed on the computer device 100, such as the image compression method based on artificial intelligence described above. Further, the memory 101 may be used to temporarily store various types of data that have been output or are to be output.
The processor 102 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 102 is generally used to control the overall operation of the computer device 100. In this embodiment, the processor 102 is configured to execute the program code stored in the memory 101 or process data, for example, execute the program code of the artificial intelligence-based picture compression method described above.
The network interface 103 may comprise a wireless network interface or a wired network interface, which network interface 103 is typically used to establish communication connections between the computer device 100 and other electronic devices.
The present application also provides another embodiment, namely, a computer readable storage medium storing a computer program executable by at least one processor to cause the at least one processor to perform the steps of any of the artificial intelligence based picture compression methods described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above embodiment methods may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present invention, but not all embodiments, and the preferred embodiments of the present invention are shown in the drawings, which do not limit the scope of the patent claims. This invention may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the invention are directly or indirectly applied to other related technical fields, and are also within the scope of the invention.

Claims (6)

1. An artificial intelligence based picture compression method, comprising:
Receiving a picture compression instruction input by a user, wherein the picture compression instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode;
Compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked;
presenting the compressed picture to be checked to a user so that the user checks the compressed picture;
when receiving a command that the user's audit is not passed, readjusting the compression parameters, recompressing the original picture with the newly adjusted compression parameters and presenting the recompression to the user for audit;
When receiving an audit passing instruction of a user, uploading the compressed picture confirmed by the user to a target position;
If the compression mode includes at least two compression parameters with priority levels, the step of compressing the original picture according to the compression mode and at least one compression parameter includes:
compressing the original picture according to the compression mode and the compression parameter with the highest priority level;
The step of re-adjusting the compression parameters, re-compressing the original picture with the newly adjusted compression parameters and presenting the re-compressed original picture to the user for auditing comprises the steps of:
Selecting the compression parameters of the next level as the newly adjusted compression parameters according to the order of the priority levels, recompressing the original picture by the newly adjusted compression parameters and presenting the recompressed original picture to the user for auditing;
After the step of re-adjusting the compression parameters and re-compressing the original picture with the newly adjusted compression parameters and presenting the original picture to the user for auditing, the method further comprises the steps of:
if all the compressed pictures cannot pass the verification of the user, gradually increasing and/or decreasing the value of the compression parameter with the highest priority according to the preset interval and the preset step length;
Respectively recompressing the original pictures by taking the compression parameters which are gradually increased and/or decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected;
simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user;
when receiving a selection instruction confirmed by a user, uploading a compressed picture selected by the user to a target position;
the preset interval is an interval formed by floating the value of the compression parameter upwards or downwards, and the preset interval is [ the value of the compression parameter (1-10%), the value of the compression parameter (1+10%) ], or [ the value of the compression parameter (1-10%), the value of the compression parameter ] or [ the value of the compression parameter, the value of the compression parameter (1+10%) ]; determining the preset step length based on the preset interval, wherein the preset step length is [ preset interval 1% ] or [ preset interval 2% ] or [ preset interval 5% ];
If the compression mode only includes one compression parameter, when receiving a user's audit failed instruction, readjusting the compression parameter, and recompressing the original picture with the newly adjusted compression parameter and presenting the recompression to the user's audit, wherein the step of recompressing the original picture includes:
Gradually increasing and/or decreasing the value of the compression parameter according to a preset interval and a preset step length;
Respectively recompressing the original pictures by taking the compression parameters which are gradually increased and/or decreased as the compression parameters which are newly adjusted to obtain the compressed pictures to be selected;
simultaneously presenting the compressed pictures to be selected to a user so as to acquire the selection of the compressed pictures to be selected by the user;
And when receiving a confirmation selection instruction of the user, uploading the compressed picture selected by the user to a target position.
2. The artificial intelligence based picture compression method according to claim 1, wherein the simultaneously presenting the compressed pictures to be selected to the user is presenting the compressed pictures to be selected to the user in order of magnitude of the compression parameters after gradually increasing and/or decreasing.
3. The artificial intelligence based picture compression method according to claim 1, wherein after the step of presenting the compressed picture to be selected to the user simultaneously to obtain the selection of the compressed picture to be selected by the user, the method further comprises:
when a cancel selection instruction of a user is received, an instruction for acquiring the self-defined compression parameters is sent to the user;
And receiving the user-defined compression parameters input by the user, recompressing the original picture according to the user-defined compression parameters input by the user, and presenting the recompression to the user for auditing.
4. An artificial intelligence based picture compression apparatus implementing the steps of the artificial intelligence based picture compression method according to any one of claims 1 to 3, the artificial intelligence based picture compression apparatus comprising:
The device comprises an instruction receiving module, a storage module and a display module, wherein the instruction receiving module is used for receiving a picture compression instruction input by a user, the instruction carries an original picture and compression mode information, and the compression mode information comprises a compression mode and at least one compression parameter in the compression mode;
The compression module is used for responding to the picture compression instruction, compressing the original picture according to the compression mode and at least one compression parameter to obtain a compressed picture to be checked;
The presentation module is used for presenting the compressed picture to be checked to a user so that the user can check the compressed picture;
the parameter adjustment recompression module is used for recompressing the original picture by the newly adjusted compression parameters and presenting the original picture to the user for verification when receiving a command that the user's verification fails;
and the image uploading module is used for uploading the compressed image confirmed by the user to the target position when receiving the audit passing instruction of the user.
5. A computer device comprising a memory and a processor, wherein the memory has stored therein a computer program, which when executed by the processor performs the steps of the artificial intelligence based picture compression method as claimed in any one of claims 1 to 3.
6. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the artificial intelligence based picture compression method according to any of claims 1 to 3.
CN201910383813.6A 2019-05-08 2019-05-08 Picture compression method, device, equipment and storage medium based on artificial intelligence Active CN110298895B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910383813.6A CN110298895B (en) 2019-05-08 2019-05-08 Picture compression method, device, equipment and storage medium based on artificial intelligence
PCT/CN2019/117738 WO2020224215A1 (en) 2019-05-08 2019-11-13 Artificial intelligence-based image compression method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910383813.6A CN110298895B (en) 2019-05-08 2019-05-08 Picture compression method, device, equipment and storage medium based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN110298895A CN110298895A (en) 2019-10-01
CN110298895B true CN110298895B (en) 2024-07-09

Family

ID=68026729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910383813.6A Active CN110298895B (en) 2019-05-08 2019-05-08 Picture compression method, device, equipment and storage medium based on artificial intelligence

Country Status (2)

Country Link
CN (1) CN110298895B (en)
WO (1) WO2020224215A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298895B (en) * 2019-05-08 2024-07-09 平安科技(深圳)有限公司 Picture compression method, device, equipment and storage medium based on artificial intelligence
CN111047657A (en) * 2019-11-26 2020-04-21 深圳壹账通智能科技有限公司 Picture compression method, device, medium and electronic equipment
CN111311699A (en) * 2020-01-17 2020-06-19 北京达佳互联信息技术有限公司 Picture compression method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769752A (en) * 2012-07-25 2012-11-07 北京汉王智通科技有限公司 JPEG image compression method and system
CN105489194A (en) * 2015-11-24 2016-04-13 小米科技有限责任公司 Method and device for displaying images
CN108574841A (en) * 2017-03-07 2018-09-25 北京金山云网络技术有限公司 A kind of coding method and device based on adaptive quantizing parameter

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001036844A (en) * 1999-07-16 2001-02-09 Nec Corp Image quality confirming device, image quality confirming method and recording medium storing its program
KR100524068B1 (en) * 2003-03-06 2005-10-26 삼성전자주식회사 Method and apparatus optimizing compression ratio of a image data
JP2006101010A (en) * 2004-09-28 2006-04-13 Canon Inc Image processing apparatus, image processing method, and program, and storage medium
CN104427341B (en) * 2013-08-28 2019-01-15 腾讯科技(深圳)有限公司 A kind of image processing method, device and terminal
CN105791849B (en) * 2014-12-25 2019-08-06 中兴通讯股份有限公司 Picture compression method and device
CN107798706A (en) * 2017-10-30 2018-03-13 广州木铎信息技术有限公司 Intelligent picture compressibility
CN109672888B (en) * 2018-09-25 2022-04-22 平安科技(深圳)有限公司 Picture compression method, equipment and computer readable storage medium
CN109670497A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Picture upload method, device, equipment and readable storage medium storing program for executing
CN110298895B (en) * 2019-05-08 2024-07-09 平安科技(深圳)有限公司 Picture compression method, device, equipment and storage medium based on artificial intelligence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102769752A (en) * 2012-07-25 2012-11-07 北京汉王智通科技有限公司 JPEG image compression method and system
CN105489194A (en) * 2015-11-24 2016-04-13 小米科技有限责任公司 Method and device for displaying images
CN108574841A (en) * 2017-03-07 2018-09-25 北京金山云网络技术有限公司 A kind of coding method and device based on adaptive quantizing parameter

Also Published As

Publication number Publication date
CN110298895A (en) 2019-10-01
WO2020224215A1 (en) 2020-11-12

Similar Documents

Publication Publication Date Title
CN110298895B (en) Picture compression method, device, equipment and storage medium based on artificial intelligence
CN108495185B (en) Video title generation method and device
CN106911943B (en) Video display method and device and storage medium
US10834424B2 (en) Method and device for compressing image, and electronic device
CN104869305B (en) Method and apparatus for processing image data
CN110930467A (en) Image processing method, electronic device and readable storage medium
CN111327921A (en) Video data processing method and device
CN112135140A (en) Video definition recognition method, electronic device and storage medium
CN111353965B (en) Image restoration method, device, terminal and storage medium
US20170161871A1 (en) Method and electronic device for previewing picture on intelligent terminal
CN112801882B (en) Image processing method and device, storage medium and electronic equipment
KR20210100853A (en) Electronic device and method for saving image
US20220191345A1 (en) System and method for determining compression rates for images comprising text
CN111354050A (en) Android-based picture compression method and device and storage medium
CN105469433B (en) Picture compression method and equipment thereof
US8811756B2 (en) Image compression
CN113992951A (en) Screen projection method, projector and terminal equipment
CN112399196B (en) Image processing method and device
CN110008907B (en) Age estimation method and device, electronic equipment and computer readable medium
KR20180127085A (en) Electronic device for compressing data and method for operation thereof
CN108769732B (en) Image transmission method and system and electronic terminal
CN113973235A (en) Interactive information display method and device and computer equipment
CN110941596A (en) Disk space release method and device, computing equipment and computer storage medium
CN117475013B (en) Computer equipment and video data processing method
CN113705548B (en) Topic type identification method and device

Legal Events

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