CN102984151B - Method and the server of image data are provided to computing terminal - Google Patents

Method and the server of image data are provided to computing terminal Download PDF

Info

Publication number
CN102984151B
CN102984151B CN201210489225.9A CN201210489225A CN102984151B CN 102984151 B CN102984151 B CN 102984151B CN 201210489225 A CN201210489225 A CN 201210489225A CN 102984151 B CN102984151 B CN 102984151B
Authority
CN
China
Prior art keywords
image data
terminal
computing terminal
picture
computing
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.)
Expired - Fee Related
Application number
CN201210489225.9A
Other languages
Chinese (zh)
Other versions
CN102984151A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210489225.9A priority Critical patent/CN102984151B/en
Publication of CN102984151A publication Critical patent/CN102984151A/en
Application granted granted Critical
Publication of CN102984151B publication Critical patent/CN102984151B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and server providing image data to computing terminal, the method includes: receiving the picture access request that computing terminal sends, picture access request includes the terminal type information of pictorial information to be accessed and computing terminal;Terminal type information according to computing terminal determines whether picture is carried out form conversion;When determining that picture carries out form to be changed, obtain the original image data corresponding with the pictorial information in picture access request, according to predetermined form transformational rule, original image data are converted to the image data of predetermined format, wherein, the byte number of the image data of predetermined format is less than the byte number of original image data;The image data of predetermined format is sent to computing terminal.Owing to data volume is compared with big and cause the problem that loading velocity is slow and consumption network flow is many when thus solving mobile terminal accessing picture, it is possible to make mobile terminal Load Image rapidly, and flow consumption when reducing picture access.

Description

