CN105450837A - Method and apparatus for displaying CDN image adaptively on terminal device - Google Patents

Method and apparatus for displaying CDN image adaptively on terminal device Download PDF

Info

Publication number
CN105450837A
CN105450837A CN201410438623.7A CN201410438623A CN105450837A CN 105450837 A CN105450837 A CN 105450837A CN 201410438623 A CN201410438623 A CN 201410438623A CN 105450837 A CN105450837 A CN 105450837A
Authority
CN
China
Prior art keywords
picture
cdn
size
parameter
address information
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
CN201410438623.7A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201410438623.7A priority Critical patent/CN105450837A/en
Publication of CN105450837A publication Critical patent/CN105450837A/en
Priority to HK16109399.0A priority patent/HK1221358A1/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application provides a method and apparatus for displaying a CDN image adaptively on a terminal device. The method comprises the steps of receiving an inlet parameter after a preset APP service is triggered, and determining whether the inlet parameter contains the size information of a CDN image to be displayed; if not, calculating the size of the image adapted to display on a screen of a terminal device, obtaining the size, matching the calculated image size, of the CDN image, and obtaining address information of the CDN image and a supported function according to the inlet parameter; and then generating new address information based on the address information, the size and the supported function, and displaying the corresponding CDN image according to the new address information. The method and device in the embodiment of the application can display the CDN image having a size matching the size of the screen of the terminal device on the current terminal device, and can save traffic and improve the display efficiency of the image as the new address information contains the supported function.

Description

