CN108965430A - Image acquisition method, device, computer equipment and storage medium - Google Patents

Image acquisition method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108965430A
CN108965430A CN201810775792.8A CN201810775792A CN108965430A CN 108965430 A CN108965430 A CN 108965430A CN 201810775792 A CN201810775792 A CN 201810775792A CN 108965430 A CN108965430 A CN 108965430A
Authority
CN
China
Prior art keywords
picture
request
format
webp format
webp
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.)
Pending
Application number
CN201810775792.8A
Other languages
Chinese (zh)
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.)
Shenzhen Dingsheng Computer Technology Co Ltd
Original Assignee
Shenzhen Dingsheng Computer Technology 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 Shenzhen Dingsheng Computer Technology Co Ltd filed Critical Shenzhen Dingsheng Computer Technology Co Ltd
Priority to CN201810775792.8A priority Critical patent/CN108965430A/en
Publication of CN108965430A publication Critical patent/CN108965430A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of image acquisition method, device, computer equipment and storage mediums.The described method includes: determining that picture request is when can obtain the request of WebP format picture, modifying the picture request is that WebP format picture is requested when according to preset configuration information;Corresponding WebP format picture is downloaded according to WebP format picture request;When picture container does not support WebP format, the WebP format picture is converted into the picture and requests matched picture format.The embodiment of the present invention may be implemented to show WebP format picture in the picture container for supporting WebP format, reduces floating resources consumption, while converting picture format in time in the picture container for not supporting WebP format, avoids picture that from can not showing.

Description