Method and the server of image data are provided to computing terminal
Technical field
The present invention relates to image processing field, be specifically related to a kind of side that image data is provided to computing terminal Method and server.
Background technology
Along with the high speed development of mobile device, type and the function of mobile device are more and more abundanter.At present, Most mobile devices are provided with picture browsing function, and therefore, increasing people is come by mobile device Browsing pictures.
But, due to the limitation of mobile device itself, such as, hardware configuration and the network bandwidth can not show a candle to Some fixing equipment (such as PC), therefore, use mobile device browsing pictures, especially browse one During the picture that data volumes are bigger a bit, it is easy to occur that picture loads and slowly even load failed situation.And And, owing to the data volume of picture is relatively big, compared with browsing word, browsing pictures needs to consume more net Network flow, but the network traffics of the most a lot of mobile device are all limited, so, frequent browse graph Sheet easily causes network traffics overrun, thus increases the most extra rate for user.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or at least partly Ground solves the method to computing terminal offer image data of the problems referred to above and corresponding server.
According to one aspect of the present invention, it is provided that a kind of method providing image data to computing terminal, Including step: receiving the picture access request that computing terminal sends, picture access request includes to be accessed Pictorial information and the terminal type information of computing terminal;Terminal type information according to computing terminal determines Whether picture is carried out form conversion;When determining that picture carries out form to be changed, obtain and picture access The original image data that pictorial information in request is corresponding, according to predetermined form transformational rule by original Image data is converted to the image data of predetermined format, wherein, the byte number of the image data of predetermined format Byte number less than original image data;And the image data of predetermined format is sent to computing terminal.
Alternatively, picture access request also includes the network type information of computing terminal;And the method is also Including: determine whether picture is carried out form conversion according to the network type information of computing terminal.
According to a further aspect in the invention, it is provided that a kind of server that image data is provided to computing terminal, Including: network interface, be suitable to receive the picture access request that computing terminal sends, picture access request bag Include the terminal type information of pictorial information to be accessed and computing terminal, and server is generated The image data of predetermined format is transferred to computing terminal;Type decision device, is suitable to the end according to computing terminal End type information determines whether picture is carried out form conversion;Picture processor, is suitable to when type decision device Determine time picture is carried out form conversion, obtain corresponding with the pictorial information in picture access request former Original image data are converted to the figure of predetermined format by beginning image data according to predetermined form transformational rule Sheet data, wherein, the byte number of the image data of predetermined format is less than the byte number of original image data; And picture memory, be suitable to store the original image data that pictorial information is corresponding.
Alternatively, picture access request also includes the network type information of computing terminal, and type decision device is also The network type information according to computing terminal that is suitable to determines whether picture is carried out form conversion.
Method and corresponding server, Ke Yigen that image data is provided to computing terminal according to the present invention Determine according to the terminal type information of computing terminal and picture is carried out form conversion, in order to reduce image data Byte number, cause loading velocity owing to data volume is relatively big when thus solving mobile terminal accessing picture Slow and that consumption network flow is many problems, achieve and mobile terminal can be made to Load Image rapidly, and fall The beneficial effect that flow during low picture access consumes.
It addition, the method according to the invention and server, it is also possible to come according to the network type of computing terminal Determine and picture is carried out form conversion, when computing terminal is visited by slow network or network costly When asking picture, it is possible to reduce image data transmission quantity, thus load when solving mobile terminal accessing picture The problem that speed is slow and consumption network flow is many, achieves and mobile terminal can be made to Load Image rapidly, And the beneficial effect that flow when reducing picture access consumes.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the skill of the present invention Art means, and can being practiced according to the content of description, and in order to allow, the present invention's is above and other Objects, features and advantages can become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit for this Field those of ordinary skill will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, And it is not considered as limitation of the present invention.And in whole accompanying drawing, be denoted by the same reference numerals Identical parts.In the accompanying drawings:
Fig. 1 shows the method stream providing image data according to an embodiment of the invention to computing terminal Cheng Tu;
Fig. 2 shows the logo of Baidu effect signal before and after form is changed in one embodiment of the invention Figure;
Fig. 3 show according to the present invention provide to computing terminal provide image data server and with The schematic diagram of the computing terminal that this server is connected.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows The exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and not Should be limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to more thoroughly Understand the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 shows the method stream providing image data according to an embodiment of the invention to computing terminal Cheng Tu.
As it is shown in figure 1, the method starts from step S110, in step s 110, receive computing terminal to send out The picture access request sent, this picture access request includes pictorial information to be accessed and computing terminal Terminal type information.
Alternatively, step S110 can be accomplished in that when the user of computing terminal needs by meter Calculate terminal access picture time, it will usually by computing terminal install browser click on certain hyperlink or Input the modes such as certain search word, thus triggered computing terminal to the server etc. providing service by browser Equipment sends picture access request, at least needs to comprise the picture that user is to be accessed in this picture access request Information, in order to server can find this picture and be supplied to user, and the terminal type of computing terminal Information, in order to server understands the terminal type of computing terminal.Alternatively, the figure that computing terminal sends Sheet access request constructs based on http protocol, and for indicating the word of the terminal type information of computing terminal Section is included in user agent (user-agent, the hereinafter referred to as UA) part of http protocol.Namely Say, the picture access request sent during the every secondary access picture of computing terminal all comprises UA information.
For the ease of understanding the present invention, below first simply introduce the particular content of UA information.UA is One special head of string, can comprise in this head of string and a series of be related to the relevant of computing terminal Information, such as, operating system that computing terminal is used and version, cpu type, browser type and Version, browser renders engine, browser language, browser plug-in etc..Under normal circumstances, the mark of UA Quasiconfiguaration is: browser identifies;Operating system identifies;Secret grade identifies;Browser language;Render Engine identification;Version information, wherein, browser mark is shape such as Mozilla/5.0 or Opera/7.54 etc. The word string of labelling navigator product;Common operating system mark includes: FreeBSD, Linux, Mac, Solaris and Windows etc.;Secret grade mark such as indicates without safety encryption with " N ", uses " I " table Safety of giving the impression of weakness encryption and " U " represent strong safe encryption etc.;Browser language is the preference of browser The language specified in choice of language in conventional tags;Rendering engine can be such as Presto rendering engine, Form is: Presto/ version number;Browser version information shows the true version information of browser, form For Version/ version number.
In the above-mentioned range of information that UA is comprised, maximally related with the present invention is to reflect calculating The information of the terminal type of terminal, such as, operating system identifies.Can be the most square by operating system mark Just the terminal type of computing terminal is identified.At present, the operating system of the mobile terminal of main flow on market General employing iOS(Apple Macintosh operating system) or Android(*** Android operation system), therefore, If operating system is above two type, then can determine that the terminal type of computing terminal is for mobile whole End.Such as, the UA information shape comprised in the picture access request that Android user sends when accessing webpage Such as Mozilla/5.0 (Linux;U;Android 3.1;zh-cn;GT-P7310 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.1, its In, " Android " field explicitly indicates that out what the computing terminal equipment of this picture access request of transmission was used Operating system is android system, therefore, represents that the terminal type of this computing terminal is mobile terminal; The UA information shape comprised in the picture access request sent when Iphone user accesses webpage is such as Mozilla/5.0(iPhone;CPU iPhone OS 5_0 like Mac OS X)AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3, wherein, " iPhone " field explicitly indicates that out that the computing terminal equipment of this picture access request of transmission is used IPhone equipment, the operating system of its correspondence is iOS system, therefore, also illustrates that the end of this computing terminal End type is mobile terminal.It addition, in order to improve the accuracy that type judges further, it is also possible to enter one Step combines other information in UA, such as version information etc. and carries out comprehensive descision.
Employing UA information described above indicates the mode simply one of the terminal type of computing terminal to show The mode of meaning property, can also use other various ways to indicate the terminal of computing terminal in a practical situation Type, for example, it is also possible to directly arrange a field in picture access request, is specifically designed to instruction eventually End type.
After having performed above-mentioned steps S110, in the step s 120, according to the terminal type of computing terminal Information determines whether picture is carried out form conversion.In the present embodiment picture is carried out the master of form conversion Syllabus is the byte number in order to change image data, is beneficial to network transmission.It is additionally, since inhomogeneity Software and hardware difference between the computing terminal of type, causes performance during its browsing pictures the most incomplete same, The feature that therefore, it can the terminal type according to computing terminal determines whether picture is carried out form conversion.
Such as, the screen size of mobile terminal is relatively small, resolution is relatively low, and normal conditions Under, the hardware configuration of mobile terminal and processing speed are all less than fixed terminal.So, when calculating eventually When the terminal type of end is mobile terminal, it may be determined that picture is carried out form conversion, in order to reduce picture The byte number of data, thus reduce customer flow rate, shorten picture loading on mobile terminals time-consuming. Owing to the screen size of fixed terminal (such as desktop PC) is relatively big, resolution is the most of a relatively high, and Hardware configuration and processing speed are preferable, so, when the terminal type of computing terminal is for fixing whole During end, it may not be necessary to picture is carried out form conversion, in order to ensure picture quality.Specifically, in order to Step S120 determine easily for whether various types of computing terminals perform form conversion, can be with thing First arrange and store a terminal type and whether synopsis between form conversion, by searching this comparison Table, determines that corresponding terminal type is the need of carrying out form conversion.
In step s 130, when determining that picture carries out form to be changed, obtain and in picture access request The corresponding original image data of pictorial information, according to predetermined form transformational rule by original image number According to being converted to the image data of predetermined format, wherein, the byte number of the image data of predetermined format is less than former The byte number of beginning image data.
In the present embodiment, can store, by picture memory, the original image that pictorial information is corresponding Data, obtain corresponding with the pictorial information in picture access request former by accessing this picture memory Beginning image data.Wherein, this picture memory can be a single server, is specifically designed to storage Image data, it is also possible to be some station servers, every station server storage part divides image data.
Specifically, predetermined form transformational rule is to set according to the feature of picture format in advance.If Put the purpose of form transformational rule primarily to picture format more for byte number is converted to byte number relatively Few picture format, in order to network transmits.Wherein, when arranging form transformational rule, can basis The feature of various picture formats arranges a converting form, when the picture letter asked in picture access request When the form of the original image data that manner of breathing is corresponding is on the books in this converting form, directly according to this form Determine the image data form after conversion.
After original image data are converted to the image data of predetermined format, in step S140, will step The image data of the predetermined format generated in rapid S130 is sent to computing terminal.
Just can be according to the type characteristic of computing terminal by the way of above, to original image to be accessed Data carry out certain form conversion, in order to reduce the byte number of original image data, use to reach to save The access time at family, reduce the effect of network traffics.
In step S130 picture is carried out form conversion concrete principle and realization side is described in detail below Formula.
First, the basic conception about image is simply introduced.Image is made up of pixel, and pixel is figure Minimum information unit in Xiang, it is possible to use different color model describes pixel, at computer graphical On, RGB color model be most frequently with a kind of color model.In RGB color model, adopt By the mode of the quantity comprising red (R), green (G) and blue (B), one pixel is described.R, G and B is referred to as composition (being also called passage), and the scope of the intensity level of every kind of passage is between 0-255.Will not The combination of channels of same intensity is together, it is possible to obtain different colors.Such as: redness be rgb (255, 0,0) or hexadecimal #FF0000, blueness is rgb (0,0,255) or hexadecimal #0000FF, The shade of Lycoperdon polymorphum Vitt has three identical color value, such as, and rgb (238,238,238) or hexadecimal #EEEEEE.When using RGB color model, can use in a figure more than 16,000,000 kinds The color that (255*255*255 or 224 can obtain 16,777,216 kinds of combinations) is different.Generally energy The picture format enough supporting so multiple color is called true color image form, such as JPEG and true color class The PNG of type broadly falls into true color image form.
In order to save memory space, on the basis of true color image form, also been proposed palette image lattice Formula.Those unique color extraction in image are gone out by a technology that palette image form is used exactly Setting up a list, this list is generally termed palette (being referred to as index).There is this Colors list, it is possible to by the entry in palette and each pixel again being mated, reach again to paint Make the purpose of whole picture.
Owing to palette image form utilizes index technology to save memory space, therefore, real in the present invention Executing in example, the original image data corresponding when the pictorial information in the picture access request that user sends are During true color image form, palette image lattice can be converted into according to predetermined form transformational rule The data of formula, to reach to reduce the purpose of byte number.
It addition, when the corresponding original image data of pictorial information in the picture access request that user sends During for single-frame images interchange format GIF form, can be according to predetermined form transformational rule by original image Data are converted to the image data of transplantation network graphic PNG8 form;When the picture access that user sends When the corresponding original image data of pictorial information in request are multiframe GIF form, can be according to predetermined Form transformational rule maintain original image data form constant.Concrete reason is, PNG8 form removes Do not support beyond animated function, almost contain all functions of GIF form, and PNG8 form Also support alpha transparent format (i.e. RGBA form, it is transparent that A therein represents alpha), more important , the compression ratio of PNG8 form is generally higher than the compression ratio of GIF form, therefore, for a width The image data of GIF form, after being converted to the image data of PNG8 form, byte number will substantially subtract Lack, and picture quality also will not produce significant change.
Due to the These characteristics of PNG8 form, can be used to process the image data of single frames GIF form. And for the image data of multiframe GIF form, owing to PNG8 form does not support animation, therefore, at this In order to retain the animation effect of multiframe GIF form in embodiment, can not be to the picture of multiframe GIF form Data are changed.
Fig. 2 shows the logo of Baidu effect schematic diagram before and after form is changed.Wherein, the figure on the left side Being the original image data of GIF form, byte number is 1630B, and the figure on the right is the PNG8 after conversion The image data of form, byte number is 1431B.As can be seen here, after form is changed, picture Byte number decreases about 12%, but picture quality there is no substantially change.Specifically, can pass through Imagemagick carries out the conversion of picture format as handling implement, or, it would however also be possible to employ other soft Part completes the conversion of picture format.
The conversion regime that single frames GIF form is converted to PNG8 form is essentially described above.For The image data of the extended formatting in addition to single frames GIF form, owing to color is typically relatively abundanter, generally More than 256 colors, and PNG8 at most can only support 256 kinds of colors, if by the picture number of extended formatting It is PNG8 form according to (such as png, jpg form) unsteady state operation, picture may be caused significantly Color distortion.Therefore, in the present embodiment, image data for extended formatting can not be changed.When So, if in the case of less demanding to picture color, it is also possible to the image data of extended formatting is turned It is changed to the image data of PNG8 form.
In addition to the conversion regime that single frames GIF form is converted to PNG8 form described above, this Skilled person can also determine other form conversion regime flexibly according to practical situation, as long as can Realize the conversion little byte number of retraction and be beneficial to the purpose of network transmission.
Construction features below in conjunction with gif file introduces how to judge that a gif file is single frames The file of GIF form or the file of multiframe GIF form.
The structure of one gif file can be divided into file header (File Header), GIF data stream (GIF Data And three parts of file terminator (Trailer) Stream).File header comprises gif file signature (Signature) With version number (Version);GIF data stream by control identifier, picture block (Image Block) and Other some extension blocks composition;File terminator only one of which value is the character (" of 0 × 3B;") represent The end of file.Table 1 shows the composition structure of a gif file:
Table 1
Emphasis says down GIF data stream part below: by table 1 it can be seen that GIF data stream part (GIF Data Stream) mainly include logical screen identification symbol (Logical Screen Descriptor), global color row The parts such as table (Global Color Table) and image identifier (Image Descriptor).Wherein, image Identifier portion is the closest with the relation of the present invention, can be seen that this gif file belongs to by this part Single frames GIF form or multiframe GIF form.Specifically, several figures can be comprised in a gif file Followed by the identifier of next images after terminating as a, images, pictureidentification accords with 0 × 2C (", ") Character starts, the character of definition and then its image, including inclined relative to logical screen border of image Shifting amount, image size and with or without local color list and colors list size, be made up of 10 bytes.
Table 2 shows the example of the identifier of an image:
Table 2
By the image identifier part of gif file, it is possible to check that this gif file wraps altogether easily Containing how many frame data, the starting point of each frame data and end point, this GIF can be determined accordingly easily File belongs to single frames GIF form or multiframe GIF form, thereby determines whether to need to perform form conversion.
Alternatively, in order to determine whether picture is carried out form conversion time, it is possible to better adapt to use The practical situation of family online, all right in the picture access request sent in step S110 of the present embodiment Farther include the network type information of computing terminal, correspondingly, farther include in step S 120: Network type information according to computing terminal determines whether picture is carried out form conversion.
Specifically, in step s 110, the network type information of computing terminal can comprise with parametric form In picture access request.Such as, the browser of computing terminal can be by Android system Network environment used by ConnectivityManager function identification user be mobile network environment (such as 2G, 3G etc.) or wifi network environment, wherein, ConnectivityManager function is for management and network Connect relevant operation.When the network environment used by computing terminal identifies user is mobile network, The picture access request sent comprises http GET [' NW ']=' MBIL ' parameter information;Work as computing terminal Identify the network environment used by user when being wifi network, in the picture access request sent, comprise http GET [' NW ']=' WIFI ' parameter information.
Determine the network type of computing terminal according to picture access request after, in the step s 120, root When determining whether picture is carried out form conversion according to network type information, it is also possible to pre-set and store one Synopsis between individual network type information and whether form conversion, searches this synopsis, determines and network The format conversion case that type information is corresponding.Such as, when user is in wifi network environment, it is not necessary to enter Row format is changed;When user is in mobile network environment, need to carry out form conversion.At setting network During form transformational rule corresponding to type information, mainly consider the shadow that image data is transmitted by network environment Ringing, such as, wifi network belongs to WLAN, and transmission speed is very fast, therefore, it can not to original Image data performs format conversion operation, although directly provide original image to need to transmit more data volume, But owing to the transmission conditions of wifi network are preferable, transmission speed is fast, therefore, even if transmitting more data Amount, also will not make user wait the very long time;And mobile network is for wifi network, transmission Speed is slightly slow, therefore, in order to reduce the waiting time of user, and can be to the image data in mobile network Execution form is changed.
The impact of network environment is considered when determining whether picture is carried out form conversion, can be according to user The feature of place network, for the customized more suitably picture format of computing terminal, thus improves user Satisfaction.When implementing, it is also possible to consider the signal quality of network, transmission bandwidth etc. multiple Because usually setting picture format.
Specifically, when picture access request comprises network type information, determining whether picture is entered During row format conversion, can individually determine according to network type information, it is also possible to believe according to network type Cease the combination with both terminal type information to determine.When according to network type information and terminal type information When the combination of the two determines whether to carry out picture form conversion, network type information described above with The synopsis between synopsis and terminal type information and picture format between picture format can be in conjunction with In a table, in table after bonding, according to network type information and these two letters of terminal type information Breath determines whether the picture format after picture carries out form conversion and conversion jointly.
In addition, it is necessary to explanation, determine whether that picture is carried out form turns according to network type information With according to terminal type information, the mode changed determines whether that the mode that picture carries out form conversion is equal Important.Accordingly, as alternative, the picture access request in the method for the present invention can also only be wrapped Containing network type information, correspondingly, only determine whether figure according to network type information in subsequent step Sheet carries out form conversion.
In superincumbent description, it is to carry out as mobile terminal or as a example by fixed terminal with the type of computing terminal Describing, in a practical situation, the type of computing terminal can be diversified, such as, calculates eventually The terminal type information of end can include one of the following or multiple: portable computing device, PDA, Tablet computing device, smart mobile phone mobile terminal, laptop computer and desk computer, for this The computing terminal of a little types, can be respectively provided with corresponding form in conjunction with the software and hardware configuration of computing terminal Transformational rule.
It addition, the terminal type of computing terminal can also be divided by terminal screen, such as, calculate eventually The terminal type information of end can also include: the screen size of computing terminal, and/or the screen of computing terminal Length-width ratio.According to the screen size of computing terminal, computing terminal can be divided into giant-screen computing terminal With the small screen computing terminal, for giant-screen computing terminal, picture can not be carried out form conversion, with Improve picture quality;For the small screen computing terminal, picture can be carried out form conversion, add to improve Carry speed and reduce network traffics.The length-width ratio of the screen according to computing terminal, can be divided into computing terminal Widescreen computing terminal and non-widescreen computing terminal, according to widescreen and the feature of non-widescreen computing terminal, arranged Corresponding form transformational rule.Such as, according to size and the length-width ratio of screen, the clothes of network side can be made Picture is compressed and cutting by business device end, by compression, makes picture quality be more suitable for the size of screen, By cutting, dimension of picture is made to be more suitable for the length-width ratio of screen, so, when computing terminal shows picture, Not only loading velocity is fast, and, dimension of picture also size with screen matches.Especially for widescreen Computing terminal, after picture have passed through compression and cutting etc. processes, when display is on widescreen computing terminal The situations such as metamorphopsic distortion would not occur, thus improve the display effect of picture.
Meanwhile, in superincumbent description, it is to carry out as mobile network or as a example by wifi network with network type Describing, in a practical situation, network type may be abundanter, it may for example comprise following network type In one or more: GPRS, CDMA, 3G, 4G and WIFI network and various expired air net Network.Specifically, for different networks can consider the frequency band range of various network, transmission speed, Transmission bandwidth, signal quality and disturbed condition etc. are because being usually respectively the form that various network settings are different Transformational rule, thus seeking balance between loading velocity and picture quality, to adapt to network transmission demand, Improve user satisfaction.
The method provided by the embodiment of the present invention, can be worked as according to the feature of computing terminal, network condition In one or two because usually determining whether picture is carried out form conversion, lattice can be passed through when needed The mode of formula conversion improves the access speed of user, saves the network bandwidth and network traffics, and then saves Network rate.
Fig. 3 show that the embodiment of the present invention provides to computing terminal provide image data server and Structural representation with the computing terminal that this server is connected.As it is shown on figure 3, server 200 includes: Network interface 210, type decision device 220, picture processor 230.Alternatively, also include that picture stores Device 240.
Network interface 210 receives the picture access request that computing terminal 300 sends, this picture access request Including pictorial information to be accessed and the terminal type information of computing terminal 300, and network interface 210 The image data of predetermined format being further adapted for being generated server is transferred to computing terminal 300.When calculating eventually When the user of end 300 needs to access picture by computing terminal 300, it will usually by computing terminal 300 The browser of upper installation is clicked on certain hyperlink or inputs the modes such as certain search word, thus is touched by browser Sending out computing terminal 300 provides the network interface 210 in the server 200 of service to send picture in Fig. 3 Access request, at least needs in this picture access request to comprise the pictorial information that user is to be accessed, in order to clothes Business device 200 can find this picture and be supplied to user.Picture access request also includes computing terminal 300 Terminal type information, in order to server 200 understands the terminal type of computing terminal 300.Alternatively, The picture access request that computing terminal 300 sends constructs based on http protocol, and is used for indicating calculating eventually The field of terminal type information of end 300 be included in http protocol user agent (user-agent, with Lower abbreviation UA) in part.It is to say, the picture sent during the every secondary access picture of computing terminal 300 Access request all comprises UA information.About the particular content of UA information and indicated by UA information The method of terminal type can refer to the description of relevant portion in embodiment of the method, and here is omitted.It addition, In addition to using UA information to indicate the terminal type of computing terminal, can also adopt in a practical situation The terminal type of computing terminal is indicated with other various ways, for example, it is also possible to directly in picture access Request arranges a field, is specifically designed to instruction terminal type.
Type decision device 220 obtains the terminal type letter of the computing terminal 300 that picture access request includes Breath, and determine whether picture is carried out form conversion according to the terminal type information of computing terminal.Specifically, When terminal type information is included in UA information, can be by reading the UA information of picture access request In for identifying the field of terminal type to determine terminal type, such as, if comprising " Android " field Or " iPhone " field then represents that terminal type is mobile terminal.Wherein, the concrete form of UA information with And type decision device determines whether that the concrete mode carried out picture when form is changed can refer to embodiment of the method The description of middle appropriate section.
Picture processor 230 type decision device 220 determine picture is carried out form conversion time, obtain with The original image data that pictorial information in picture access request is corresponding, according to predetermined form conversion rule Then original image data are converted to the image data of predetermined format, wherein, the image data of predetermined format Byte number less than the byte number of original image data, and by network interface 210 by the figure of predetermined format Sheet data are transferred to computing terminal 300.
In the present embodiment, corresponding original of pictorial information can be stored by picture memory 240 Image data, picture processor 230 obtains and picture access request by accessing this picture memory 240 In the corresponding original image data of pictorial information.Wherein, this picture memory 240 can be one Individually server, is specifically designed to storage image data, it is also possible to be some station servers, every service Device storage part divides image data.
Wherein, picture processor 230 carries out the concrete mode of form conversion and can refer to method and implement data The description of appropriate section in example, here is omitted.
Alternatively, in order to determine whether picture is carried out form conversion time, it is possible to better adapt to use The practical situation of family online, can further include in the picture access request sent in the present embodiment The network type information of computing terminal, correspondingly, type decision device is further adapted for according to computing terminal Network type information determines whether picture is carried out form conversion.
Specifically, the network type information of computing terminal can be included in picture access request with parametric form In.Such as, the browser of computing terminal can be by the ConnectivityManager in Android system Network environment used by function identification user is mobile network environment or wifi network environment, wherein, ConnectivityManager function connects relevant operation for management with network.When computing terminal identification Go out the network environment used by user when being mobile network, in the picture access request sent, comprise http GET [' NW ']=' MBIL ' parameter information;It is wifi when computing terminal identifies the network environment used by user During network, in the picture access request sent, comprise http GET [' NW ']=' WIFI ' parameter information.
Determine the network type of computing terminal according to picture access request after, type decision device is according to net When network type information determines whether to carry out picture form conversion, can pre-set and store a network Synopsis between type information and whether form conversion, searches this synopsis, determines and network type letter The format conversion case that breath is corresponding.Such as, when user is in wifi network environment, it is not necessary to carry out form Conversion;When user is in mobile network environment, need to carry out form conversion.Believe in setting network type When ceasing corresponding form transformational rule, mainly consider the impact that image data is transmitted by network environment, example As, wifi network belongs to WLAN, and transmission speed is very fast, therefore, it can not to original image number According to performing format conversion operation, although directly provide original image to need to transmit more data volume, but by Preferable in the transmission conditions of wifi network, transmission speed is fast, therefore, even if transmitting more data volume, Also user will not be made to wait the very long time;And mobile network is for wifi network, transmission speed Slightly slow, therefore, in order to reduce the waiting time of user, the image data in mobile network can be performed Form is changed.
The impact of network environment is considered when determining whether picture is carried out form conversion, can be according to user The feature of place network, for the customized more suitably picture format of computing terminal, thus improves user Satisfaction.When implementing, it is also possible to consider the signal quality of network, transmission bandwidth etc. multiple Because usually setting picture format.
Specifically, when picture access request comprises network type information, determining whether picture is entered During row format conversion, can individually determine according to network type information, it is also possible to believe according to network type Cease the combination with both terminal type information to determine.When according to network type information and terminal type information When the combination of the two determines whether to carry out picture form conversion, network type information described above with The synopsis between synopsis and terminal type information and picture format between picture format can be in conjunction with In a table, in table after bonding, according to network type information and these two letters of terminal type information Breath determines whether the picture format after picture carries out form conversion and conversion jointly.
In addition, it is necessary to explanation, determine whether that picture is carried out form turns according to network type information With according to terminal type information, the mode changed determines whether that the mode that picture carries out form conversion is equal Important.Accordingly, as alternative, the picture access request in the method for the present invention can also only be wrapped Containing network type information, correspondingly, only determine whether figure according to network type information in subsequent step Sheet carries out form conversion.
In superincumbent description, it is to carry out as mobile terminal or as a example by fixed terminal with the type of computing terminal Describing, in a practical situation, the type of computing terminal can be diversified, such as, calculates eventually The terminal type information of end can include one of the following or multiple: portable computing device, PDA, Tablet computing device, smart mobile phone mobile terminal, laptop computer and desk computer, for this The computing terminal of a little types, can be respectively provided with corresponding form in conjunction with the software and hardware configuration of computing terminal Transformational rule.
It addition, the terminal type of computing terminal can also be divided by terminal screen, such as, calculate eventually The terminal type information of end can also include: the screen size of computing terminal, and/or the screen of computing terminal Length-width ratio.According to the screen size of computing terminal, computing terminal can be divided into giant-screen computing terminal With the small screen computing terminal, for giant-screen computing terminal, picture can not be carried out form conversion, with Improve picture quality;For the small screen computing terminal, picture can be carried out form conversion, add to improve Carry speed and reduce network traffics.The length-width ratio of the screen according to computing terminal, can be divided into computing terminal Widescreen computing terminal and non-widescreen computing terminal, according to widescreen and the feature of non-widescreen computing terminal, arranged Corresponding form transformational rule.Such as, according to size and the length-width ratio of screen, the clothes of network side can be made Picture is compressed and cutting by business device end, by compression, makes picture quality be more suitable for the size of screen, By cutting, dimension of picture is made to be more suitable for the length-width ratio of screen, so, when computing terminal shows picture, Not only loading velocity is fast, and, dimension of picture also size with screen matches.Especially for widescreen Computing terminal, after picture have passed through compression and cutting etc. processes, when display is on widescreen computing terminal The situations such as metamorphopsic distortion would not occur, thus improve the display effect of picture.
Meanwhile, in superincumbent description, it is to carry out as mobile network or as a example by wifi network with network type Describing, in a practical situation, network type may be abundanter, it may for example comprise following network type In one or more: GPRS, CDMA, 3G, 4G and WIFI network and various expired air net Network.Specifically, for different networks can consider the frequency band range of various network, transmission speed, Transmission bandwidth, signal quality and disturbed condition etc. are because being usually respectively the form that various network settings are different Transformational rule, thus seeking balance between loading velocity and picture quality, to adapt to network transmission demand, Improve user satisfaction.
Method and corresponding server, Ke Yigen that image data is provided to computing terminal according to the present invention Determine according to the terminal type information of computing terminal and picture is carried out form conversion, in order to reduce image data Byte number, cause loading velocity owing to data volume is relatively big when thus solving mobile terminal accessing picture Slow and that consumption network flow is many problems, achieve and mobile terminal can be made to Load Image rapidly, and fall The beneficial effect that flow during low picture access consumes.
Algorithm and display be not solid with any certain computer, virtual system or miscellaneous equipment provided herein Have relevant.Various general-purpose systems can also be used together with based on teaching in this.As described above, Construct the structure required by this kind of system to be apparent from.Additionally, the present invention is also not for any specific Programming language.It is understood that, it is possible to use various programming languages realize the content of invention described herein, And the description done language-specific above is the preferred forms in order to disclose the present invention.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that this Inventive embodiment can be put into practice in the case of not having these details.In some instances, not It is shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand in each inventive aspect one Or multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes It is grouped together in single embodiment, figure or descriptions thereof.But, should be by the disclosure Method be construed to reflect an intention that i.e. the present invention for required protection require ratio in each claim The middle more feature of feature be expressly recited.More precisely, as the following claims reflect As, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows Claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each right Requirement itself is all as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment certainly Change adaptively and they are arranged in one or more equipment different from this embodiment.Permissible Module in embodiment or unit or assembly are combined into a module or unit or assembly, and in addition may be used To put them into multiple submodule or subelement or sub-component.Except such feature and/or process or Outside at least some in unit excludes each other, can use any combination that (this specification is included companion With claim, summary and accompanying drawing) disclosed in all features and so disclosed any method or All processes of person's equipment or unit are combined.Unless expressly stated otherwise, this specification (includes companion With claim, summary and accompanying drawing) disclosed in each feature can by provide identical, equivalent or phase Replace like the alternative features of purpose.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include it Some feature included in its embodiment rather than further feature, but the group of the feature of different embodiment Close and mean to be within the scope of the present invention and formed different embodiments.Such as, in following power In profit claim, one of arbitrarily can mode making in any combination of embodiment required for protection With.
The all parts embodiment of the present invention can realize with hardware, or to process at one or more The software module run on device realizes, or realizes with combinations thereof.Those skilled in the art should Understand, microprocessor or digital signal processor (DSP) can be used in practice to realize basis The some or all parts in the server of computing terminal offer image data of the embodiment of the present invention Some or all functions.The present invention is also implemented as performing method as described herein Point or whole equipment or device program (such as, computer program and computer program). The program of such present invention of realization can store on a computer-readable medium, or can have one Or the form of multiple signals.Such signal can be downloaded from internet website and obtain, or carrying There is provided on body signal, or provide with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and And those skilled in the art can design replacement enforcement without departing from the scope of the appended claims Example.In the claims, any reference marks that should not will be located between bracket is configured to claim Restriction.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.It is positioned at element Word "a" or "an" before does not excludes the presence of multiple such element.The present invention can be by means of including There is the hardware of some different elements and realize by means of properly programmed computer.Some listing In the unit claim of device, several in these devices can be to be had by same hardware branch Body embodies.Word first, second and third use do not indicate that any order.Can be single by these Word is construed to title.

Claims (11)

1. the method providing image data to computing terminal, including step:
Receiving the picture access request that computing terminal sends, described picture access request includes figure to be accessed Sheet information, the terminal type information of computing terminal and being used for show user be in WIFI network environment or The network type information of the computing terminal of mobile network environment, wherein, the terminal type of described computing terminal Information includes one of the following or multiple: portable computing device, PDA, tablet computing device, Smart mobile phone mobile terminal, laptop computer and desk computer;Or, described computing terminal Terminal type information includes: the screen size of computing terminal, and/or the length-width ratio of the screen of computing terminal; The net used by user is identified with the network relevant function of connection by the management that is used in computing terminal system Network environment is mobile network environment or WIFI network environment;
Terminal type information according to described computing terminal and be used for showing that user is in WIFI network ring The network type information of the computing terminal of border or mobile network environment determines whether that picture is carried out form turns Change;
When determining that picture carries out form to be changed, obtain and the pictorial information in described picture access request Described original image data are changed by corresponding original image data according to predetermined form transformational rule For the image data of predetermined format, wherein, the byte number of the image data of described predetermined format is less than described The byte number of original image data;And
The image data of described predetermined format is sent to described computing terminal.
2. the method for claim 1, described picture access request is based on http protocol, and uses Field in the terminal type information of instruction computing terminal is included in user agent's part of http protocol In.
3. method as claimed in claim 2, the network type information of wherein said computing terminal is with parametric form It is included in described picture access request.
4. the method as described in any one in claim 1-3, described predetermined form transformational rule includes:
When the data form determining described original image data is single-frame images interchange format GIF, by institute State the image data that Data Format Transform is transplantation network graphic PNG8 form of original image data.
5. method as claimed in claim 4, comes really according to the image identifier in gif file structure Whether this gif file fixed is single-frame images interchange format GIF.
6. a server for image data is provided to computing terminal, including:
Network interface, is suitable to receive the picture access request that computing terminal sends, described picture access request Including pictorial information to be accessed, the terminal type information of computing terminal and be used for showing that user is in The network type information of the computing terminal of WIFI network environment or mobile network environment, and by server institute The image data of the predetermined format generated is transferred to described computing terminal, and wherein, described computing terminal includes One or more in following terminal type: portable computing device, PDA, tablet computing device, Smart mobile phone mobile terminal, laptop computer and desk computer;Or, described computing terminal Terminal type information includes: the screen size of computing terminal, and/or the length-width ratio of the screen of computing terminal; The net used by user is identified with the network relevant function of connection by the management that is used in computing terminal system Network environment is mobile network environment or WIFI network environment;
Type decision device, is suitable to the terminal type information according to described computing terminal and for showing user It is right that the network type information of the computing terminal being in WIFI network environment or mobile network environment determines whether Picture carries out form conversion;
Picture processor, is suitable to, when described type decision device determines that picture carries out form to be changed, obtain The original image data corresponding with the pictorial information in described picture access request, according to predetermined form Described original image data are converted to the image data of predetermined format by transformational rule, wherein, described predetermined The byte number of the image data of form is less than the byte number of described original image data.
7. server as claimed in claim 6, described picture access request based on http protocol, and For indicating the field of the terminal type information of computing terminal to be included in user agent's part of http protocol In.
8. server as claimed in claim 7, the network type information of wherein said computing terminal is with parameter shape Formula is included in described picture access request.
9. the server as described in any one in claim 6-8, described predetermined form transformational rule bag Include:
When image processor determines that the data form of described original image data is single-frame images interchange format During GIF, it is transplantation network graphic PNG8 form by the Data Format Transform of described original image data Image data.
10. server as claimed in claim 9, described image processor is according in gif file structure Image identifier determine whether this gif file is single-frame images interchange format GIF.
11. servers as described in any one in claim 6-10, also include:
Picture memory, is suitable to store the original image data that described pictorial information is corresponding.
CN201210489225.9A 2012-11-26 2012-11-26 Method and the server of image data are provided to computing terminal Expired - Fee Related CN102984151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210489225.9A CN102984151B (en) 2012-11-26 2012-11-26 Method and the server of image data are provided to computing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210489225.9A CN102984151B (en) 2012-11-26 2012-11-26 Method and the server of image data are provided to computing terminal

Publications (2)

Publication Number Publication Date
CN102984151A CN102984151A (en) 2013-03-20
CN102984151B true CN102984151B (en) 2016-09-28

Family

ID=47857895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210489225.9A Expired - Fee Related CN102984151B (en) 2012-11-26 2012-11-26 Method and the server of image data are provided to computing terminal

Country Status (1)

Country Link
CN (1) CN102984151B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932671A (en) * 2012-11-26 2013-02-13 北京奇虎科技有限公司 Method and server for supplying picture to computing terminal
CN104426972B (en) 2013-09-02 2019-07-05 腾讯科技(深圳)有限公司 Terminal location sharing method and device
CN104468673A (en) * 2013-09-23 2015-03-25 腾讯科技(深圳)有限公司 Image issuing method and device
US20160295456A1 (en) * 2013-11-19 2016-10-06 Telefonaktiebolaget Lm Ericsson (Publ) Data compression in wireless communications network
CN105491398B (en) * 2014-09-19 2019-06-28 腾讯科技(深圳)有限公司 Image processing method, picture processing unit and picture processing platform
CN104503927A (en) * 2014-12-11 2015-04-08 国云科技股份有限公司 Method for calculating virtual machine network IO (input/output) speed
CN104519144A (en) * 2015-01-23 2015-04-15 深圳市中兴移动通信有限公司 Mobile terminal, global traffic usage limiting method thereof and remote server
CN106534715A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Picture processing method used for intelligent terminal, device, terminal device and system
CN105260444A (en) * 2015-10-09 2016-01-20 深圳市华讯方舟科技有限公司 Adaptive data display method, terminal device and server
CN105867899A (en) * 2015-12-10 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for identifying device
CN107153574A (en) * 2016-03-03 2017-09-12 北京大学 Picture code-transferring method and system
CN106250010B (en) * 2016-07-06 2020-01-07 北京元心科技有限公司 Picture display control method and system
CN108696649A (en) * 2017-04-06 2018-10-23 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer readable storage medium
CN107833259B (en) * 2017-11-15 2021-02-02 北京掌易通文化科技有限公司 Dynamic cartoon engine processing method and system based on intelligent terminal
CN107911456A (en) * 2017-11-17 2018-04-13 深圳泉眼体育运营管理有限公司 Flow optimization method, device, terminal device and the storage medium of picture loading
CN109361747A (en) * 2018-10-16 2019-02-19 中国搜索信息科技股份有限公司 A kind of lightweight image converting method
CN109284482B (en) * 2018-10-25 2024-06-07 百度在线网络技术(北京)有限公司 Writing platform system and article publishing method for writing platform
CN109067928B (en) * 2018-10-30 2021-07-16 中卓信(北京)科技有限公司 Method and device for pulling multimedia file transmission terminal with format at server side
CN110618975A (en) * 2019-09-10 2019-12-27 Oppo(重庆)智能科技有限公司 Image sharing method and device and electronic equipment
CN111414190B (en) * 2020-03-27 2023-05-16 北京字节跳动网络技术有限公司 Request processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573808A (en) * 2003-05-19 2005-02-02 富士胶片株式会社 Apparatus and method for moving image conversion, apparatus and method for moving image transmission, and programs therefor
CN1794776A (en) * 2004-09-15 2006-06-28 腾讯科技(深圳)有限公司 Method and system of processing image and its applicated in immediat communication
CN101668255A (en) * 2008-09-02 2010-03-10 杨明极 Self-adaptive method for mobile terminal to display or download pictures through network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101527037B1 (en) * 2009-06-23 2015-06-16 엘지전자 주식회사 Mobile terminal and method for controlling the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573808A (en) * 2003-05-19 2005-02-02 富士胶片株式会社 Apparatus and method for moving image conversion, apparatus and method for moving image transmission, and programs therefor
CN1794776A (en) * 2004-09-15 2006-06-28 腾讯科技(深圳)有限公司 Method and system of processing image and its applicated in immediat communication
CN101668255A (en) * 2008-09-02 2010-03-10 杨明极 Self-adaptive method for mobile terminal to display or download pictures through network

Also Published As

Publication number Publication date
CN102984151A (en) 2013-03-20

Similar Documents

Publication Publication Date Title
CN102984151B (en) Method and the server of image data are provided to computing terminal
CN102932671A (en) Method and server for supplying picture to computing terminal
CN102905045A (en) Method and server for providing picture data to computing terminal
CN101833542B (en) Method and device for rendering fonts of user interface
CN102946419A (en) Picture server and picture data providing method
US20210191993A1 (en) Processing Method for Structured Data, Storage Medium and Electronic Device
US20060041893A1 (en) Extensible device synchronization architecture and user interface
CN106056530B (en) Method and device for displaying picture content in application
US20120250598A1 (en) Method and apparatus for low-power browsing
WO2009147844A1 (en) Web page distribution system
US8849953B2 (en) Terminal device, data receiving method, data receiving program, and recording medium
CN102938792A (en) Method for providing picture data for computing terminal and server
US8254895B2 (en) Methods and apparatus for generating mobile internet pages for viewing by mobile communication devices
CN102446083A (en) Method for reading and storing Android cellphone screen display contents at PC terminal
CN103136208B (en) A kind of method of Showing Picture and device
CN104965692B (en) The method and system of striding course display data in desktop application
CN106569984A (en) Method, apparatus, and system for generating and transmitting color word stock automatically
CN106961612A (en) A kind of image processing method and equipment
CN110223221B (en) Dynamic image playing method and terminal equipment
CN107894906B (en) Page picture loading method and device, terminal device and server
CN103002026A (en) Method and server for providing computing terminals with picture data
US20090292842A1 (en) Data access device with wireless network application service
CN102298591B (en) A kind of relationship search methods, devices and systems
US20170034344A1 (en) Phone Number Canonicalization and Information Discoverability
CN105657070A (en) Method and server for providing picture data to computing terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220715

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160928