The method of terminal equipment adaptation display CDN picture and device
Technical field
The application relates to field of computer technology, particularly relates to method and the device of a kind of terminal equipment adaptation display CDN picture.
Background technology
Along with maturation and the development of mobile communication technology, the function of mobile terminal such as smart mobile phone gets more and more, people not only can carry out conversing, sending short messages by smart mobile phone, word or picture can also be browsed by smart mobile phone, such as, user browse by " the mobile phone Taobao " be arranged on smart mobile phone, the free choice of goods.
At present, user being browsed by smart mobile phone, in the process of the free choice of goods, in order to can intuitively, be well understood to merchandise news, user can browse a large amount of picture relevant with purchase commodity usually.The application program of installing in existing smart mobile phone when Loading Image, the former figure usually directly Loaded Image.Therefore, in the process of user by smart mobile phone browsing pictures, often occur that picture loads slowly, the phenomenon that the picture shown in smart mobile phone and smart mobile phone screen do not match.In addition, different network environment (such as 2G, 3G or WIFI (WIreless-FIdelity is at smart mobile phone, Wireless Fidelity)) under, according to directly loading the mode of former figure, the loading velocity that there will be picture is slowly and need to consume a large amount of Internet resources.
Summary of the invention
The application is intended to solve one of technical problem in correlation technique at least to a certain extent.
For this reason, first object of the application is the method proposing a kind of terminal equipment adaptation display CDN picture, the method can show the CDN picture mated with present terminal device screen size on present terminal equipment, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
Second object of the application is the device proposing a kind of terminal equipment adaptation display CDN picture.
For reaching above-mentioned purpose, the application's first aspect embodiment proposes the method for a kind of terminal equipment adaptation display CDN picture, comprise: after the business of default APP is triggered, receive suction parameter, and judge the dimension information whether comprising CDN picture to be represented in described suction parameter; If do not comprise described dimension information in described suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that described CDN picture mates with the picture size calculated, and obtain the described address information of CDN picture and the function of support according to described suction parameter; And generate new address information according to the function of described address information, size and support, with the CDN picture corresponding according to described new address information display.
The method of the terminal equipment adaptation display CDN picture of the embodiment of the present application, after the business of default APP is triggered, receive suction parameter, and judging in suction parameter not containing after the dimension information of exhibition CDN picture, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, then according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, the CDN picture mated with present terminal device screen size can be shown on present terminal equipment, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
For reaching above-mentioned purpose, the application's second aspect embodiment proposes the device of a kind of terminal equipment adaptation display CDN picture, comprise: judge module, for after the business of default APP is triggered, receive suction parameter, and judge the dimension information whether comprising CDN picture to be represented in described suction parameter; First processing module, if for not comprising described dimension information in described suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that described CDN picture mates with the picture size calculated, and obtain the described address information of CDN picture and the function of support according to described suction parameter; And second processing module be used for generating new address information according to the function of described address information, size and support, with the CDN picture corresponding according to described new address information display.
The device of the terminal equipment adaptation display CDN picture of the embodiment of the present application, by judge module after the business of default APP is triggered, receive suction parameter, and judge the dimension information whether comprising CDN picture to be represented in suction parameter, judged in suction parameter not containing in time opening up the dimension information of CDN picture by the first processing module, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, and second processing module according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, the CDN picture mated with present terminal device screen size can be shown on present terminal equipment, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for the terminal equipment adaptation display CDN picture of the application's embodiment.
Fig. 2 is the schematic diagram of the picture configuration information of the application's embodiment.
Fig. 3 is the flow chart of the method for the terminal equipment adaptation display CDN picture of another embodiment of the application.
Fig. 4 is the structural representation of the device of the terminal equipment adaptation display CDN picture of the application's embodiment.
Fig. 5 is the structural representation of the device of the terminal equipment adaptation display CDN picture of another embodiment of the application.
Fig. 6 is the structural representation of the system of the terminal equipment adaptation display CDN picture of the application's embodiment.
Embodiment
Be described below in detail the embodiment of the application, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Be exemplary below by the embodiment be described with reference to the drawings, be intended to for explaining the application, and the restriction to the application can not be interpreted as.
Below with reference to the accompanying drawings method and the device of the terminal equipment adaptation display CDN picture of the embodiment of the present application are described.
Fig. 1 is the flow chart of the method for the terminal equipment adaptation display CDN picture of the application's embodiment, this embodiment is to be arranged in the SDK (SoftwareDevelopmentKit of terminal equipment, SDK) be described for main body, wherein, SDK is supplied to default APP in the mode of general purpose module and uses, and terminal equipment can be the mobile terminals such as mobile phone.
As shown in Figure 1, the method for this terminal equipment adaptation display CDN picture comprises step S101-S103.
S101, after the business of default APP is triggered, receives suction parameter, and judges the dimension information whether comprising CDN picture to be represented in suction parameter.
Wherein, suction parameter is the function entrance of the kit that SDK provides, the content of suction parameter is decided by the function of SDK specific implementation, and CDN picture refers to the picture be positioned in CDN (ContentDistributionNetwork, content distributing network) server.
In this embodiment, when monitoring default APP such as " mobile phone Taobao " being activated, first present terminal equipment send picture configuring request to adaptation services device, and receive the picture configuration information that adaptation services device returns according to picture configuring request.
Particularly, when monitoring default APP and starting, terminal equipment by include the model information of present terminal equipment, user login information, APP version information picture configuring request be sent to adaptation services device, the picture configuring request that adaptation services device sends according to present terminal equipment obtains picture configuration information, and return picture configuration information to present terminal equipment, present terminal equipment receives the picture configuration information that configuration server returns, as shown in Figure 2.Wherein, comprise the list of CDN size in picture configuration information, Fig. 2 is a kind of example of the picture configuration information returned from adaptation services device, and the code block A in Fig. 2 is the partial content of CDN size list.
When such as " mobile phone Taobao " checks details or the store information of certain commodity to user by default APP, receive suction parameter.Wherein, suction parameter comprises address information and the URL (UniformResourceLocator of CDN picture to be represented, uniform resource locator), picture container size and page area mark, the wide and high of the picture that user specifies can also be comprised, i.e. user's size of picture of specifying.Wherein, page area mark is for identifying the type (functional area etc. that the functional area of such as displaying " commodity details ", displaying " shop " are introduced) of the business function of corresponding page area realization.In addition, can also comprise controling parameters in suction parameter, controling parameters can comprise usewebp and useQuality parameter.Wherein, usewebp represents webp compressed format, and webp compressed format is the one in default compressed format, useQuality Parametric Representation picture quality compression parameters.Webp is a kind of picture file format simultaneously providing lossy compression method and Lossless Compression, and user oneself can arrange whether use compressed format or picture quality compression parameters as required, also can Use Defaults.In usual suction parameter, acquiescence uses compressed format and uses picture quality compression parameters, namely usewebp parameter and useQuality parameter acquiescence are true, in addition, in order to represent whether controling parameters is specified by user, differentiation parameter can also be comprised in suction parameter, when differentiation parameter is true time, namely represent the non-specified control parameter of user, directly acquiescence uses compressed format and picture quality compression parameters.
In this embodiment, before reception suction parameter, the address information of the CDN picture comprised in the business of being triggered can also be obtained from operation system according to the business such as shop or details be triggered, specifically, present terminal equipment sends service request according to the triggering of user to operation system, operation system obtains the address information of the CDN picture comprised in this business according to service request, and the address information of this CDN picture is back in present terminal equipment.It should be noted that, operation system herein refers to that default APP can realize the system of certain function, such as, search in " mobile phone Taobao ", details, place an order, system that the business such as shopping cart is corresponding.
Particularly, the address information of the CDN picture to be represented first determined in suction parameter is needed whether to meet default domain name in this embodiment, when determining that the address information in suction parameter meets default domain name, then judge the dimension information whether comprising CDN picture to be represented in suction parameter.It should be noted that, when the address information of the CDN picture in suction parameter does not meet default domain name, SDK does not carry out adaptation to this CDN picture, the picture in this address of direct normal load.
Such as, user is when clicking the details of certain commodity, operation system can carry out page parsing to the details page of correspondence, suppose that parsing details page comprises 10 CDN pictures, then these 10 CDN pictures are sent to SDK, by the URL (UniformResourceLocator of SDK to these 10 CDN pictures, uniform resource locator) whether belong to default domain name (such as " gw.alicdn.com ") and judge, if the domain name " gw.alicdn.com " having the URL of 6 CDN pictures to belong to default, then adaptation processing is carried out to these 6 pictures, to obtain the image results suitable with terminal equipment screen, adaptation processing is not carried out for those 4 pictures remaining.
S102, if do not comprise dimension information in suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter.
In this embodiment, when the size of user's non-designated pictures in suction parameter, can calculate according to the hardware information of present terminal equipment and be suitable for the size that namely picture size that present terminal equipment represents calculates the picture of the best needed for present terminal device screen, wherein, hardware information comprise in screen size, resolution and dot density one or more, wherein, dot density and picture element density refer to the ratio of terminal equipment screen diagonal pixel quantity and terminal equipment screen size, the numerical value of usual picture element density is higher, and presentation video is more clear.In addition, resolution is relevant with the equipment independent pixel of terminal equipment, and usual equipment independent pixel is higher, and the size of terminal equipment screen is larger, and resolution is larger, but the size of terminal equipment screen is larger, and the resolution of terminal equipment is not necessarily higher.
Particularly, the picture size being suitable for present terminal equipment and representing can be calculated according to the situation of the screen size of terminal, resolution and dot density, then from the list of CDN size, find the picture size represented with the present terminal equipment that is suitable for calculated to differ minimum size, and using the size of this size as CDN picture current to be represented.
Such as, if obtain CDN picture according to the address information of CDN picture to be of a size of 10000 × 800, wherein, 10000 represent the high size that CDN picture to be represented is corresponding, 800 represent the wide size that CDN picture to be represented is corresponding, suppose fixed high adaptive CDN picture, if the width of terminal equipment screen is 700, can be such as 10000 × 620 by inquiry CDN size list acquisition and the immediate dimension information of terminal equipment screen, thus facilitate and follow-uply to Show Picture on terminal equipment screen.
In this embodiment, if comprise controling parameters in suction parameter and for representing that controling parameters is the differentiation parameter of being specified by user, then when distinguishing parameter and get the first numerical value and comprising service fields in the picture configuration information obtained, according to the picture configuration information determination controling parameters of acquisition and the content of suffix; When distinguishing parameter and get second value and comprising service fields in the picture configuration information obtained, according to the content distinguishing parameter determination controling parameters, and according to the content of picture configuration information determination suffix; When distinguishing parameter and get second value but not comprising service fields in the picture configuration information obtained, according to the content distinguishing parameter determination controling parameters; And if comprise picture quality compression parameters according to the content determination suction parameter of controling parameters, then the numerical value of picture quality compression parameters is set according to current network type; If determine that CDN picture uses according to the content of controling parameters to preset compressed format, then increase compression parameters.
S103, the function according to address information, size and support generates new address information, with the CDN picture corresponding according to the display of new address information.
Such as, the raw address information that in present terminal equipment, CDN picture to be represented is corresponding and URL are http://img07.taobaocdn.com/tfscom/T10DjXXn4oXXbSV1s__105829.jpg.Assuming that, the size of the non-designated pictures of user in suction parameter, and being calculated by the hardware information of terminal equipment and be suitable for the picture that present terminal device screen represents and be of a size of 600 × 600, can be such as 600 × 600 by inquiry CDN size list acquisition and the immediate dimension information of terminal equipment screen; Assuming that determine in suction parameter to use picture quality compression parameters, if under present terminal equipment is in 3G network, can determine that the value that picture quality compression parameters is corresponding is such as " q90 " according to current network conditions, wherein, the quality of the picture that " q90 " represents after compression is 90% of former figure, assuming that be " S150 " from the content of the suffix the picture configuration information that adaptation services device returns.
According to the size 600 × 600 after process, the numerical value " q90 " that picture quality compression parameters is corresponding and represent that " S150 " of sharpening generates new address corresponding to a CDN picture to be represented, wherein, the new address information of generation is http://img07.taobaocdn.com/tfscom/T10DjXXn4oXXbSV1s_105829.jpg6 00 × 600q90S150.jpg.Thus, user can obtain one by new address information and mate with present terminal equipment, and picture corner angle are clearly demarcated, picture picture clearly.
It should be noted that, when there is network, according in the process of the adaptive CDN picture to be represented of suction parameter and picture configuration information, can directly obtain from the picture configuration information that adaptation services device returns during relevant parameter if desired in picture configuration information.When there is not network, according in the process of suction parameter and the adaptive CDN picture to be represented of picture configuration information, according to the default information of preserving in present terminal equipment, the CDN picture represented can be treated and carries out off-line adaptation.That is, SDK, when online or off-line, all can carry out adaptation processing by the CDN picture to be represented to present terminal equipment.
The method of the terminal equipment adaptation display CDN picture of the embodiment of the present application, after the business of default APP is triggered, receive suction parameter, and judging in suction parameter not containing after the dimension information of exhibition CDN picture, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, then according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, thus the CDN picture mated with present terminal device screen size can be shown on present terminal equipment, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
Be described with the process of a concrete implementation to terminal equipment adaptation display CDN picture below.Be understandable that, only for illustrative purposes, embodiments of the invention are not limited thereto following process.
Fig. 3 is the flow chart of the method for the terminal equipment adaptation display CDN picture of another embodiment of the application, and as shown in Figure 3, the method for this terminal equipment adaptation display CDN picture comprises:
S301, presets APP and starts.
Particularly, when monitoring default APP such as " mobile phone Taobao " being activated, the picture configuring request comprising the model information of present terminal equipment, user login information and APP version information is sent to adaptation services device, adaptation services device obtains picture configuration information according to picture configuring request, and returns picture configuration information to present terminal equipment.It should be noted that, above-described embodiment illustrates the explanation of picture configuration information and is also applicable to this embodiment, does not repeat herein.
Be triggered in the business such as " details " or " shop " monitoring default APP such as " mobile phone Taobao ", receive suction parameter, it should be noted that, above-described embodiment illustrates the explanation of suction parameter and is also applicable to this embodiment, does not repeat herein.
S302, judges whether the address information of the CDN picture to be represented in suction parameter meets default domain name, if meet default domain name, then performs step S303.
In this embodiment, if the address information of CDN picture to be represented does not meet default domain name, then SDK does not carry out adaptation processing to this CDN picture.
S303, judges whether there is size in suction parameter, if there is size, then performs step S304, if there is not size, then performs step S305.
It should be noted that, this place is said judges that whether there is size in suction parameter refers to the size judging whether to there is the picture that user specifies in suction parameter.
S304, using the size that exists in the suction parameter size as CDN picture current to be represented, and performs step S307.
Particularly, if user specifies the size of picture in suction parameter, then do not need to obtain from the list of CDN size more corresponding dimension information, the size of the picture of directly user being specified is as the size of CDN picture current to be represented.
S305, calculates the size being suitable for the picture that present terminal device screen represents, and obtains the size that CDN picture mates with the picture size calculated, and performs step S306.
Particularly, when not comprising the size of the picture that user specifies in suction parameter, can calculate according to the hardware information of present terminal equipment and be suitable for the size that namely picture size that present terminal equipment represents calculates the picture of the best needed for present terminal device screen, then from the list of CDN size, find the picture size represented with the present terminal equipment that is suitable for calculated to differ minimum size, and using the size of this size as CDN picture current to be represented.
Specifically, can according to the screen size of present terminal equipment, the situation of resolution and dot density calculates the size that namely size being suitable for the picture that present terminal device screen represents calculates optimal picture needed for present terminal device screen, then find from CDN list one with the immediate dimension information of size of optimal picture needed for present terminal device screen, such as, calculating the size being suitable for the picture that present terminal device screen represents is 10000 × 600, 10000 × 520 are comprised in such as CDN list, 10000 × 620 and 10000 × 640 equidimension information, then and using 10000 × 620 as the size of CDN picture current to be represented.
S306, judges whether satisfied first pre-conditioned, if meet, then the value of usewebp, useQulity and suffix in the picture configuration information returned with adaptation services device is as the criterion, and performs step S307, if do not meet, then performs step S308.
Wherein, first is pre-conditioned for " globleSwitch==ture & & isDefault==ture & & picture configuration information exists configuration corresponding to areaName ", globleSwitch is a first term in picture configuration information, isDefault is differentiation parameter, areaName is page area mark, suffix is suffix, the picture configuration information that the value in usewebp, useQulity and suffix can be shown in Figure 2.
S307, judges whether to use picture quality compression parameters, if use picture quality compression parameters, then performs step S309, if do not use picture quality compression parameters, then performs step S310.
Particularly, judge whether to use picture quality compression parameters, namely judge whether useQulity is true (ture), use picture quality compression parameters if very namely represent, then perform step S309.
S308, judge whether satisfied second pre-conditioned, if meet, then usewebp, useQulity are as the criterion with suction parameter, and suffix with being as the criterion in picture configuration information, and performs step S307, if do not meet, then usewebp, useQulity are as the criterion with suction parameter, do not process suffix, and perform step S307.
Wherein, second is pre-conditioned for " globleSwitch==ture & & isDefault==ture & & picture configuration information exists configuration corresponding to areaName ".
S309, arranges the numerical value of picture quality compression parameters according to current network type.
Particularly, judge current network type, and the numerical value of picture quality compression parameters is set according to judged result.Such as, judge that current network type is 3G, then picture quality compression parameters is set to 90, and in order to the numerical value arranging picture quality compression parameters according to network type can be indicated in address information, when generating new address information, can represent with " q90 " and according to network type, CDN picture being processed.
In order to judge whether to use default compressed format such as webp form, after the numerical value that mass parameter is set according to current network type, step S310 can also be comprised.
S310, judges whether to use webp form, if so, then increases webp parameter, and perform step S311, if not, then directly performs step S311.
Particularly, judge whether to use webp form, namely judge whether to meet " usewebp==ture ", if meet, then treating the CDN picture represented increases webp parameter, and performs step S311.
S311, judges whether splicing suffix (suffix), if so, then splices suffix, and perform step S312, if not, then performs step S312.
Such as, if be " S150 " in the content of the suffix in the picture configuration information that returns of adaptation services device and suffix, then according to the content " S150 " in suffix, SDK can determine that needing to treat the CDN picture represented carries out Edge contrast.
S312, generates complete new address information and returns.
In order to the CDN picture after process can be obtained, function according to address information, size and support generates new address information, the CDN picture after adaptation is loaded according to new address information to facilitate user, such as, the raw address information that in present terminal equipment, CDN picture to be represented is corresponding and URL are http://img07.taobaocdn.com/tfscom/T10DjXXn4oXXbSV1s__105829.jpg.Assuming that the size of the non-designated pictures of user in suction parameter, and being calculated by the hardware information of terminal equipment and be suitable for the picture that present terminal device screen represents and be of a size of 600 × 600, can be such as 600 × 600 by inquiry CDN size list acquisition and the immediate dimension information of terminal equipment screen; Assuming that under determining that present terminal equipment is in 3G network, and the value corresponding according to current network conditions determination picture quality compression parameters is such as " q90 ", wherein, the quality of the picture that " q90 " represents after compression is 90% of former figure, assuming that be " S150 " from the content of the suffix the picture configuration information that adaptation services device returns.
According to the size 600 × 600 after process, the numerical value " q90 " that picture quality compression parameters is corresponding and represent that " S150 " of sharpening generates new address corresponding to a CDN picture to be represented, wherein, the new address information of generation is http://img07.taobaocdn.com/tfscom/T10DjXXn4oXXbSV1s_105829.jpg6 00 × 600q90S150.jpg.Thus, user can obtain one by new address information and mate with present terminal equipment, and picture corner angle are clearly demarcated, picture picture clearly, and loads CDN picture by new address, the consumption of Internet resources can be reduced, and then the efficiency of terminal equipment screen display picture can be improved.
The method of the terminal equipment adaptation display CDN picture of the embodiment of the present application, after the business of default APP is triggered, receive suction parameter, and judging in suction parameter not containing after the dimension information of exhibition CDN picture, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, then according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, thus can show at present terminal the CDN picture mated with terminal screen size, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
In order to realize above-described embodiment, the application also proposes the device of a kind of terminal equipment adaptation display CDN picture.
Fig. 4 is the structural representation of the device of the terminal equipment adaptation display CDN picture of the application's embodiment, and the device of this terminal equipment adaptation display CDN picture is arranged in terminal equipment, and wherein, terminal equipment can be the mobile terminals such as mobile phone.
As shown in Figure 4, the device of this terminal equipment adaptation display CDN picture comprises judge module 100, first processing module 200 and the second processing module 300.Wherein:
Judge module 100, for after the business of default APP is triggered, receives suction parameter, and judges the dimension information whether comprising CDN picture to be represented in suction parameter; If the first processing module 200 is not for comprising dimension information in suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size calculated, and obtain the address information of CDN picture and the function of support according to suction parameter; And second processing module 300 for generating new address information according to the function of address information, size and support, with the CDN picture corresponding according to the display of new address information.
Wherein, above-mentioned suction parameter comprises address information and the URL (UniformResourceLocator of CDN picture to be represented, uniform resource locator), picture container size and page area mark, the wide and high of the picture that user specifies can also be comprised, i.e. user's size of picture of specifying.Wherein, page area mark is for identifying the type (functional area etc. that the functional area of such as displaying " commodity details ", displaying " shop " are introduced) of the business function of corresponding page area realization, in addition, the controling parameters that user can be arranged flexibly is further comprises in suction parameter, controling parameters can comprise usewebp and useQuality parameter, wherein, usewebp represents webp compressed format, webp compressed format is the one in default compressed format, useQuality Parametric Representation picture quality compression parameters.Webp form is a kind of picture file format simultaneously providing lossy compression method and Lossless Compression, user oneself can arrange whether use the parameter such as compressed format or picture quality compression parameters as required, also can Use Defaults, in usual suction parameter, acquiescence uses compressed format mode and uses picture quality compression parameters, namely usewebp parameter and useQuality parameter acquiescence are true (ture), in addition, in order to represent whether controling parameters is specified by user, differentiation parameter can also be comprised in suction parameter, when distinguishing parameter and being true (ture), namely the non-specified control parameter of user is represented, directly acquiescence uses compressed format mode and uses picture quality compression parameters.
As shown in Figure 5, said apparatus can also comprise determination module 400, this determination module 400 for judge whether to comprise in suction parameter CDN picture to be represented at judge module 100 dimension information before, determine that address information conforms presets domain name.
In addition, said apparatus can also comprise pretreatment module 500, when this pretreatment module 500 is activated for monitoring default APP, sends picture configuring request to adaptation services device, and receives the picture configuration information that adaptation services device returns according to picture configuring request.
Particularly, after pretreatment module 500 monitors default APP such as " mobile phone Taobao " startup, the model information of present terminal equipment will be included, user login information, the picture configuring request of APP version information is sent to adaptation services device, adaptation services device obtains picture configuration information according to picture configuring request, and return picture configuration information to present terminal equipment, pretreatment module 500 receives the picture configuration information that adaptation services device returns, as shown in Figure 2, wherein, the list of CDN size is comprised in picture configuration information, Fig. 2 is a kind of example of the picture configuration information returned from adaptation services device, code block A in Fig. 2 is the partial content of CDN size list.
After default processing module 500 obtains picture configuration information from adaptation services device, if the business monitoring default APP is triggered, pretreatment module 500 also for obtaining the address information of the CDN picture comprised in the business that is triggered from operation system, specifically, pretreatment module 500 sends service request to operation system, operation system will obtain address information and the URL (UniformResourceLocator of the CDN picture comprised in business such as details or shop according to service request, uniform resource locator), and the address information of the CDN picture of acquisition is back to present terminal equipment, when determination module 400 determines that the address information of CDN picture meets default domain name, judge module 100 judges the dimension information whether comprising CDN picture to be represented in suction parameter.It should be noted that, operation system herein refers to that default APP can realize the system of certain function, such as, search in " mobile phone Taobao ", details, place an order, system that the business such as shopping cart is corresponding.
Do not comprise in suction parameter wait the dimension information of the CDN picture represented and user not in suction parameter during the size of designated pictures, above-mentioned first processing module 200 specifically for: calculate the picture size being suitable for present terminal device screen and representing according to the hardware information of present terminal equipment, and find from the list of CDN size and differ minimum size with the picture size calculated.Wherein, above-mentioned hardware information comprise in screen size, resolution and dot density one or more, wherein, dot density and picture element density refer to the ratio of terminal equipment screen diagonal pixel quantity and terminal equipment screen size, the numerical value of usual picture element density is higher, and presentation video is more clear.
Above-mentioned first processing module 200 can also for: if comprise controling parameters in suction parameter and for representing the differentiation parameter whether controling parameters is specified by user, then when distinguishing parameter and get the first numerical value and comprising service fields in the picture configuration information obtained, according to the picture configuration information determination controling parameters of acquisition and the content of suffix; When distinguishing parameter and get second value and comprising service fields in the picture configuration information obtained, according to the content distinguishing parameter determination controling parameters, and according to the content of the picture configuration information determination suffix obtained; When distinguishing parameter and get second value but not comprising service fields in the picture configuration information obtained, according to the content distinguishing parameter determination controling parameters; And if comprise picture quality compression parameters according to the content determination suction parameter of controling parameters, then the numerical value of picture quality compression parameters is set according to current network type; If determine that CDN picture uses according to the content of controling parameters to preset compressed format, then increase compression parameters.
It should be noted that, the explanation of the above-mentioned method to terminal equipment adaptation display CDN picture illustrates, is also applicable to the device of the terminal equipment adaptation display CDN picture of this embodiment, does not repeat herein.
The device of the terminal equipment adaptation display CDN picture of the embodiment of the present application, by judge module after the business of default APP is triggered, receive suction parameter, and judge the dimension information whether comprising CDN picture to be represented in suction parameter, first processing module is being judged in suction parameter not containing in time opening up the dimension information of CDN picture, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, and second processing module according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, thus can show at present terminal the CDN picture mated with terminal screen size, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
In order to realize above-described embodiment, the application also proposes the system of a kind of terminal equipment adaptation display CDN picture.
Fig. 6 is the structural representation of the system of terminal equipment adaptation display CDN picture according to an embodiment of the invention.As shown in Figure 6, this system comprises terminal equipment 10, adaptation services device 20 and operation system 30.
Wherein, the device 100 of the terminal equipment 10 adaptation display CDN picture shown in Fig. 5 is comprised in terminal equipment 10; The picture configuring request that adaptation services device 20 sends for receiving terminal apparatus 10, and obtain picture configuration information according to picture configuring request, and picture configuration information is returned terminal equipment 10; The address information of the CDN picture of acquisition, for receiving service request, and according to the address information of the CDN picture comprised in service request acquisition business, and is returned terminal equipment 10 by operation system 30.
The system of the terminal equipment adaptation display CDN picture of the embodiment of the present application, terminal equipment obtains picture configuration information from adaptation services device, after the business of default APP is triggered, receive suction parameter, and judge the dimension information whether comprising CDN picture to be represented in suction parameter, judging in suction parameter not containing in time opening up the dimension information of CDN picture, calculate the picture size being suitable for present terminal device screen and representing, obtain the size that CDN picture mates with the picture size that present terminal device screen represents, and obtain the address information of CDN picture and the function of support according to suction parameter, then according to address information, the function of size and support generates new address information, with the CDN picture corresponding according to the display of new address information, thus can show at present terminal the CDN picture mated with terminal screen size, owing to containing the function of support in new address information, therefore can flow be saved, improve the display efficiency of picture.
In the description of this specification, at least one embodiment that specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained in the application or example.In this manual, to the schematic representation of above-mentioned term not must for be identical embodiment or example.And the specific features of description, structure, material or feature can combine in one or more embodiment in office or example in an appropriate manner.In addition, when not conflicting, the feature of the different embodiment described in this specification or example and different embodiment or example can carry out combining and combining by those skilled in the art.
In addition, term " first ", " second " only for describing object, and can not be interpreted as instruction or hint relative importance or imply the quantity indicating indicated technical characteristic.Thus, be limited with " first ", the feature of " second " can express or impliedly comprise at least one this feature.In the description of the application, the implication of " multiple " is at least two, such as two, three etc., unless otherwise expressly limited specifically.
Describe and can be understood in flow chart or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred implementation of the application comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by the embodiment person of ordinary skill in the field of the application.
In flow charts represent or in this logic otherwise described and/or step, such as, the sequencing list of the executable instruction for realizing logic function can be considered to, may be embodied in any computer-readable medium, for instruction execution system, device or equipment (as computer based system, comprise the system of processor or other can from instruction execution system, device or equipment instruction fetch and perform the system of instruction) use, or to use in conjunction with these instruction execution systems, device or equipment.With regard to this specification, " computer-readable medium " can be anyly can to comprise, store, communicate, propagate or transmission procedure for instruction execution system, device or equipment or the device that uses in conjunction with these instruction execution systems, device or equipment.The example more specifically (non-exhaustive list) of computer-readable medium comprises following: the electrical connection section (electronic installation) with one or more wiring, portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasablely edit read-only memory (EPROM or flash memory), fiber device, and portable optic disk read-only memory (CDROM).In addition, computer-readable medium can be even paper or other suitable media that can print described program thereon, because can such as by carrying out optical scanner to paper or other media, then carry out editing, decipher or carry out process with other suitable methods if desired and electronically obtain described program, be then stored in computer storage.
Should be appreciated that each several part of the application can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the application-specific integrated circuit (ASIC) of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the application can be integrated in a processing module, also can be that the independent physics of unit exists, also can be integrated in a module by two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.Although illustrate and described the embodiment of the application above, be understandable that, above-described embodiment is exemplary, can not be interpreted as the restriction to the application, and those of ordinary skill in the art can change above-described embodiment, revises, replace and modification in the scope of the application.