Image acquisition method, device, computer equipment and storage medium
Technical field
The present embodiments relate to picture Processing Technique more particularly to a kind of image acquisition method, device, computer equipments And storage medium.
Background technique
With the popularity of the internet, the content of people's acquisition information is more and more abundant.Relative to lteral data, image data It is the main information carrier that current Internet user obtains information with advantages such as informative, beauties.
Picture has multiple format, and the Internet resources and loading velocity that different picture formats are consumed in load are all Difference, wherein WebP is a kind of picture format of energy high efficiency of compression picture volume, relative to the formats energy such as png, jpg, jpeg The size for reducing picture in a large proportion, can save server broadband resource and data space.Application program and server at present The scheme for being used interchangeably WebP format picture is the picture of direct request WebP format, specific as shown in Figure 1a.
But current many equipment, component, container only support the formats such as jpg, png, jpeg, do not support WebP format, such as iOS System default browser etc.;And it needs to issue WebP format picture by private server.If not supported in picture container WebP format or current server do not support in the case where issuing WebP format picture that user is loaded directly into the figure of WebP format Piece, will lead to client can not show picture, seriously affect user and watch picture.
Summary of the invention
The embodiment of the invention provides a kind of image acquisition method, device, computer equipment and storage mediums, may be implemented WebP format picture is shown in the picture container for supporting WebP format, reduces floating resources consumption, while not supporting WebP Picture format is converted in time in the picture container of format, avoids picture that from can not showing.
In a first aspect, the embodiment of the invention provides a kind of image acquisition methods, comprising:
When according to preset configuration information, determining that picture is requested is when can obtain the request of WebP format picture, described in modification Picture request is that WebP format picture is requested;
Corresponding WebP format picture is downloaded according to WebP format picture request;
When picture container does not support WebP format, it is matched that the WebP format picture is converted into the picture request Picture format.
Second aspect, the embodiment of the invention also provides a kind of picture acquiring devices, comprising:
Picture requests modified module, for when according to preset configuration information, determining that picture is requested is that can obtain WebP format When the request of picture, modifying the picture request is that WebP format picture is requested;
WebP format picture download module, for downloading corresponding WebP format chart according to WebP format picture request Piece;
Picture format adjusts module, for when picture container does not support WebP format, the WebP format picture to be turned It is changed to the picture and requests matched picture format.
The third aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in It is realized on memory and when processor described in the computer program that can run on a processor executes described program as the present invention is real Apply any image acquisition method in example.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes the image acquisition method as described in any in the embodiment of the present invention when program is executed by processor.
The embodiment of the present invention is corresponded to and is repaired by that can obtain the request of WebP format picture according to preset configuration information primary dcreening operation Be changed to that WebP format picture can be obtained, to download WebP format picture, and when picture container does not support WebP format, will under It carries WebP format picture and is converted to matched picture format, solve server in the prior art or picture container etc. and do not support The problem of WebP format picture causes client that can not show picture may be implemented with a wide range of precise using WebP format, section A large amount of server broadband resource and data space are saved, while avoiding the feelings due to not supporting webp format picture that can not show Condition, and server is avoided not support the request of webp format picture and cause to request the case where reporting an error, improve user experience.
Detailed description of the invention
Fig. 1 a is a kind of flow chart for image acquisition method that the prior art provides;
Fig. 1 b is a kind of flow chart for image acquisition method that the embodiment of the present invention one provides;
Fig. 1 c is a kind of flow chart for image acquisition method that the embodiment of the present invention one provides;
Fig. 2 is a kind of structural schematic diagram of picture acquiring device provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention three provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although operations (or step) are described as the processing of sequence by flow chart, Many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be pacified again Row.The processing can be terminated when its operations are completed, it is also possible to have the additional step being not included in attached drawing.Institute Stating processing can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 b is a kind of flow chart for image acquisition method that the embodiment of the present invention one provides, and the present embodiment is applicable to obtain The case where taking WebP format picture, this method can be executed by picture acquiring device provided in an embodiment of the present invention, the device The mode that software and/or hardware can be used is realized, and can be generally integrated in computer equipment, for example, mobile phone, tablet computer, PC machine etc..As shown in Figure 1 b, the method for the present embodiment specifically includes:
S110, when according to preset configuration information, when determining request of the picture request for WebP format picture can be obtained, modification The picture request is that WebP format picture is requested.
In the present embodiment, picture request can refer to the address link of access picture, for example, https: // Www.12345.com/122.jpg is a picture request, is shown to be and requests picture entitled from the website www.12345.com The picture of 122.jpg.Can first judge whether picture request is the request that can obtain WebP format picture.It is understood that It is, since the server for only having special technology to support can just issue WebP format picture, it is thus possible to be directed toward by request Can server provide WebP format picture to judge whether picture request is the request that can obtain WebP format picture.Pre- establishing Confidence breath can be preset for determining the information that can obtain WebP format picture.
Optionally, the configuration information includes: domain name list, suffix list of file names and white list;Domain name list is used for The domain name of the server of WebP format is supported in storage;The suffix list of file names is for storing the picture lattice that can be exchanged into WebP format The corresponding suffix name of formula;The white list is used to store the picture request for requesting the format in addition to WebP format.
Specifically, domain name can refer to a certain computer on the Internet that forms of name separated by a string with point Or the title of unit is calculated, for identifying the electronic bearing (sometimes referred to as geographical location) of computer when data are transmitted, for example, Picture requests https: www.12345.com is domain name in //www.12345.com/122.jpg.Suffix name can refer to file Extension name, middle jpg is suffix name as in the previous example.White list can be directed to the database of the picture request of non-WebP format picture, White list can be updated according to the acquisition result that picture is requested, and can not finally will specifically obtain the figure of WebP format Piece request is added in white list.
It should be noted that configuration information can also be other content, such as do not support to issue the domain of WebP format picture List of file names, history can obtain the picture request list of the picture request of WebP format, not support the application journey of WebP format picture Sequence or picture container etc., the embodiment of the present invention is not specifically limited.
Further, it can be based on preset configuration information, targetedly screen picture request.Optionally, the basis Preset configuration information determines that picture request is that can obtain the request of WebP format picture, comprising: when picture request while completely The domain name of the foot picture request is in domain name list and the suffix name of picture request is in the suffix list of file names In, and when picture request is not in white list, determine that picture request is that can obtain the request of WebP format picture.
Specifically, according to preset domain name list, suffix list of file names and white list, only when picture is requested while being met: Domain name comprising picture request in domain name list;Suffix list of file names includes the suffix name of picture request;It is not wrapped in white list It is requested containing the picture, at this point, determining that picture request is that can obtain the request of WebP format picture.
If picture request is once be unsatisfactory for any one condition, picture request is not that can obtain WebP format chart The request of piece.It optionally, include at least one of following when picture request meets;The domain name of the picture request is not described In domain name list, the suffix name of picture request is not in the suffix list of file names and the picture is requested in the white name When in list, determine that the picture request is that can not obtain the request of WebP format picture;Download pictures are requested according to the picture.
It is requested, can be quickly sieved by pre-set domain name list, suffix list of file names and white list primary dcreening operation picture as a result, Except not requesting the picture of WebP format picture to be requested, the efficiency that picture obtains is improved.
It is understood that the existing general picture for requesting common picture format of picture request, for example, jpg, png, The formats such as jpeg, in order to allow users to obtain WebP format picture, Ke Yizhi in the case where WebP format picture can be obtained Connect the picture request that the request for being directed toward the picture of common picture format is converted to and is directed toward WebP format picture.To in determination After request of the picture request for WebP format picture can be obtained, needs to request to be converted to by picture and be directed toward WebP format picture Request.Optionally, the modification picture request is that WebP format picture is requested, comprising: in the suffix of picture request The corresponding suffix name of addition WebP format or the content type in the header of picture request increase WebP format after name.
It can be directly specifically, picture request is converted to and is directed toward the conversion regime that WebP format picture is requested in picture Request is added .webp below or can also be added in the content type (Content-Type) of the header (Header) of request Webp and other conversion regimes etc. that can request picture to be converted to direction WebP format picture request.
In a specific example, configuration information are as follows:
{
" white ": [" https: //www.12345.com/12345.GIF "], (white list)
" host ": [" www.12345.com ", " www.1234.com "], (domain name list)
" extension ": [" jpg ", " jpeg ", " png "], (suffix list of file names)
}
If picture is requested are as follows: https: //www.12345.com/122.jpg, domain name www.12345.com, in domain In list of file names;The entitled jpg of suffix, in suffix list of file names;Picture request simultaneously is not in white list.To which picture request is true It is set to the picture request that can obtain WebP format, which is requested to modify are as follows: https: //www.12345.com/ 122.jpg.webp。
If picture is requested are as follows: https: //www.0000.com/122.jpg, domain name is www.0000.com not in domain In list of file names, so that picture request is not that can obtain the picture request of WebP format, picture request is without carrying out conversion behaviour Make.
If picture is requested are as follows: https: //www.12345.com/12345.jpg, which requests in white list, from And picture request is not that can obtain the picture request of WebP format, picture request is without carrying out conversion operation.
S120 downloads corresponding WebP format picture according to WebP format picture request.
In the present embodiment, the WebP format picture converted request is sent to the corresponding server of domain name, from this The WebP format picture that WebP format picture request is directed toward is downloaded in server.
The WebP format picture is converted to the picture and requested by S130 when picture container does not support WebP format Matched picture format.
Specifically, picture container can refer to the application program for showing picture in terminal device, optionally, it can refer to use The application program of family mobile terminal.In the picture for receiving the WebP format that server issues, first whether picture container can be judged Support WebP format, specifically can according to the determined property of picture container, such as, it can be determined that the request header in mobile phone browser In value include: image/webp, it is determined that the browser support WebP format, can normally show the picture of WebP format.
It is understood that the figure of the picture of common picture format is generally directed toward in the request of picture described in the present embodiment It is the picture format that picture container can be supported that piece request namely picture, which request matched picture format, thus, by WebP lattice Formula picture, which is converted to picture, requests matched picture format that can be supported by picture container.
Thus, it is possible to be supplied to use by the picture that the picture for not supporting picture container is converted to picture container support Family shows that picture normally, avoids since picture container does not support WebP format to cause WebP format picture can not be just Often the case where display.
In the present embodiment, optionally, described to turn the WebP format picture if picture container does not support WebP format It is changed to the picture and requests matched picture format, comprising: the WebP format picture is decoded;The picture is obtained to ask The suffix name asked, and be the corresponding picture format of the suffix name by decoded coding of graphics.
Specifically, picture decoding, which can refer to, is reduced into what it was represented for the image data (code, number) of specific format Picture material, coding of graphics can refer to the information such as number, code that image information is become to specific format.Wherein, decoding and Coding can be used specific purpose tool and execute corresponding operating realization.
In a specific example, in the case where picture container does not support WebP format, to the picture of webp format It is decoded, then judges the suffix name of the corresponding original picture request of the picture of WebP format, be encoded into corresponding picture format. If the corresponding original picture of the picture of WebP format requests https: //www.12345.com/122.jpg, then by WebP format Coding of graphics is at jpg format.
The embodiment of the present invention is corresponded to and is repaired by that can obtain the request of WebP format picture according to preset configuration information primary dcreening operation Be changed to that WebP format picture can be obtained, to download WebP format picture, and when picture container does not support WebP format, will under It carries WebP format picture and is converted to matched picture format, solve server in the prior art or picture container etc. and do not support The problem of WebP format picture causes client that can not show picture may be implemented with a wide range of precise using WebP format, section A large amount of server broadband resource and data space are saved, while avoiding the feelings due to not supporting webp format picture that can not show Condition, and server is avoided not support the request of webp format picture and cause to request the case where reporting an error, improve user experience.
On the basis of the above embodiments, optionally, the picture that will eventually determine is shown, is supplied to user, specifically It is display picture;If the picture of display is the picture in addition to WebP format, updated according to the corresponding picture request of the picture The preset configuration information.
It is understood that showing the corresponding picture request of the picture if the picture of display is not the picture of WebP format It cannot obtain or cannot be supported by picture container, at this point it is possible to not be WebP format according to the picture format of the picture of display The reason of it is corresponding update preset configuration information, for example, the picture of display is because of request the reason of not being the picture of WebP format The server of picture do not support to issue WebP format picture, which can be requested in corresponding domain name domain name list is added In, or can also be and white list is added in all picture requests that can not obtain WebP format.By finally showing result more New preset configuration information, the primary dcreening operation condition that can be requested with continuous updating picture facilitate subsequent quickly sift out that can obtain WebP lattice The picture of formula is requested, and is improved picture and is obtained efficiency.
In a concrete application scene, as illustrated in figure 1 c, terminal obtains picture and the specific method shown may include:
S151 generates picture request.
Application program can need to generate according to user picture request, and when being ready for sending picture request, namely not Before sending picture request, judge whether picture request can obtain WebP format picture.
S152 obtains preset configuration information.
Preset configuration information can pre-deposit in terminal, and concrete meaning is referred to preset configuration in above-described embodiment The description of information.
S153 judges whether the picture request is the request that can obtain WebP format picture according to preset configuration information; If it is, executing S155;Otherwise S154 is executed.
S154, download pictures execute S159.
It cannot be obtained in corresponding service when picture request does not need acquisition WebP format picture or picture request When WebP format picture, the picture that picture requests matched format is directly downloaded.
S155, modifying the picture request is that WebP format picture is requested.
S156 downloads WebP format picture.
S157, judges whether picture container supports WebP format, if it is, executing S159, otherwise executes S158.
The WebP format picture is converted to the picture of the picture format of picture container support by S158.
S159 shows picture.
Embodiment two
Fig. 2 is the schematic diagram of picture acquiring device provided by Embodiment 2 of the present invention.Embodiment is second is that realize in the present invention The related device of the image acquisition method of embodiment offer is provided.
Picture requests modified module 210, for when according to preset configuration information, determining that picture is requested is that can obtain WebP lattice When the request of formula picture, modifying the picture request is that WebP format picture is requested;
WebP format picture download module 220, for downloading corresponding WebP lattice according to WebP format picture request Formula picture;
Picture format adjusts module 230, for when picture container does not support WebP format, by the WebP format picture It is converted to the picture and requests matched picture format.
The embodiment of the present invention is corresponded to and is repaired by that can obtain the request of WebP format picture according to preset configuration information primary dcreening operation Be changed to that WebP format picture can be obtained, to download WebP format picture, and when picture container does not support WebP format, will under It carries WebP format picture and is converted to matched picture format, solve server in the prior art or picture container etc. and do not support The problem of WebP format picture causes client that can not show picture may be implemented with a wide range of precise using WebP format, section A large amount of server broadband resource and data space are saved, while avoiding the feelings due to not supporting webp format picture that can not show Condition, and server is avoided not support the request of webp format picture and cause to request the case where reporting an error, improve user experience.
Further, the configuration information includes: domain name list, suffix list of file names and white list;Domain name list is used The domain name of the server of WebP format is supported in storage;The suffix list of file names is for storing the picture that can be exchanged into WebP format The corresponding suffix name of format;The white list is used to store the picture request for requesting the format in addition to WebP format.
Further, the picture requests modified module 210, is also used to: when the picture is requested while meeting the figure The domain name of piece request is in domain name list and the suffix name of picture request is in the suffix list of file names, and described When picture request is not in white list, determine that the picture request is that can obtain the request of WebP format picture.
Further, the picture requests modified module 210, is also used to: adding after the suffix name of picture request The corresponding suffix name of WebP format or the content type in the header of picture request increase WebP format.
Further, the picture format adjusts module 230, is also used to: being decoded to the WebP format picture;It obtains The suffix name of the picture request is taken, and is the corresponding picture format of the suffix name by decoded coding of graphics.
Further, described device is also used to: including at least one of following when picture request meets;The picture is asked The domain name asked not in domain name list, the suffix name of picture request is in the suffix list of file names and the figure When piece request is in the white list, determine that the picture request is that can not obtain the request of WebP format picture;According to described Picture requests download pictures.
Further, described device is also used to: display picture;If the picture of display is the picture in addition to WebP format, The preset configuration information is updated according to the corresponding picture request of the picture.
Image acquisition method provided by any embodiment of the invention can be performed in above-mentioned picture acquiring device, has execution The corresponding functional module of image acquisition method and beneficial effect.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention three provides.Fig. 3, which is shown, to be suitable for being used to Realize the block diagram of the exemplary computer device 301 of embodiment of the present invention.The computer equipment 301 that Fig. 3 is shown is only one A example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 3, computer equipment 301 is showed in the form of universal computing device.The component of computer equipment 301 can To include but is not limited to: one or more processor or processing unit 302, system storage 303 connect not homologous ray group The bus 304 of part (including system storage 303 and processing unit 302).
Bus 304 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (Industry Standard Architecture, ISA) bus, microchannel architecture (Micro Channel Architecture, MCA) bus, enhancing Type isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local Bus and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Computer equipment 301 typically comprises a variety of computer system readable media.These media can be it is any can The usable medium accessed by computer equipment 301, including volatile and non-volatile media, moveable and immovable Jie Matter.
System storage 303 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (Random Access Memory, RAM) 305 and/or cache memory 306.Computer equipment 301 can be with It further comprise other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, Storage system 307 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 3 do not show, commonly referred to as " hard drive Device ").Although being not shown in Fig. 3, the disk for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided and driven Dynamic device, and to removable anonvolatile optical disk (such as compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other Optical medium) read-write CD drive.In these cases, each driver can be connect by one or more data medium Mouth is connected with bus 304.System storage 303 may include at least one program product, the program product have one group (such as At least one) program module, these program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 309 with one group of (at least one) program module 308, can store and deposit in such as system In reservoir 303, such program module 308 include --- but being not limited to --- operating system, one or more application program, It may include the reality of network environment in other program modules and program data, each of these examples or certain combination It is existing.Program module 308 usually executes function and/or method in embodiment described in the invention.
Computer equipment 301 can also be communicated with one or more external equipments 310 (such as keyboard, sensing equipment etc.), Can also be enabled a user to one or more equipment interacted with the computer equipment 301 communication, and/or with make the calculating Any equipment (such as network interface card, modem etc. that machine equipment 301 can be communicated with one or more of the other calculating equipment Deng) communication.This communication can be carried out by input/output (Input/Output, I/O) interface 312.Also, computer is set Standby 301 can also by network adapter 313 and one or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as internet) communication.As shown, network Adapter 313 is communicated by bus 304 with other modules of computer equipment 301.It should be understood that although being not shown in Fig. 3, it can With combine computer equipment 301 use other hardware and/or software module, including but not limited to: microcode, device driver, Redundant processing unit, external disk drive array, disk array (Redundant Arrays of Inexpensive Disks, RAID) system, tape drive and data backup storage system etc..
Processing unit 302 by the program that is stored in system storage 303 of operation, thereby executing various function application with And data processing, such as realize a kind of image acquisition method provided by the embodiment of the present invention.
Example IV
The embodiment of the present invention four provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The image acquisition method provided such as all inventive embodiments of the application is provided when sequence is executed by processor:
That is, realization when the program is executed by processor: when according to preset configuration information, determining that picture is requested is that can obtain When the request of WebP format picture, modifying the picture request is that WebP format picture is requested;According to the WebP format picture Corresponding WebP format picture is downloaded in request;When picture container does not support WebP format, the WebP format picture is converted Matched picture format is requested for the picture.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, RAM, read-only memory (Read Only of one or more conducting wires Memory, ROM), erasable programmable read only memory (Erasable Programmable Read Only Memory, EPROM), flash memory, optical fiber, portable CD-ROM, light storage device, magnetic memory device or above-mentioned any appropriate combination. In this document, it includes or the tangible medium of storage program that the program can be by that computer readable storage medium, which can be any, Instruction execution system, device or device use or in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be Any computer-readable medium other than computer readable storage medium, which can send, propagate or Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In --- wireless, electric wire, optical cable, radio frequency (RadioFrequency, RF) etc. or above-mentioned any appropriate group It closes.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? It is related in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN or WAN --- even It is connected to subscriber computer, or, it may be connected to outer computer (such as pass through internet using ISP Connection).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of image acquisition method characterized by comprising
When according to preset configuration information, determining that picture is requested is when can obtain the request of WebP format picture, to modify the picture Request is that WebP format picture is requested;
Corresponding WebP format picture is downloaded according to WebP format picture request;
When picture container does not support WebP format, the WebP format picture is converted into the picture and requests matched picture Format.
2. the method according to claim 1, wherein the configuration information includes: domain name list, suffix list of file names And white list;
Domain name list is used to store the domain name for the server for supporting WebP format;
The suffix list of file names is for storing the corresponding suffix name of picture format that can be exchanged into WebP format;
The white list is used to store the picture request for requesting the format in addition to WebP format.
3. according to the method described in claim 2, determining that picture request is it is characterized in that, described according to preset configuration information The request of WebP format picture can be obtained, comprising:
When the picture requests the domain name for meeting picture request simultaneously in domain name list and the picture is requested Suffix name determines picture request in the suffix list of file names, and when picture request is not in white list as that can obtain Take the request of WebP format picture.
4. the method according to claim 1, wherein the modification picture request is that WebP format picture is asked It asks, comprising:
The corresponding suffix name of addition WebP format or the header in picture request after the suffix name of picture request In content type increase WebP format.
5. the method according to claim 1, wherein described be converted to the picture for the WebP format picture Request matched picture format, comprising:
The WebP format picture is decoded;
The suffix name of the picture request is obtained, and is the corresponding picture format of the suffix name by decoded coding of graphics.
6. according to the method described in claim 2, it is characterized by further comprising:
It include at least one of following when picture request meets;The domain name of picture request not in domain name list, The suffix name of the picture request determines not in the suffix list of file names and when the picture is requested in the white list The picture request is that can not obtain the request of WebP format picture;
Download pictures are requested according to the picture.
7. the method according to claim 1, wherein further include:
Show picture;
If the picture of display is the picture in addition to WebP format, updated according to the corresponding picture request of the picture described default Configuration information.
8. a kind of picture acquiring device characterized by comprising
Picture requests modified module, for when according to preset configuration information, determining that picture is requested is that can obtain WebP format picture Request when, modifying picture request is that WebP format picture is requested;
WebP format picture download module, for downloading corresponding WebP format picture according to WebP format picture request;
Picture format adjusts module, for when picture container does not support WebP format, the WebP format picture to be converted to The picture requests matched picture format.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes the picture as described in any in claim 1-7 when executing described program Acquisition methods.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The image acquisition method as described in any in claim 1-7 is realized when execution.
CN201810775792.8A 2018-07-16 2018-07-16 Image acquisition method, device, computer equipment and storage medium Pending CN108965430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810775792.8A CN108965430A (en) 2018-07-16 2018-07-16 Image acquisition method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810775792.8A CN108965430A (en) 2018-07-16 2018-07-16 Image acquisition method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108965430A true CN108965430A (en) 2018-12-07

