CN110298895A - Picture compression method, apparatus, equipment and storage medium based on artificial intelligence - Google Patents

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

Info

Publication number
CN110298895A
CN110298895A CN201910383813.6A CN201910383813A CN110298895A CN 110298895 A CN110298895 A CN 110298895A CN 201910383813 A CN201910383813 A CN 201910383813A CN 110298895 A CN110298895 A CN 110298895A
Authority
CN
China
Prior art keywords
user
compression
picture
compression parameters
compressed
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.)
Granted
Application number
CN201910383813.6A
Other languages
Chinese (zh)
Other versions
CN110298895B (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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application belongs to image processing technology, is related to a kind of picture compression method, apparatus, equipment and storage medium based on artificial intelligence, which comprises receives the picture compression instruction of user's input;Original image is compressed according to compact model and at least one compression parameters, obtains pending compressed picture;Pending compressed picture is presented to the user, so that user audits;When the audit for receiving user does not pass through instruction, compression parameters are readjusted, original image is re-compressed with the compression parameters newly adjusted and are presented to user's audit;When the audit for receiving user passes through instruction, the compressed picture that user confirms is uploaded to target position.The application can be used family and select the compact model to match from target scene and compression parameters compressed picture to adapt to a variety of different target scenes, easy to operate, and can repeatedly adjusting parameter re-compress, the bigger demands of individuals for meeting user.

Description

Picture compression method, apparatus, equipment and storage medium based on artificial intelligence
Technical field
The embodiment of the present invention belongs to picture compression technical field more particularly to a kind of picture compression side based on artificial intelligence Method, device, equipment and storage medium.
Background technique
The scene that picture compression software in the prior art adapts to is relatively simple, such as the scene said wants picture quality Ask high, some scenes need dimension of picture very little, and some scenes need the memory very little of picture, figure of some scenes due to upload The undesirable picture to upload of chip size zooms in and out, and can only find a variety of different pressures for aforementioned a variety of different scenes Contracting software or technology adapt to a variety of different scenes, and user's operation is very inconvenient, even and if can only first compression pressure The effect of contracting is bad also can not to change again parameter and is compressed, and can not meet the demands of individuals of user well.
Summary of the invention
To solve the above-mentioned problems, the embodiment of the present invention provide a kind of picture compression method, apparatus based on artificial intelligence, Equipment and storage medium, to solve to need a variety of compressed softwares to carry out compressed picture for a variety of different scenes in the prior art Cause inconvenient for operation and the problem of parameter better meets the demand of user can not be replaced.
In a first aspect, the embodiment of the present invention provides a kind of picture compression method based on artificial intelligence, comprising:
The picture compression instruction of user's input is received, described instruction carries original image and compact model information, described Compact model packet contains compact model and at least one compression parameters under the compact model;
Original image is compressed according to the compact model and at least one compression parameters, obtains pending compression Picture;
Pending compressed picture is presented to the user, so that user audits compressed picture;
When the audit for receiving user does not pass through instruction, compression parameters are readjusted, with the compression parameters pair newly adjusted Original image is re-compressed and is presented to user's audit;
When the audit for receiving user passes through instruction, the compressed picture that user confirms is uploaded to target position.
The compression parameters with priority level are contained at least two under the compact model in one of the embodiments,; Described the step of being compressed according to the compact model and at least one compression parameters to original image includes:
Original image is compressed according to the compact model and priority level highest compression parameters;
The readjustment compression parameters are re-compressed and are presented to original image with the compression parameters newly adjusted The user audit the step of include:
According to priority other other compression parameters of sequential selection next stage are as the compression parameters newly adjusted, with what is newly adjusted Compression parameters are re-compressed to original image and are presented to user's audit.
The readjustment compression parameters in one of the embodiments, with the compression parameters that newly adjust to original image After the step of being re-compressed and being presented to user audit, further includes:
When the picture compressed according to all compression parameters can not be by the audit of user, by priority level highest The values of compression parameters gradually increased and/or successively decreased according to pre-set interval and preset step-length;
Using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, respectively to original image into Row re-compresses, and obtains to be selected taking compressed picture;
It takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture;
When receiving the selection instruction of user's confirmation, the compressed picture that user chooses is uploaded to target position.
It is described in one of the embodiments, that take compressed picture while being presented to the user be by pressure contract drawing to be selected by be selected Piece is presented to the user according to the size order arrangement of the compression parameters after gradually increasing and/or successively decreasing.
It is described in one of the embodiments, to take compressed picture by be selected while being presented to the user, it is treated with obtaining user After the step of choosing the selection of compressed picture, further includes:
When instruction is chosen in the cancellation for receiving user, issues the user with and obtain customized compression parameters instruction;
Receive user input customized compression parameters, according to user input customized compression parameters to original image into Row is re-compressed and is audited.
It in one of the embodiments, only include a compression parameters under the compact model;It is described to receive use When the audit at family does not pass through instruction, compression parameters are readjusted, original image is pressed again with the compression parameters newly adjusted Contract be presented to the user audit the step of include:
The value of the compression parameters is gradually increased and/or successively decreased according to pre-set interval and preset step-length;
Using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, respectively to original image into Row re-compresses, and obtains to be selected taking compressed picture;
It takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture;
When instruction is chosen in the confirmation for receiving user, the compressed picture that user chooses is uploaded to target position.
It is described in one of the embodiments, to take compressed picture by be selected while being presented to the user, it is treated with obtaining user After the step of choosing the selection of compressed picture, further includes:
When instruction is chosen in the cancellation for receiving user, issues the user with and obtain customized compression parameters instruction;
Receive user input customized compression parameters, according to user input customized compression parameters to original image into Row re-compresses and is presented to user's audit.
Second aspect, the embodiment of the present invention provide a kind of picture compression device based on artificial intelligence, comprising:
Command reception module, for receive user input picture compression instruction, described instruction carry original image and Compact model information, the compact model packet contain compact model and at least one compression under the compact model Parameter;
Compression module, for being compressed according to the compact model and at least one compression parameters to original image, Obtain pending compressed picture;
Module is presented, for pending compressed picture to be presented to the user, so that user carries out the picture that compression obtains Audit;
Adjusting parameter weight compression module, for when the audit for receiving user does not pass through instruction, readjusting compression ginseng Number re-compresses original image with the compression parameters newly adjusted and is presented to user's audit;
Picture uploading module will be on the compressed picture of user's confirmation for when the audit for receiving user passes through instruction Reach target position.
Some embodiments of the present application also disclose a kind of computer equipment, and computer journey is stored in the memory Sequence, the processor realize the step of the picture compression method based on artificial intelligence as previously described when executing the computer program Suddenly.
Some embodiments of the present application also disclose a kind of computer readable storage medium, the computer-readable storage medium It is stored with computer program in matter, realizes when the computer program is executed by processor as previously described based on the figure of artificial intelligence The step of piece compression method.
Compared with prior art, technical solution disclosed in the present application mainly have it is following the utility model has the advantages that
In the embodiment of the present application, user is instructed by inputting the picture compression to match with target scene, compression instruction Carry original image and compact model information;The application compresses original image according to compact model information;It will compression Picture is presented to the user, so that user audits compressed picture;User in this way can check whether compression effectiveness is oneself Desired, want if not user, can re-compress and audit with adjust automatically compression parameters, bigger meets user's Compact model and compression parameters of the user in a software or program by selecting to be suitble to target scene are realized in demands of individuals Original image is compressed to adapt to a variety of different target scenes, avoids existing compressed software or program compaction function Single defect, it is easy to operate.
Detailed description of the invention
In order to illustrate more clearly of the solution of the present invention, one will be made to attached drawing needed in embodiment description below A simple introduction, it should be apparent that, drawings in the following description are some embodiments of the invention, for ordinary skill For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow diagram of picture compression method provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of embodiment of picture compression method provided by the present application;
Fig. 3 is the flow diagram of another embodiment of picture compression method provided by the present application;
Fig. 4 is the structural block diagram of the picture compression device provided by the embodiments of the present application based on artificial intelligence;
Fig. 5 is the structural block diagram of another embodiment of the picture compression device based on artificial intelligence of the application;
Fig. 6 is the hardware block diagram of computer equipment provided by the embodiments of the present application.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.Unless otherwise defined, used herein All technical and scientific terms have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.Herein Used term, which is only for the purpose of describing specific embodiments, in the description of the invention is not intended to limit this Invention.Description and claims of this specification and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing not Same object, is not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that Non-exclusive include in covering.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally further comprising For other intrinsic step or units of these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments Containing at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
One embodiment of the application provides a kind of picture compression method based on artificial intelligence, and as shown in FIG. 1, FIG. 1 is this Shens Please embodiment provide picture compression method flow diagram;
The described method includes:
S101, the picture compression instruction for receiving user's input, the picture compression instruction carry original image and compression Pattern information, the compact model packet contain compact model and at least one compression ginseng under the compact model Number.
Specifically, presetting the compact model information of a variety of picture compressions for adapting to different target scenes, mould is compressed Formula packet contains compact model, in a compressed mode includes at least one compression parameters, and by these compact model information It is stored, so that user can be in a manner of selecting input or in the way of being manually entered when encountering different target scenes The compact model information that input matches with target scene.
When under compact model only including a compression parameters, referred to as default parameters;
When containing at least two compression parameters under the compact model, compression parameters are provided with priority level.Such as Successively can not pass or successively decrease for the first parameter, the second parameter, third parameter priority etc..
Wherein, for a variety of different target scenes, the compact model being arranged in the present embodiment includes but is not limited to following Mode:
A. compression ratio (shared space size before space size/compression shared by compression ratio=reality) mode is preset:
Applicable target scene: now many websites can nearly all be shot with uploading pictures, mobile phone come photo generally as The relatively high high definition picture of element, the memory space of occupancy is also just big, and the picture that each user uploads a 3M, which will lead to, to be occupied Very big memory space, required hard disk, storage dish cost just will increase;On the other hand, picture memory is too big, same net Will lead under the conditions of speed user load the webpage waiting time it is too long, reduce the Experience Degree of user, in order to avoid user load webpage Waiting time is too long or improves network speed or reduces picture memory, and network speed cost is excessively high, therefore best mode is to reduce Picture memory can compress picture, by being arranged different compression ratio, such as compression ratio can be but not limited to 1.0, 0.5,0.3,0.1, the compression parameters under the compact model include default compression ratio.Include at least one compression under the compact model One or more compression parameters can be set according to the needs of corresponding target scene and experience, when only one in parameter When compression parameters, referred to as default parameters, when being equipped with multiple compression parameters, the compression parameters are equipped with priority level, example Such as the first parameter priority level highest, the second parameter priority level is taken second place, and third parameter priority level is minimum.
B. zoom mode:
Applicable target scene: certain scenes for example say number of site upload it is some as QQ, wechat, microblogging and When some head portrait small icons in APP, picture is intended merely to play the role of distinguishing identifier, makes one to be known that this head portrait is at a glance Who, requires no knowledge about the particular content information of picture at all, and the scaling of size can be carried out to picture;
Including uniform zoom, non-uniform zoom.
Compression parameters under the compact model include scaling (size before compressed size/compression), such as 80%, 70%, 50%, 20% etc..
It include at least one compression parameters under the compact model, it can be with according to the needs of corresponding target scene and experience One or more compression parameters is set, when only one compression parameters, referred to as default parameters, when being equipped with multiple compression parameters When, the compression parameters are equipped with priority level, such as the first parameter, the second parameter, third parameter priority level are successively passed Increase or successively decreases.
S102, original image is compressed according to the compact model and at least one compression parameters, is obtained pending Core compressed picture.
S103, pending compressed picture is presented to the user, so that user audits compressed picture.
Specifically, pending compressed picture is presented to the user by interface form, so that user carries out compressed picture Audit.
In some scenes for needing smaller memory, since different websites allows the memory size of the picture of upload different Sample, the compression parameters for causing target scene corresponding to different websites to need are different, or since the picture uploaded every time is big It is small to might have larger difference, some photos just several million, and some photos tens, all using same under the same mode Compression parameters carry out compression may be unable to satisfy the demand (such as clarity demand etc.) of user or will lead to can not it is normal on Reach target position (targeted website);In another example in the lesser scene of dimension of picture of some needs, due to what is be related to every time The difference for the dimension of picture that targeted website requires or since dimension of picture difference in size to be uploaded every time is larger, same All may be unable to satisfy the demand of user using the same compression parameters under mode or will lead to can not normally be uploaded to target Position;When user is unsatisfied with or normally can not be uploaded to target position, user can be according to preset operational order Show that oneself is dissatisfied to current compressed picture, audit does not pass through.
S104, when the audit for receiving user does not pass through instruction, readjust compression parameters, with newly adjust compression ginseng Several pairs of original images are re-compressed and are presented to user's audit.
S105, when the audit for receiving user passes through instruction, by user confirm compressed picture be uploaded to target position.
In the embodiment of the present application, user is instructed by inputting the picture compression to match with target scene, compression instruction Carry original image and compact model information;The application compresses original image according to compact model information;It will compression Picture is presented to the user, so that user audits compressed picture;User in this way can check whether compression effectiveness is oneself Desired, want if not user, can re-compress and audit with adjust automatically compression parameters, bigger meets user's Compact model and compression parameters of the user in a software or program by selecting to be suitble to target scene are realized in demands of individuals Original image is compressed to adapt to a variety of different target scenes, avoids existing compressed software or program compaction function Single defect, it is easy to operate.
With reference to Fig. 2, Fig. 2 is a kind of process of embodiment of the picture compression method provided by the present application based on artificial intelligence Block diagram;
In the present embodiment,
S201, the picture compression instruction for receiving user's input, described instruction carry original image and compact model information, The compact model packet contains compact model and at least two pressures with priority level under the compact model Contracting parameter.
S202, original image is compressed according to the compact model and priority level highest compression parameters.
S203, pending compressed picture is presented to the user, so that user audits compressed picture.
S204, when the audit for receiving user does not pass through instruction, according to priority other other pressure of sequential selection next stage Contracting parameter re-compresses original image with the compression parameters newly adjusted and is presented to institute as the compression parameters newly adjusted State user's audit.
Specifically, being joined by compression parameters there are two for according to the highest compression of the compact model and priority level Numerical example such as the first parameter compresses original image, the picture re-compressed is presented to the user again, so that user is to pressure Contract drawing piece re-starts audit, according to priority other since there are also parameters when the unacceptable instruction of the audit for receiving user Sequence selects the second parameter as the compression parameters newly adjusted in picture compression instruction again, with the compression parameters pair newly adjusted Original image is re-compressed, and the picture re-compressed is presented to the user again so that user to compressed picture again into Row audit.
S205, when the audit for receiving user passes through instruction, by user confirm compressed picture be uploaded to target position. The benefit being arranged in this way be when using the highest compression parameters original image of priority level carry out compression cannot by user examine When core, the other parameters replaced in compression parameters are re-compressed, and increase the chance for meeting user demand.
Further, referring to Fig. 3, Fig. 3 is the process of another embodiment of picture compression method provided by the present application Block diagram;
It, at this time again can be with without other parameters if having replaced all compression parameters still cannot meet the needs of users Replacement, i.e., according to priority other sequence selects compression parameters as the compression parameters newly adjusted in picture compression instruction again, Original image is re-compressed with the compression parameters newly adjusted, the picture re-compressed is presented to the user again, so that After the step of user re-starts audit to compressed picture, further includes:
S301, the picture compressed according to all compression parameters can not be by the audits of user, by priority level The value of highest compression parameters is gradually increased and/or is successively decreased according to pre-set interval and preset step-length;
S302, using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, respectively to original graph Piece is re-compressed, and obtains to be selected taking compressed picture;
S303, it takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture. It is wherein, described that take compressed picture while being presented to the user be to take compressed picture according to gradually increasing and/or pass for be selected by be selected The size order arrangement of compression parameters after subtracting is presented to the user;Pre-set interval can for by the value of compression parameters upwards or to Lower certain range of floating is formed by section, such as [the value * (1-10%) of compression parameters, the value * (1+ of compression parameters 10%)], [the value * (1-10%) of compression parameters, the value of compression parameters], [value of compression parameters, the value * (1+ of compression parameters 10%)] etc.;The value of preset step-length can for pre-set interval is divided into several segments, such as pre-set interval 1%, 2%, 5% can be preset step-length etc..
If user cancels selection instruction to all compressed pictures dissatisfied issue, then
S304, when receive user cancel choose instruction when, issue the user with and obtain the instruction of customized compression parameters;
S305, the customized compression parameters for receiving user's input, according to the customized compression parameters of user's input to original Picture, which re-starts, compresses and is presented to user's audit.
S306, the return step S305 when the audit for receiving user does not pass through instruction;
S105, when the audit for receiving user passes through instruction, by user confirm compressed picture be uploaded to target position.
If user issues the instruction that confirmation is chosen, then
S307, when receive user confirmation selection instruction when, by user choose compressed picture be uploaded to target position.
In the present embodiment, by the value of the highest compression parameters of priority level according to pre-set interval and preset step-length carry out by It is cumulative to add and/or successively decrease;Using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, respectively to original Beginning picture is re-compressed and is audited, can compress the picture that more effects are different out selected for user be best suitable for oneself need It wants.
It optionally, only include a compression parameters in some other embodiments, under compact model, also referred to as default is joined Number;The step S102 compressed according to the compact model and at least one compression parameters to original image includes:
Original image is compressed according to the default parameters under the compact model and the compact model.
It is described to readjust compression parameters when the audit for receiving user does not pass through instruction, with the compression ginseng newly adjusted Several pairs of original images are re-compressed and include: the step of being presented to user audit
The value of the default parameters is gradually increased and/or successively decreased according to pre-set interval and preset step-length;
Using the compression parameters after gradually increasing and successively decreasing as the compression parameters newly adjusted, weight is carried out to original image respectively New compression obtains to be selected taking compressed picture.
It takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture.
When instruction is chosen in the confirmation for receiving user, the compressed picture that user chooses is uploaded to target position.
If user cancels selection instruction to all compressed pictures dissatisfied issue, then described to take compressed picture for be selected It is presented to the user simultaneously, after obtaining the step of user treats the selection for choosing compressed picture, further includes: when receiving user Cancellation when choosing instruction, issue the user with and obtain the instruction of customized compression parameters, receive the customized compression ginseng of user's input Number re-starts original image according to the customized compression parameters of user's input and compresses and be presented to user's audit;When When receiving the audit of user and passing through instruction, the compressed picture that user confirms is uploaded to target position.When receiving user's Return step receives the customized compression parameters of user's input when audit does not pass through instruction, the customized compression inputted according to user Parameter, which re-starts original image, compresses and is presented to user's audit.
In the present embodiment, when the audit that receive user does not pass through when only including a compression parameters under compact model When instruction, by being gradually increased and/or being successively decreased the value of default parameters according to pre-set interval and preset step-length;Gradually to increase Adduction successively decrease after compression parameters as the compression parameters newly adjusted, original image is re-compressed respectively, equally can be with It compresses the picture that more effects are different out and selects the picture for being best suitable for oneself needs for user.
When receiving user's cancellation selection instruction, i.e., user refers to the dissatisfied sending cancellation selection of all compressed pictures When enabling, issues the user with and obtain customized compression parameters instruction;
The customized compression parameters instruction for receiving user's input, according to the customized compression parameters of user's input to original graph Piece, which re-starts, compresses and is presented to user's audit;
When the audit for receiving user passes through instruction, the compressed picture that user confirms is uploaded to target position;
When user is unsatisfied with the effect that the preset compression parameters of compact model itself compress out, oneself can choose Compression parameters are inputted, the benefit being arranged in this way can preferably adapt to the demand of user, promote user and get qualified compression The probability of picture.
One embodiment of the application also provides a kind of picture compression device based on artificial intelligence, as shown in figure 4, Fig. 4 is this Apply for the structural block diagram for the picture compression device that embodiment provides.Described device includes:
Command reception module 1, for receive user input picture compression instruction, described instruction carry original image and Compact model information, the compact model packet contain compact model and at least one compression under the compact model Parameter;
Compression module 2, for being compressed according to the compact model and at least one compression parameters to original image, Obtain pending compressed picture;
Module 3 is presented, for pending compressed picture to be presented to the user, so that user carries out the picture that compression obtains Audit;
Adjusting parameter weight compression module 5, for readjusting compression when the unacceptable instruction of the audit for receiving user Parameter re-compresses original image with the compression parameters newly adjusted and is presented to user's audit;
Picture uploading module 4 will be on the compressed picture of user's confirmation for when the audit for receiving user passes through instruction Reach target position.
Command reception module 1 receives the picture compression for carrying compact model information of user's input in the embodiment of the present application Instruction, compression module 2 responds the picture compression instruction, according to the compact model and at least one compression parameters to original Picture is compressed, and pending compressed picture is obtained;User can input the picture compression to match with target scene and refer in this way It enables, original image is compressed according to compact model information, obtains pending compressed picture;Module 3 is presented by pending pressure Contract drawing piece is presented to the user, so that user audits compressed picture;User in this way can check whether compression effectiveness is certainly What oneself wanted, it is then identified through if it is what user wanted, the audit that picture uploading module 4 receives user will after passing through instruction The compressed picture of user's confirmation is uploaded to target position, realize the customized compact model for selecting to be suitble to target scene of user and Compression parameters compress original image.
In some scenes for needing smaller memory, since different websites allows the memory size of the picture of upload different Sample, the compression parameters for causing target scene corresponding to different websites to need are different, or since the picture uploaded every time is big It is small to might have larger difference, some photos just several million, and some photos tens, priority is all used under the same mode Not highest parameter carries out that compression may be unable to satisfy the demand (such as clarity demand etc.) of user or will lead to can not be just Often it is uploaded to target position such as targeted website.Or in the lesser scene of dimension of picture of some needs, due to each The difference for the dimension of picture that the targeted website that is related to requires or since dimension of picture difference in size to be uploaded every time is larger, The demand of user may be unable to satisfy or will lead to by all compress using the highest parameter of priority level under the same mode Target position can not be normally uploaded to.In the case where user is dissatisfied or normally can not be uploaded to target position, Yong Huke To indicate that audit does not pass through according to preset operational order.
Adjusting parameter weight compression module 5 is used for when the unacceptable instruction of the audit for receiving user, readjusts compression Parameter re-compresses original image with the compression parameters newly adjusted;Module 3, the picture for will re-compress is presented Again it is presented to the user, so that user re-starts audit to compressed picture, user is then being received by picture uploading module 4 Audit when passing through instruction, the compressed picture that user confirms is uploaded to target position.By the way that adjusting parameter weight contracting mould is arranged Block 5 realizes that the different compression parameters of replacement carry out compression and reach the requirement for meeting user, makes customer satisfaction system purpose.
Specifically, in some possible embodiments, the picture compression for user's input that command reception module 1 receives refers to The compression parameters with priority level are contained at least two under the compact model carried in order;
At this point, compression module 2 is used for according to the compact model and the highest compression parameters of priority level to original graph Piece is compressed;
Adjusting parameter weight compression module 5 is adjusted for the other compression parameters of according to priority other sequential selection next stage as new Whole compression parameters re-compress original image with the compression parameters newly adjusted and are presented to user's audit.
More specifically, by compression parameters there are two for, compression module 2 according to the compact model and priority level most High compression parameters such as the first parameter compresses original image;Adjusting parameter weight compression module 5 receives examining for user When the unacceptable instruction of core, the second parameter can be replaced, original image is re-compressed as new compression parameters.
A kind of situation being likely to occur, user's audit pass through and issue the instruction that audit passes through, and picture uploading module 4 is used for When the audit for receiving user passes through instruction, the compressed picture that user confirms is uploaded to target position.
The picture compression device based on artificial intelligence of the application, can since the compression parameters number under compact model is limited Can will appear always replacement parameter until all compression parameters be all previously used but all compressed pictures can not all pass through use The audit at family, therefore in the present embodiment, for described device on the basis of the embodiment of Fig. 4, adjusting parameter weight compression module 5 is also For when can not be by the audit of user using the picture that is compressed of compression parameters in picture compression instruction, by priority The value of not highest compression parameters is gradually increased and/or is successively decreased according to pre-set interval and preset step-length;With gradually increase and/ Or the compression parameters after successively decreasing respectively re-compress original image as the compression parameters newly adjusted, obtain wait choose Compressed picture;Module 3 is presented to be also used to take compressed picture by be selected while being presented to the user, treats selection to obtain user and compresses The selection of picture;Picture uploading module 4 is also used to the compression figure for choosing user when receiving the selection instruction of user's confirmation Piece is uploaded to target position.
Wherein, by it is to be selected take compressed picture and meanwhile be presented to the user be by it is to be selected take compressed picture according to gradually increase and/ Or the size order arrangement of the compression parameters after successively decreasing is presented to the user.
Referring to Fig. 5, Fig. 5 is a kind of structural block diagram of embodiment of the picture compression device of the application.
The present embodiment still further comprises custom parameter on the basis of the embodiment of Fig. 4 and obtains weight compression module 6.
It is used for specifically, custom parameter obtains weight compression module 6 when instruction is chosen in the cancellation for receiving user, Xiang Yong Family, which issues, obtains customized compression parameters instruction, the customized compression parameters instruction of user's input is received, according to user's input Customized compression parameters re-compress original image and are presented to user's audit.
Picture uploading module 4 is also used to when the audit for receiving user passes through instruction, the compressed picture that user is confirmed It is uploaded to target position.
The present embodiment makes user when still audit is dissatisfied after primary audit is unsatisfied with or repeatedly readjusts parameter Custom parameter can be voluntarily inputted, so that compression more meets target scene and the demand of user.
In order to solve the above-mentioned technical problem, the embodiment of the application also discloses a kind of computer equipment.Please specifically it join Fig. 6 is read, is 100 basic structure block diagram of computer equipment in the embodiment of the present application.
As schematically represented in fig. 6, the computer equipment 100 includes being in communication with each other connection memory by system bus 101, processor 102, network interface 103.It is set it should be pointed out that illustrating only the computer with component 101-103 in Fig. 6 Standby 100, it should be understood that being not required for implementing all components shown, the implementation that can be substituted is more or less Component.Wherein, those skilled in the art of the present technique be appreciated that computer equipment here be one kind can according to being previously set or The instruction of storage, the automatic equipment for carrying out numerical value calculating and/or information processing, hardware include but is not limited to microprocessor, specially With integrated circuit (Appl ication Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processing unit (Digital Signal Processor, DSP), embedded device etc..
The computer equipment can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The computer equipment can carry out people by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user Machine interaction.
The memory 101 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random are visited It asks memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed read-only deposit Reservoir (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 101 can be the calculating The internal storage unit of machine equipment 100, such as the hard disk or memory of the computer equipment 100.In further embodiments, described What memory 101 was also possible to be equipped on the External memory equipment of the computer equipment 100, such as the computer equipment 100 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Certainly, the memory 101 can also both include the storage inside of the computer equipment 100 Unit also includes its External memory equipment.In the present embodiment, the memory 101 is installed on the computer commonly used in storage The operating system and types of applications software of equipment 100, such as the above-mentioned picture compression method etc. based on artificial intelligence.In addition, institute Stating memory 101 can be also used for temporarily storing the Various types of data that has exported or will export.
The processor 102 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 102 is commonly used in described in control The overall operation of computer equipment 100.In the present embodiment, the processor 102 is used to run to store in the memory 101 Program code or processing data, such as run the program code of the above-mentioned picture compression method based on artificial intelligence.
The network interface 103 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the computer equipment 100 and other electronic equipments.
Present invention also provides another embodiments, that is, provide a kind of computer readable storage medium, the computer can Read storage medium be stored with computer program, the computer program can be executed by least one processor so that it is described at least One processor executes the step of picture compression method of any one of the above based on artificial intelligence.
By the description of above embodiment, those skilled in the art can be understood that above-described embodiment method Can realize by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases before Person is more preferably embodiment.Based on this understanding, the technical solution of the application substantially makes tribute to the prior art in other words The part offered can be embodied in the form of software products, which is stored in a storage medium (such as ROM/RAM, magnetic disk, CD) in, including some instructions are used so that a terminal device (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
Obviously, embodiments described above is only a part of the embodiment of the present invention, instead of all the embodiments, attached Presently preferred embodiments of the present invention is given in figure, but is not intended to limit the scope of the patents of the invention.The present invention can be with many differences Form realize, on the contrary, purpose of providing these embodiments is keeps the understanding to the disclosure more thorough Comprehensively.Although the present invention is described in detail referring to the foregoing embodiments, for coming for those skilled in the art, It can still modify to technical solution documented by aforementioned each specific embodiment, or part of technical characteristic is carried out Equivalence replacement.All equivalent structures done using description of the invention and accompanying drawing content, are directly or indirectly used in other phases The technical field of pass, similarly within the invention patent protection scope.

Claims (10)

1. a kind of picture compression method based on artificial intelligence characterized by comprising
The picture compression instruction of user's input is received, the picture compression instruction carries original image and compact model information, The compact model packet contains compact model and at least one compression parameters under the compact model;
Original image is compressed according to the compact model and at least one compression parameters, obtains pending compression figure Piece;
Pending compressed picture is presented to the user, so that user audits compressed picture;
When the audit for receiving user does not pass through instruction, compression parameters are readjusted, with the compression parameters that newly adjust to original Picture is re-compressed and is presented to user's audit;
When the audit for receiving user passes through instruction, the compressed picture that user confirms is uploaded to target position.
2. the picture compression method according to claim 1 based on artificial intelligence, which is characterized in that under the compact model Contain at least two the compression parameters with priority level;It is described according to the compact model and at least one compression parameters pair The step of original image is compressed include:
Original image is compressed according to the compact model and priority level highest compression parameters;
The readjustment compression parameters re-compress original image with the compression parameters newly adjusted and are presented to described User audit the step of include:
According to priority other other compression parameters of sequential selection next stage are as the compression parameters newly adjusted, with the compression newly adjusted Parameter re-compresses original image and is presented to user's audit.
3. the picture compression method according to claim 2 based on artificial intelligence, which is characterized in that the readjustment pressure Contracting parameter, original image is re-compressed with the compression parameters newly adjusted and be presented to the user audit the step of it Afterwards, further includes:
When the picture compressed according to all compression parameters can not be by the audit of user, by the highest pressure of priority level The value of contracting parameter is gradually increased and/or is successively decreased according to pre-set interval and preset step-length;
Using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, weight is carried out to original image respectively New compression obtains to be selected taking compressed picture;
It takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture;
When receiving the selection instruction of user's confirmation, the compressed picture that user chooses is uploaded to target position.
4. the picture compression method according to claim 3 based on artificial intelligence, which is characterized in that described by pressure to be selected It is by the size to be selected for taking compressed picture according to the compression parameters after gradually increasing and/or successively decreasing that contract drawing piece is presented to the user simultaneously Sequence arrangement is presented to the user.
5. the picture compression method according to claim 3 based on artificial intelligence, which is characterized in that described by pressure to be selected Contract drawing piece is presented to the user simultaneously, with obtain user treat choose compressed picture selection the step of after, further includes:
When instruction is chosen in the cancellation for receiving user, issues the user with and obtain customized compression parameters instruction;
The customized compression parameters for receiving user's input carry out weight to original image according to the customized compression parameters of user's input It newly compresses and is presented to user's audit.
6. the picture compression method according to claim 1 based on artificial intelligence, which is characterized in that under the compact model It only include a compression parameters;It is described when the audit for receiving user does not pass through instruction, readjust compression parameters, with new The compression parameters of adjustment re-compress original image and include: the step of being presented to user audit
The value of the compression parameters is gradually increased and/or successively decreased according to pre-set interval and preset step-length;
Using the compression parameters after gradually increasing and/or successively decreasing as the compression parameters newly adjusted, weight is carried out to original image respectively New compression obtains to be selected taking compressed picture;
It takes compressed picture by be selected while being presented to the user, treated with to obtain user and choose the selection of compressed picture;
When instruction is chosen in the confirmation for receiving user, the compressed picture that user chooses is uploaded to target position.
7. the picture compression method according to claim 6 based on artificial intelligence, which is characterized in that described by pressure to be selected Contract drawing piece is presented to the user simultaneously, with obtain user treat choose compressed picture selection the step of after, further includes:
When instruction is chosen in the cancellation for receiving user, issues the user with and obtain customized compression parameters instruction;
The customized compression parameters for receiving user's input carry out weight to original image according to the customized compression parameters of user's input It newly compresses and is presented to user's audit.
8. a kind of picture compression device based on artificial intelligence characterized by comprising
Command reception module, for receiving the picture compression instruction of user's input, described instruction carries original image and compression Pattern information, the compact model packet contain compact model and at least one compression ginseng under the compact model Number;
Compression module, for responding the picture compression instruction, according to the compact model and at least one compression parameters pair Original image is compressed, and pending compressed picture is obtained;
Module is presented, for pending compressed picture to be presented to the user, so that the picture that user obtains compression is audited;
Adjusting parameter weight compression module, for readjusting compression parameters when the audit for receiving user does not pass through instruction, with The compression parameters newly adjusted re-compress original image and are presented to user's audit;
Picture uploading module, for when the audit for receiving user passes through instruction, the compressed picture that user confirms to be uploaded to Target position.
9. a kind of computer equipment, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are realized as described in any one of claims 1 to 7 when executing the computer program based on artificial intelligence The step of picture compression method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized as described in any one of claims 1 to 7 when the computer program is executed by processor based on artificial intelligence The step of picture compression method.
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 true CN110298895A (en) 2019-10-01
CN110298895B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
WO2020224215A1 (en) * 2019-05-08 2020-11-12 平安科技(深圳)有限公司 Artificial intelligence-based image compression method and apparatus, device, and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1069764A2 (en) * 1999-07-16 2001-01-17 Nec Corporation Image quality confirmation apparatus and method, and recording medium recording program therefor
CN1756296A (en) * 2004-09-28 2006-04-05 佳能株式会社 Image processing apparatus and image processing method
CN102769752A (en) * 2012-07-25 2012-11-07 北京汉王智通科技有限公司 JPEG image compression method and system
CN104427341A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Image processing method and apparatus, and terminal
CN105489194A (en) * 2015-11-24 2016-04-13 小米科技有限责任公司 Method and device for displaying images
CN105791849A (en) * 2014-12-25 2016-07-20 中兴通讯股份有限公司 Image compression method and device
CN107798706A (en) * 2017-10-30 2018-03-13 广州木铎信息技术有限公司 Intelligent picture compressibility
CN108574841A (en) * 2017-03-07 2018-09-25 北京金山云网络技术有限公司 A kind of coding method and device based on adaptive quantizing parameter
CN109670497A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Picture upload method, device, equipment and readable storage medium storing program for executing
CN109672888A (en) * 2018-09-25 2019-04-23 平安科技(深圳)有限公司 Picture compression method, equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100524068B1 (en) * 2003-03-06 2005-10-26 삼성전자주식회사 Method and apparatus optimizing compression ratio of a image data
CN110298895B (en) * 2019-05-08 2024-07-09 平安科技(深圳)有限公司 Picture compression method, device, equipment and storage medium based on artificial intelligence

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1069764A2 (en) * 1999-07-16 2001-01-17 Nec Corporation Image quality confirmation apparatus and method, and recording medium recording program therefor
CN1756296A (en) * 2004-09-28 2006-04-05 佳能株式会社 Image processing apparatus and image processing method
CN102769752A (en) * 2012-07-25 2012-11-07 北京汉王智通科技有限公司 JPEG image compression method and system
CN104427341A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Image processing method and apparatus, and terminal
CN105791849A (en) * 2014-12-25 2016-07-20 中兴通讯股份有限公司 Image compression method and device
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
CN107798706A (en) * 2017-10-30 2018-03-13 广州木铎信息技术有限公司 Intelligent picture compressibility
CN109672888A (en) * 2018-09-25 2019-04-23 平安科技(深圳)有限公司 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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020224215A1 (en) * 2019-05-08 2020-11-12 平安科技(深圳)有限公司 Artificial intelligence-based image compression method and apparatus, device, and storage medium
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

Also Published As

Publication number Publication date
WO2020224215A1 (en) 2020-11-12
CN110298895B (en) 2024-07-09

Similar Documents

Publication Publication Date Title
CN110298895A (en) Picture compression method, apparatus, equipment and storage medium based on artificial intelligence
US9621369B2 (en) Method and system for providing user interface for device control
CN108494788B (en) Data transmission method, data transmission device and computer readable storage medium
CN107276866A (en) Home appliance match somebody with somebody network method, device and home appliance
CN106202273A (en) File management method and system
CN104503831B (en) Equipment optimization method and device
CN106294188A (en) Memory space processing method and processing device
CN110298896A (en) Picture code-transferring method, device and electronic equipment
CN109360154A (en) A kind of super-resolution method of convolutional neural networks generation method and image
CN106899649A (en) A kind of task requests processing method, device and user equipment
CN105512033A (en) Automated testing method and device of mobile terminal and mobile terminal
CN106127687A (en) Picture combination method and device, electronic equipment and system
CN105447820A (en) Picture processing method and device and mobile terminal
CN112801882B (en) Image processing method and device, storage medium and electronic equipment
CN106412106A (en) Message sending method and device
CN106933702A (en) A kind of method of intelligent terminal storage space management, device and intelligent terminal
CN109214957A (en) More people's motor synchronizing method of ordering, system, server and storage medium
CN106201490A (en) The method and device that a kind of optimization application is run
JPWO2014155548A1 (en) Terminal device, program, data transmission / reception system, and data transmission / reception method
CN105988677A (en) Method and device for controlling page brightness
CN104144126B (en) Method and system, the client of flow optimization are realized by image procossing
CN112527761A (en) File processing method and device, electronic equipment and storage medium
US20160260149A1 (en) Biometric Case Design
CN110941596A (en) Disk space release method and device, computing equipment and computer storage medium
CN106454525B (en) Live broadcasting method, device and terminal

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
GR01 Patent grant