Claims (12)

1. a method for terminal equipment adaptation display CDN picture, is characterized in that, comprising:
After the business of default APP is triggered, receives suction parameter, and judge the dimension information whether comprising CDN picture to be represented in described suction parameter;
If do not comprise described dimension information in described suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that described CDN picture mates with the picture size calculated, and obtain the described address information of CDN picture and the function of support according to described suction parameter; And
Function according to described address information, size and support generates new address information, with the CDN picture corresponding according to described new address information display.
2. method according to claim 1, is characterized in that, the address information of CDN picture to be represented described in described suction parameter comprises, described judge whether to comprise in described suction parameter the dimension information of CDN picture to be represented before, also comprise:
Determine that described address information meets default domain name.
3. method according to claim 1, is characterized in that, described in calculate the picture size being suitable for present terminal device screen and representing, obtain the size that described CDN picture mates with the picture size calculated, comprising:
Calculate the picture size being suitable for described present terminal device screen and representing according to the hardware information of described present terminal equipment, described hardware information comprise in screen size, resolution and dot density one or more; And
Find from the list of CDN size and differ minimum size with the picture size calculated.
4. method according to claim 3, is characterized in that, the described function obtaining the support of described CDN picture according to described suction parameter, comprising:
If comprise controling parameters in described suction parameter and for representing the differentiation parameter whether described controling parameters is specified by user, then when comprising service fields in the picture configuration information that described differentiation parameter gets the first numerical value and obtain, determine the content of described controling parameters and suffix according to the picture configuration information obtained; When described differentiation parameter is got second value and comprised service fields in the picture configuration information obtained, determine the content of described controling parameters according to described differentiation parameter, and according to the content of picture configuration information determination suffix obtained; When described differentiation parameter is got second value but do not comprised service fields in the picture configuration information obtained, determine the content of described controling parameters according to described differentiation parameter; And
If determine that described suction parameter comprises picture quality compression parameters according to the content of described controling parameters, then the numerical value of described picture quality compression parameters is set according to current network type; If determine that described CDN picture uses according to the content of described controling parameters to preset compressed format, then increase compression parameters.
5. method according to claim 4, is characterized in that, also comprises:
Monitor described default APP when being activated, send picture configuring request to adaptation services device, and receive the described picture configuration information that described adaptation services device returns according to described picture configuring request.
6. method according to claim 5, is characterized in that, comprises the list of described CDN size in described picture configuration information.
7. a device for terminal equipment adaptation display CDN picture, is characterized in that, comprising:
Judge module, for after the business of default APP is triggered, receives suction parameter, and judges the dimension information whether comprising CDN picture to be represented in described suction parameter;
First processing module, if for not comprising described dimension information in described suction parameter, then calculate the picture size being suitable for present terminal device screen and representing, obtain the size that described CDN picture mates with the picture size calculated, and obtain the described address information of CDN picture and the function of support according to described suction parameter; And
Second processing module, for generating new address information according to the function of described address information, size and support, with the CDN picture corresponding according to described new address information display.
8. device according to claim 7, is characterized in that, the address information of CDN picture to be represented described in described suction parameter comprises, and described device also comprises:
Determination module, for judge whether to comprise in described suction parameter CDN picture to be represented at described judge module dimension information before, determine that described address information meets default domain name.
9. device according to claim 7, is characterized in that, described first processing module, specifically for:
Calculate the picture size being suitable for described present terminal device screen and representing according to the hardware information of described present terminal equipment, described hardware information comprise in screen size, resolution and dot density one or more; And find from the list of CDN size and differ minimum size with the picture size calculated.
10. device according to claim 9, is characterized in that, described first processing module, also for:
If comprise controling parameters in described suction parameter and for representing the differentiation parameter whether described controling parameters is specified by user, then when comprising service fields in the picture configuration information that described differentiation parameter gets the first numerical value and obtain, determine the content of described controling parameters and suffix according to the picture configuration information obtained; When described differentiation parameter is got second value and comprised service fields in the picture configuration information obtained, determine the content of described controling parameters according to described differentiation parameter, and according to the content of picture configuration information determination suffix obtained; When described differentiation parameter is got second value but do not comprised service fields in the picture configuration information obtained, determine the content of described controling parameters according to described differentiation parameter; And if determine that described suction parameter comprises picture quality compression parameters according to the content of described controling parameters, then the numerical value of described picture quality compression parameters is set according to current network type; If determine that described CDN picture uses according to the content of described controling parameters to preset compressed format, then increase compression parameters.
11. devices according to claim 10, is characterized in that, also comprise:
Pretreatment module, for monitor described default APP be activated time, send picture configuring request to adaptation services device, and receive the described picture configuration information that described adaptation services device returns according to described picture configuring request.
12. devices according to claim 11, is characterized in that, comprise the list of described CDN size in described picture configuration information.
CN201410438623.7A 2014-08-29 2014-08-29 Method and apparatus for displaying CDN image adaptively on terminal device Pending CN105450837A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410438623.7A CN105450837A (en) 2014-08-29 2014-08-29 Method and apparatus for displaying CDN image adaptively on terminal device
HK16109399.0A HK1221358A1 (en) 2014-08-29 2016-08-08 Method and system for displaying cdn image adaptive to terminal device cdn

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410438623.7A CN105450837A (en) 2014-08-29 2014-08-29 Method and apparatus for displaying CDN image adaptively on terminal device