Family

ID=64481790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810775792.8A Pending CN108965430A (en) 2018-07-16 2018-07-16 Image acquisition method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108965430A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697101A (en) * 2019-01-16 2019-04-30 广州虎牙信息科技有限公司 Image display method, device, computer equipment and storage medium
CN110246266A (en) * 2019-06-19 2019-09-17 深圳市丰巢科技有限公司 A kind of information displaying method, device, equipment and medium
CN112612964A (en) * 2020-12-31 2021-04-06 武汉悦学帮网络技术有限公司 Picture display method and device, computer equipment and storage medium
CN112650957A (en) * 2019-10-11 2021-04-13 腾讯科技(深圳)有限公司 Image display method, image display device, computer-readable storage medium, and computer apparatus
CN112800372A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Page loading method and device and electronic equipment
CN113382180A (en) * 2021-06-01 2021-09-10 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium
CN113761417A (en) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 Picture loading method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201734A (en) * 2016-06-22 2016-12-07 北京小米移动软件有限公司 Sharing files method and device
CN106598567A (en) * 2016-11-03 2017-04-26 广州凯耀资产管理有限公司 Method and device for displaying page elements on terminal equipment
CN107911456A (en) * 2017-11-17 2018-04-13 深圳泉眼体育运营管理有限公司 Flow optimization method, device, terminal device and the storage medium of picture loading
CN108153761A (en) * 2016-12-05 2018-06-12 阿里巴巴集团控股有限公司 Access the method, apparatus of network picture and response to network picture access

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201734A (en) * 2016-06-22 2016-12-07 北京小米移动软件有限公司 Sharing files method and device
CN106598567A (en) * 2016-11-03 2017-04-26 广州凯耀资产管理有限公司 Method and device for displaying page elements on terminal equipment
CN108153761A (en) * 2016-12-05 2018-06-12 阿里巴巴集团控股有限公司 Access the method, apparatus of network picture and response to network picture access
CN107911456A (en) * 2017-11-17 2018-04-13 深圳泉眼体育运营管理有限公司 Flow optimization method, device, terminal device and the storage medium of picture loading

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697101A (en) * 2019-01-16 2019-04-30 广州虎牙信息科技有限公司 Image display method, device, computer equipment and storage medium
CN110246266A (en) * 2019-06-19 2019-09-17 深圳市丰巢科技有限公司 A kind of information displaying method, device, equipment and medium
CN112650957A (en) * 2019-10-11 2021-04-13 腾讯科技(深圳)有限公司 Image display method, image display device, computer-readable storage medium, and computer apparatus
CN112650957B (en) * 2019-10-11 2023-11-21 腾讯科技(深圳)有限公司 Image display method, apparatus, computer-readable storage medium, and computer device
CN112612964A (en) * 2020-12-31 2021-04-06 武汉悦学帮网络技术有限公司 Picture display method and device, computer equipment and storage medium
CN113761417A (en) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 Picture loading method and device
CN112800372A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Page loading method and device and electronic equipment
CN112800372B (en) * 2021-02-03 2023-06-13 网易(杭州)网络有限公司 Page loading method and device and electronic equipment
CN113382180A (en) * 2021-06-01 2021-09-10 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium
CN113382180B (en) * 2021-06-01 2023-02-28 海南车智易通信息技术有限公司 Picture processing method, computing device and readable storage medium