Publications (1)

Publication Number Publication Date
CN105450837A true CN105450837A (en) 2016-03-30

Family

ID=55560598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410438623.7A Pending CN105450837A (en) 2014-08-29 2014-08-29 Method and apparatus for displaying CDN image adaptively on terminal device

Country Status (2)

Country Link
CN (1) CN105450837A (en)
HK (1) HK1221358A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918605A (en) * 2019-03-07 2019-06-21 杭州又拍云科技有限公司 A method of the generation dynamic picture based on content distributing network
CN109936504A (en) * 2019-02-21 2019-06-25 Oppo广东移动通信有限公司 Method, apparatus, server apparatus and the storage medium of picture presentation
CN111259276A (en) * 2020-01-10 2020-06-09 北京字节跳动网络技术有限公司 Method and device for displaying title content, electronic equipment and storage medium
CN111382379A (en) * 2018-12-27 2020-07-07 福建天晴数码有限公司 Method and terminal for importing configuration data with pictures

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007151078A (en) * 2005-10-28 2007-06-14 Canon Inc Video distribution system, client terminal and control method thereof
CN101067819A (en) * 2007-06-07 2007-11-07 北京大学 Web page resource issuing method and issuing system
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
CN102684986A (en) * 2011-04-14 2012-09-19 天脉聚源(北京)传媒科技有限公司 Method and system for displaying pictures at terminal
CN102905045A (en) * 2012-10-26 2013-01-30 北京奇虎科技有限公司 Method and server for providing picture data to computing terminal
CN103729825A (en) * 2013-12-31 2014-04-16 世纪龙信息网络有限责任公司 Method for processing picture in dynamic adaption to terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007151078A (en) * 2005-10-28 2007-06-14 Canon Inc Video distribution system, client terminal and control method thereof
CN101067819A (en) * 2007-06-07 2007-11-07 北京大学 Web page resource issuing method and issuing system
CN101707748A (en) * 2009-11-24 2010-05-12 中兴通讯股份有限公司 Picture adapting method and server
CN102684986A (en) * 2011-04-14 2012-09-19 天脉聚源(北京)传媒科技有限公司 Method and system for displaying pictures at terminal
CN102905045A (en) * 2012-10-26 2013-01-30 北京奇虎科技有限公司 Method and server for providing picture data to computing terminal
CN103729825A (en) * 2013-12-31 2014-04-16 世纪龙信息网络有限责任公司 Method for processing picture in dynamic adaption to terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382379A (en) * 2018-12-27 2020-07-07 福建天晴数码有限公司 Method and terminal for importing configuration data with pictures
CN111382379B (en) * 2018-12-27 2022-12-13 福建天晴数码有限公司 Method and terminal for importing configuration data with pictures
CN109936504A (en) * 2019-02-21 2019-06-25 Oppo广东移动通信有限公司 Method, apparatus, server apparatus and the storage medium of picture presentation
CN109936504B (en) * 2019-02-21 2021-10-26 Oppo广东移动通信有限公司 Picture display method and device, server equipment and storage medium
CN109918605A (en) * 2019-03-07 2019-06-21 杭州又拍云科技有限公司 A method of the generation dynamic picture based on content distributing network
CN111259276A (en) * 2020-01-10 2020-06-09 北京字节跳动网络技术有限公司 Method and device for displaying title content, electronic equipment and storage medium