Similar Documents

Publication Publication Date Title
CN108965430A (en) Image acquisition method, device, computer equipment and storage medium
US11909820B2 (en) Method and apparatus for execution of applications in a cloud system
US20110087726A1 (en) Cloud server, client terminal, device, and method of operating cloud server and client terminal
CN102884529B (en) For social activity summary can adaptive layout
WO2020233142A1 (en) Multimedia file playback method and apparatus, electronic device, and storage medium
US8775545B1 (en) Image hosting for cross-platform display over a communication network
CN108984174A (en) Cross-platform application creation method, device, server and storage medium
JP2016500190A (en) Information presentation method, apparatus, program, and recording medium
US20210365518A1 (en) Document input content processing method and apparatus, electronic device, and storage medium
TW201319823A (en) Cloud-based sysyem for providing virtual desktop, method for playing multimedia on virtual desktop and computer readable storage medium storing thereof
US10178431B2 (en) Hybrid stream delivery
US20100199151A1 (en) System and method for producing importance rate-based rich media, and server applied to the same
CN110809189A (en) Video playing method and device, electronic equipment and computer readable medium
US20200045350A1 (en) Prefetching video segments to reduce playback startup delay
JP2015517165A (en) User interface web service
US8706803B1 (en) Client-side generation of preliminary version of network page
US20180248947A1 (en) Metered Network Synchronization
US10666707B2 (en) Nonconsecutive file downloading
CN114071190B (en) Cloud application video stream processing method, related device and computer program product
CN111309406A (en) Event processing method and device of application program and electronic equipment
KR102247886B1 (en) System for cloud streaming service, method of cloud streaming service based on type of image and apparatus for the same
CN111008934B (en) Scene construction method, device, equipment and storage medium
CN109951737B (en) Video processing method, video processing device, electronic equipment and computer-readable storage medium
US10509826B2 (en) Server device, client device, information processing method, and recording medium
KR20160131827A (en) System for cloud streaming service, method of image cloud streaming service using alpha level of color bit and apparatus for the same

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181207