Also Published As

Publication number Publication date
HK1221358A1 (en) 2017-05-26

Similar Documents

Publication Publication Date Title
US9864811B2 (en) Terminal device, system for providing picture and method for transmitting picture
CN103269362B (en) The sharing method of picture local content, system and device in webpage
CN105451087A (en) Pushing method, terminals, historical data server and system for barrage information
CN105450837A (en) Method and apparatus for displaying CDN image adaptively on terminal device
WO2018107628A1 (en) Display method and device
CN104954428A (en) Information issuing method and system and computing device
CN102917061A (en) Resource synchronization method and system
CN109274726B (en) Binding method, migration method, binding device, migration device, computing equipment and storage medium
CN103259989A (en) Screen content display method and screen content display device
JP2009225000A (en) Program for controlling information distribution to foldable cellular phone
CN102265275A (en) Method, apparatus and computer program product for providing unrestricted content on a user terminal
CN109168012B (en) Information processing method and device for terminal equipment
CN103176996A (en) Image search method based on image feature information and image search engine server based on image feature information
CN113220248A (en) Cross-screen display method, display equipment and vehicle
WO2017186177A1 (en) Resource numerical value transfer request generating method, device and system, and storage medium
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
CN113420243A (en) Page processing method and device and electronic equipment
CN115018581A (en) Method, device, medium and equipment for displaying object information in live broadcast room
CN108124273A (en) A kind of method of acquisition of information, equipment and medium
CN109804599B (en) Server operation method and server
CN102761616B (en) Browser browse mode based on immediate service provides system and method
CN112052391A (en) Data pushing method, device and system
CN107688572B (en) Page display method and terminal
CN110806904A (en) Method and device for carrying out configuration item processing on application program in store system
CN112395109B (en) Clipboard content processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1221358

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160330

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1221358

Country of ref document: HK