[go: up one dir, main page]

CN104063424B - Web page picture shows method and demonstration device - Google Patents

Web page picture shows method and demonstration device Download PDF

Info

Publication number
CN104063424B
CN104063424B CN201410240146.3A CN201410240146A CN104063424B CN 104063424 B CN104063424 B CN 104063424B CN 201410240146 A CN201410240146 A CN 201410240146A CN 104063424 B CN104063424 B CN 104063424B
Authority
CN
China
Prior art keywords
sub
pictures
picture
integration
integrated
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
CN201410240146.3A
Other languages
Chinese (zh)
Other versions
CN104063424A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410240146.3A priority Critical patent/CN104063424B/en
Publication of CN104063424A publication Critical patent/CN104063424A/en
Application granted granted Critical
Publication of CN104063424B publication Critical patent/CN104063424B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本公开是关于网页图片的展现方法和展现装置,该展现方法包括:调用具有相同特征的子图片;将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;当接收到终端发送的网页图片获取请求时,将所述整合图片和所述位置信息发送至所述终端,以使所述终端根据所述位置信息将每张子图片呈现在网页的相应位置。本公开的技术方案可以减少网页在首次加载时发起的图片获取请求的数量,避免消耗过多的网络资源,且有助于提高网页的加载速度。

The present disclosure relates to a display method and display device for webpage pictures, the display method includes: calling sub-pictures with the same characteristics; generating an integrated picture from the sub-pictures with the same characteristics, and recording the position information of each sub-picture ; When receiving a web page picture acquisition request sent by the terminal, sending the integrated picture and the location information to the terminal, so that the terminal presents each sub-picture at the corresponding position of the web page according to the location information . The technical solution disclosed in the present disclosure can reduce the number of picture acquisition requests initiated when the webpage is loaded for the first time, avoid excessive consumption of network resources, and help to improve the loading speed of the webpage.

Description

网页图片的展现方法和展现装置Method and device for displaying web page pictures

技术领域technical field

本公开涉及浏览器技术领域,尤其涉及网页图片的展现方法和展现装置。The present disclosure relates to the technical field of browsers, and in particular, to a display method and display device for webpage pictures.

背景技术Background technique

浏览器在向服务器请求到相应的网页文件后,通过加载该网页文件来实现网页的渲染和加载。为了提高网页的加载速度,尤其是当网页包含的图片量较大时,相关技术中提出了通过单独请求和下载网页图片的方式,实现了对网页的分步加载。After the browser requests the corresponding webpage file from the server, it implements rendering and loading of the webpage by loading the webpage file. In order to improve the loading speed of the webpage, especially when the amount of pictures included in the webpage is large, a method of separately requesting and downloading the pictures of the webpage is proposed in the related art to realize the step-by-step loading of the webpage.

然而,随着单一网页的功能越来越复杂,使得在同一网页上显示的图片元素越来越多,则即便采用上述的分步加载方式,该网页在首次加载时仍需要发起与图片元素的数量相等次数的图片获取请求,将导致网络资源的大量消耗,且限制了网页的加载速度。However, as the functions of a single webpage become more and more complex, more and more image elements are displayed on the same webpage, even if the above-mentioned step-by-step loading method is adopted, the webpage still needs to initiate an interaction with the image elements when it is first loaded. An equal number of image acquisition requests will consume a lot of network resources and limit the loading speed of web pages.

发明内容Contents of the invention

本公开提供网页图片的展现方法和展现装置,以解决相关技术中网页在首次加载时需要发起与图片元素的数量相等次数的图片获取请求,将导致网络资源的大量消耗,且限制了网页的加载速度的问题。This disclosure provides a display method and display device for webpage pictures to solve the problem that in the related art, when a webpage is loaded for the first time, it needs to initiate a number of picture acquisition requests equal to the number of picture elements, which will lead to a large consumption of network resources and limit the loading of webpages A matter of speed.

根据本公开实施例的第一方面,提供一种网页图片的展现方法,包括:According to the first aspect of the embodiments of the present disclosure, a method for displaying webpage pictures is provided, including:

调用具有相同特征的子图片;call a subpicture with the same characteristics;

将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;Generating an integrated picture from the sub-pictures with the same characteristics, and recording the position information of each sub-picture;

当接收到终端发送的网页图片获取请求时,将所述整合图片和所述位置信息发送至所述终端,以使所述终端根据所述位置信息将每张子图片呈现在网页的相应位置。When receiving a web page picture acquisition request sent by the terminal, the integrated picture and the position information are sent to the terminal, so that the terminal presents each sub-picture at a corresponding position of the web page according to the position information.

可选的,将所述具有相同特征的子图片生成一张整合图片,包括:Optionally, generate an integrated picture from the sub-pictures with the same characteristics, including:

确定用于对所述子图片进行整合的整合方式;determining an integration method for integrating the sub-pictures;

从所述整合方式中选择对所述子图片进行整合后占用面积最小的整合方式;Selecting an integration method that occupies the smallest area after integrating the sub-pictures from the integration methods;

按照所述占用面积最小的整合方式将所述具有相同特征的子图片生成所述整合图片。and generating the integrated picture from the sub-pictures having the same feature according to the integration manner with the smallest occupied area.

可选的,确定用于对所述子图片进行整合的整合方式包括:Optionally, determining an integration method for integrating the sub-pictures includes:

判断所述子图片的数量是否小于预设数量;judging whether the number of sub-pictures is less than a preset number;

当所述子图片的数量小于预设数量时,通过穷举方式确定所述多种整合方式;以及When the number of sub-pictures is less than a preset number, determine the multiple integration methods in an exhaustive manner; and

当所述子图片的数量大于或等于所述预设数量时,通过贪心策略确定所述多种整合方式。When the number of the sub-pictures is greater than or equal to the preset number, the multiple integration methods are determined through a greedy strategy.

可选的,将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息,包括:Optionally, generate an integrated picture from the sub-pictures with the same characteristics, and record the position information of each sub-picture, including:

将所述多张图片上传至整合服务器;Upload the plurality of pictures to the integration server;

接收所述整合服务器返回的所述整合图片和每张子图片的位置信息。receiving the integrated picture and the location information of each sub-picture returned by the integrated server.

可选的,还包括:Optionally, also include:

判断所述具有相同特征的子图片与所述整合图片中包含的子图片是否匹配;judging whether the sub-picture with the same feature matches the sub-picture included in the integrated picture;

若不匹配,则更新所述整合图片和所述位置信息。If not, update the integrated picture and the location information.

根据本公开实施例的第二方面,提供一种网页图片的展现方法,包括:According to the second aspect of the embodiments of the present disclosure, there is provided a method for displaying webpage pictures, including:

向服务器发送网页图片获取请求;Send a web page picture acquisition request to the server;

接收所述服务器返回的由具有相同特征的子图片生成的整合图片,以及所述子图片的位置信息;receiving an integrated picture generated by sub-pictures having the same characteristics and location information of the sub-pictures returned by the server;

根据所述位置信息将每张子图片呈现在网页的相应位置。Each sub-picture is presented at a corresponding position of the webpage according to the position information.

可选的,根据所述位置信息将每张子图片呈现在网页的相应位置包括:Optionally, presenting each sub-picture at a corresponding position of the webpage according to the position information includes:

根据所述位置信息从所述整合图片中获取每张子图片;Acquiring each sub-picture from the integrated picture according to the position information;

将获取的每张子图片显示在网页的相应位置。Each obtained sub-picture is displayed on a corresponding position of the web page.

根据本公开实施例的第三方面,提供一种网页图片的展现装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for displaying webpage pictures, including:

调用单元,用于调用具有相同特征的子图片;A calling unit, used to call subpictures with the same characteristics;

处理单元,用于将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;A processing unit, configured to generate an integrated picture from the sub-pictures with the same characteristics, and record the position information of each sub-picture;

传输单元,用于当接收到终端发送的网页图片获取请求时,将所述整合图片和所述位置信息发送至所述终端,以使所述终端根据所述位置信息将每张子图片呈现在网页的相应位置。A transmission unit, configured to send the integrated picture and the location information to the terminal when receiving a request for obtaining a webpage picture sent by the terminal, so that the terminal presents each sub-picture in the location according to the location information corresponding location of the page.

可选的,所述处理单元包括:Optionally, the processing unit includes:

确定子单元,用于确定用于对所述子图片进行整合的整合方式;Determining a subunit, configured to determine an integration method for integrating the sub-pictures;

选择子单元,用于从所述整合方式中选择对所述子图片进行整合后占用面积最小的整合方式;Selecting a sub-unit is used to select an integration method that occupies the smallest area after integrating the sub-pictures from the integration methods;

生成子单元,用于按照所述占用面积最小的整合方式将所述具有相同特征的子图片生成为所述整合图片。The generating sub unit is configured to generate the sub-pictures having the same feature as the integrated picture according to the integration manner with the smallest occupied area.

可选的,所述确定子单元包括:Optionally, the determining subunit includes:

数量判断模块,用于判断所述子图片的数量是否小于预设数量;A quantity judging module, configured to judge whether the quantity of the sub-pictures is less than a preset quantity;

策略确定模块,用于在所述子图片的数量小于预设数量的情况下,通过穷举方式确定所述多种整合方式;以及,在所述子图片的数量大于或等于所述预设数量的情况下,通过贪心策略确定所述多种整合方式。A policy determination module, configured to determine the multiple integration methods in an exhaustive manner when the number of sub-pictures is less than a preset number; and, when the number of sub-pictures is greater than or equal to the preset number In the case of , the multiple integration methods are determined through a greedy strategy.

可选的,所述处理单元包括:Optionally, the processing unit includes:

上传子单元,用于将所述多张图片上传至整合服务器;an upload subunit, configured to upload the plurality of pictures to the integration server;

接收子单元,用于接收所述整合服务器返回的所述整合图片和每张子图片的位置信息。The receiving subunit is configured to receive the integrated picture and the location information of each sub-picture returned by the integration server.

可选的,还包括:Optionally, also include:

判断单元,用于判断所述具有相同特征的子图片与所述整合图片中包含的子图片是否匹配;a judging unit, configured to judge whether the sub-picture with the same feature matches the sub-picture included in the integrated picture;

更新单元,用于在不匹配的情况下,更新所述整合图片和所述位置信息。An updating unit, configured to update the integrated picture and the location information if they do not match.

根据本公开实施例的第四方面,提供一种网页图片的展现装置,包括:According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for displaying webpage pictures, including:

发送单元,用于向服务器发送网页图片获取请求;a sending unit, configured to send a request for obtaining a webpage image to a server;

接收单元,用于接收所述服务器返回的由具有相同特征的子图片生成的整合图片,以及所述子图片的位置信息;a receiving unit, configured to receive an integrated picture generated by sub-pictures having the same characteristics returned by the server, and location information of the sub-pictures;

呈现单元,用于根据所述位置信息将每张子图片呈现在网页的相应位置。A presenting unit, configured to present each sub-picture at a corresponding position of the webpage according to the position information.

可选的,所述呈现单元包括:Optionally, the presentation unit includes:

获取子单元,用于根据所述位置信息从所述整合图片中获取每张子图片;An acquisition subunit, configured to acquire each sub-picture from the integrated picture according to the location information;

显示子单元,用于将获取的每张子图片显示在网页的相应位置。The display sub-unit is used to display each obtained sub-picture on a corresponding position of the web page.

根据本公开实施例的第五方面,提供一种网页图片的展现装置,包括:According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus for displaying webpage pictures, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

调用具有相同特征的子图片;call a subpicture with the same characteristics;

将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;Generating an integrated picture from the sub-pictures with the same characteristics, and recording the position information of each sub-picture;

当接收到终端发送的网页图片获取请求时,将所述整合图片和所述位置信息发送至所述终端,以使所述终端根据所述位置信息将每张子图片呈现在网页的相应位置。When receiving a web page picture acquisition request sent by the terminal, the integrated picture and the position information are sent to the terminal, so that the terminal presents each sub-picture at a corresponding position of the web page according to the position information.

根据本公开实施例的第六方面,提供一种网页图片的展现装置,包括:According to a sixth aspect of the embodiments of the present disclosure, there is provided an apparatus for displaying webpage pictures, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

向服务器发送网页图片的获取请求;Send a web page picture acquisition request to the server;

接收所述服务器返回的由具有相同特征的子图片生成的整合图片,以及所述子图片的位置信息;receiving an integrated picture generated by sub-pictures having the same characteristics and location information of the sub-pictures returned by the server;

根据所述位置信息将每张子图片呈现在网页的相应位置。Each sub-picture is presented at a corresponding position of the webpage according to the position information.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

本公开通过将同一网页包含的图片生成为整合图片,使得网页展现时仅需要发起一次请求,即请求该整合图片,减少了网页请求数量,从而有助于避免网络资源的浪费,也提高了网页加载速度。This disclosure generates an integrated image from the images contained in the same web page, so that only one request needs to be initiated when the web page is displayed, that is, to request the integrated image, which reduces the number of web page requests, thereby helping to avoid the waste of network resources and improving the quality of the web page. loading speed.

本公开还通过对图片整合方式的选择,减小图片的整合面积,以减小整合图片的数据量,从而提高整合图片的传输速度,并进一步加快网页加载速度。The present disclosure also reduces the integration area of the pictures by selecting the way of picture integration, so as to reduce the data volume of the integrated pictures, thereby increasing the transmission speed of the integrated pictures, and further accelerating the loading speed of the webpage.

本公开还针对所需整合的子图片数量,选用相应的策略来确定对子图片的整合方式,有助于控制整体运算量,提高子图片的整合效率。According to the number of sub-pictures to be integrated, the present disclosure selects a corresponding strategy to determine the integration method of the sub-pictures, which helps to control the overall calculation amount and improve the integration efficiency of the sub-pictures.

本公开还通过配置专用于图片整合的整合服务器,有助于降低本地设备在执行图片整合和位置信息记录时的运算量。The disclosure also helps to reduce the computation load of the local device when performing image integration and location information recording by configuring an integration server dedicated to image integration.

本公开还通过查看子图片与整合图片中包含的子图片之间的匹配关系,及时更新整合图片和位置信息,以便确保在终端上实现最佳的网页呈现效果。The disclosure also updates the integrated picture and location information in time by checking the matching relationship between the sub-picture and the sub-picture included in the integrated picture, so as to ensure the best web page rendering effect on the terminal.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例示出的一种网页图片的展现方法的流程图。Fig. 1 is a flow chart of a method for displaying web page pictures according to an exemplary embodiment.

图2是根据一示例性实施例示出的另一种网页图片的展现方法的流程图。Fig. 2 is a flow chart showing another method for displaying web page pictures according to an exemplary embodiment.

图3是根据一示例性实施例示出的网页图片的展现方法的应用场景示意图。Fig. 3 is a schematic diagram of an application scenario of a method for displaying a web page picture according to an exemplary embodiment.

图4是根据一示例性实施例示出的另一种网页图片的展现方法的流程图。Fig. 4 is a flow chart showing another method for displaying web page pictures according to an exemplary embodiment.

图5A-5B是根据一示例性实施例示出的根据二叉树结构确定整合方式的示意图。5A-5B are schematic diagrams of determining an integration method according to a binary tree structure according to an exemplary embodiment.

图6是根据一示例性实施例示出的一种网页图片的展现装置的框图。Fig. 6 is a block diagram of an apparatus for displaying webpage pictures according to an exemplary embodiment.

图7是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 7 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图8是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 8 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图9是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 9 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图10是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 10 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图11是根据一示例性实施例示出的一种用于网页图片的展现装置的一结构示意图。Fig. 11 is a schematic structural diagram of an apparatus for displaying webpage pictures according to an exemplary embodiment.

图12是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 12 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图13是根据一示例性实施例示出的另一种网页图片的展现装置的框图。Fig. 13 is a block diagram of another apparatus for displaying web page pictures according to an exemplary embodiment.

图14是根据一示例性实施例示出的一种用于网页图片的展现装置的另一结构示意图。Fig. 14 is another schematic structural diagram of an apparatus for displaying web page pictures according to an exemplary embodiment.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present disclosure is for the purpose of describing particular embodiments only, and is not intended to limit the present disclosure. As used in this disclosure and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present disclosure, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."

图1是根据一示例性实施例示出的一种网页图片的展现方法的流程图,如图1所示,该展现方法可以用于服务器中,包括以下步骤:Fig. 1 is a flow chart of a method for displaying a web page picture according to an exemplary embodiment. As shown in Fig. 1, the method for displaying can be used in a server and includes the following steps:

在步骤101中,调用具有相同特征的子图片;In step 101, subpictures with the same characteristics are called;

在本实施例中,例如该“相同特征”可以为“名称”,即对子图片的名称进行预配置,比如使得用于网页展现的子图片的名称中包含指定的字符(例如“MI”:sample1.MI.png,sample2.MI.png,sample3.MI.png……),从而可以将这些用于网页展现的子图片与服务器中存储的其他图片相互区分,并用于生成对应的整合图片。当然,本公开并不限定“相同特征”的具体类型,子图片的任何属性均可以作为该“相同特征”,以用于识别出对应的子图片,且子图片之间的“相同特征”可以为一种特征或多种特征的组合。例如作为另一实施例,该“相同特征”还可以是“存储路径”,从而可以将处于同一存储路径的图片,均作为用于网页展现的子图片;或者,还可以将“名称”和“存储路径”相结合,从而将处于同一路径下、名称中包含相同字符的图片作为用于网页展现的子图片。In this embodiment, for example, the "same feature" may be "name", that is, the name of the sub-picture is preconfigured, such as making the name of the sub-picture used for web page presentation contain specified characters (such as "MI": sample1.MI.png, sample2.MI.png, sample3.MI.png...), so that these sub-pictures used for web page presentation can be distinguished from other pictures stored in the server, and used to generate corresponding integrated pictures. Of course, the present disclosure does not limit the specific type of "same feature", and any attribute of a sub-picture can be used as the "same feature" to identify the corresponding sub-picture, and the "same feature" between sub-pictures can be A feature or a combination of features. For example, as another embodiment, the "same feature" can also be a "storage path", so that pictures in the same storage path can be used as sub-pictures for web page presentation; or, "name" and " storage path", so that the pictures under the same path and containing the same characters in the name are used as sub-pictures for web page display.

在本实施例中,以“名称”为例进行说明。对应于不同的网页,可以使得用于每个网页的子图片的名称中包含不同的字符,比如对应于网页1的子图片,其名称中均包含“MI1”(例如sample1.MI1.png,sample2.MI1.png,sample3.MI1.png……);对应于网页2的子图片,其名称中均包含“MI2”(例如sample1.MI2.png,sample2.MI2.png,sample3.MI2.png……)等,从而使不同网页对应的子图片之间也能够相互区分,并用于分别生成对应的整合图片。In this embodiment, "name" is used as an example for description. Corresponding to different webpages, different characters may be included in the name of the subpictures used for each webpage, for example, the subpictures corresponding to webpage 1 all contain "MI1" in their names (such as sample1.MI1.png, sample2 .MI1.png, sample3.MI1.png...); corresponding to the subpictures of webpage 2, all of which contain "MI2" in their names (for example, sample1.MI2.png, sample2.MI2.png, sample3.MI2.png... . . . ), etc., so that sub-pictures corresponding to different webpages can also be distinguished from each other, and used to generate corresponding integrated pictures respectively.

下面从网页的开发层面,以针对“网页1”的项目开发过程为例进行说明,其处理过程如下:From the development level of the web page, the following takes the project development process of "Web Page 1" as an example to illustrate, and the processing process is as follows:

首先,将网页1所需的子图片进行规则地命名,比如使得用于网页1的所有子图片的名称均为“*.MI1.png”,其中“*”为每张子图片的唯一名称,“MI1”为对应于网页1的识别参数,则网页1的开发项目的目录结构可以如下:First, regularly name the sub-pictures required by web page 1, for example, make the names of all sub-pictures used in web page 1 be "*.MI1.png", where "*" is the unique name of each sub-picture, "MI1" is the identification parameter corresponding to webpage 1, then the directory structure of the development project of webpage 1 can be as follows:

其中的“sample1.MI1.png”、“sample2.MI1.png”、“sample3.MI1.png”即网页1引用的多张子图片。其中,test.css中包含对各张子图片的调用语句,比如:Among them, "sample1.MI1.png", "sample2.MI1.png", and "sample3.MI1.png" are multiple sub-pictures referenced by webpage 1. Among them, test.css contains calling statements for each sub-picture, such as:

.button{.button{

background-image:url(”images/sample1.MI1.png”); background-image:url("images/sample1.MI1.png");

}}

上述语句表达了:对存放路径为“images/sample1.MI1.png”的子图片“sample1.MI1.png”进行了调用。The above sentence expresses: calling the sub-picture "sample1.MI1.png" whose storage path is "images/sample1.MI1.png".

在步骤102中,将具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;In step 102, an integrated picture is generated from the sub-pictures with the same characteristics, and the position information of each sub-picture is recorded;

在本实施例中,通过记录每张用于网页展现的子图片在整合图片中的位置信息,使得在执行网页展现时,能够根据该位置信息在整合图片中准确获取相应的单张子图片,并用于展现在网页上的相应位置。In this embodiment, by recording the position information of each sub-picture used for webpage presentation in the integrated picture, the corresponding single sub-picture can be accurately obtained in the integrated picture according to the position information when performing webpage presentation, And used to display the corresponding position on the web page.

仍以上述“网页1”的开发为例:根据名称调用网页1展现所需的所有子图片,比如所有包含“MI1”的图片,以用于生成相应的整合图片“auto.MI1.png”。同时,分别获取“sample1.MI1.png”、“sample2.MI1.png”、“sample3.MI1.png”等在整合图片“auto.MI1.png”中的位置信息。Still take the development of the above "web page 1" as an example: call all sub-pictures required for displaying web page 1 according to the name, such as all pictures containing "MI1", to generate the corresponding integrated picture "auto.MI1.png". At the same time, the location information of "sample1.MI1.png", "sample2.MI1.png", "sample3.MI1.png" and so on in the integrated picture "auto.MI1.png" are acquired respectively.

基于获取的整合图片和位置信息,需要将开发语句中对每张子图片的调用修改为对整合图片的调用,并添加每张子图片在整合图片中的位置信息,以确保在网页展现的过程中,基于该位置信息在整合图片中选取相应的每张子图片。此时,当前项目的目录结构可以更新为:Based on the obtained integrated picture and location information, it is necessary to modify the call to each sub-picture in the development statement to a call to the integrated picture, and add the position information of each sub-picture in the integrated picture to ensure the process of displaying on the webpage , select each corresponding sub-picture in the integrated picture based on the position information. At this point, the directory structure of the current project can be updated as:

除了项目目录,test.css的内容也需要进行相应的修改,具体如下:In addition to the project directory, the content of test.css also needs to be modified accordingly, as follows:

一方面,子图片的调用由“images/sample1.MI1.png”修改为“images/auto.MI1.png”,即由对“sample1.MI1.png”的调用更换为对“auto.MI1.png”的调用;另一方面,新添的上述语句表明“sample1.MI1.png”在整合图片中的位置信息为:以(0,0)点为端点(通常为整合图片的左上角)、宽度(如水平方向)为256px、长度(如竖直方向)为256px的矩形区域。On the one hand, the sub-picture call is changed from "images/sample1.MI1.png" to "images/auto.MI1.png", that is, the call to "sample1.MI1.png" is replaced with "auto.MI1.png "; on the other hand, the newly added statement above shows that the position information of "sample1.MI1.png" in the integrated image is: with (0,0) as the endpoint (usually the upper left corner of the integrated image), width A rectangular area (such as horizontal direction) of 256px and length (such as vertical direction) of 256px.

通过上述过程,使得网页的开发过程被分为两个部分:1)与整合图片无关的开发过程;2)基于整合图片的语句调整过程。因此,在开发过程1)中,便于实现对子图片的更改、增减等,便于对开发语句的调试;而在开发过程2)中,则可以基于已经调试完成的语句,直接实现图片整合和语句调整,有助于加快网页项目的开发速度。Through the above process, the development process of the webpage is divided into two parts: 1) a development process not related to the integrated picture; 2) a sentence adjustment process based on the integrated picture. Therefore, in the development process 1), it is convenient to realize the modification, increase or decrease of sub-pictures, etc., and to debug the development statement; while in the development process 2), it is possible to directly realize picture integration and Statement adjustments help to speed up the development of web projects.

在步骤103中,当接收到终端发送的网页图片获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。In step 103, when receiving the web page picture acquisition request sent by the terminal, the integrated picture and location information are sent to the terminal, so that the terminal presents each sub-picture at the corresponding position of the webpage according to the location information.

在本实施例中,针对终端发送的网页图片获取请求,可以通过返回整合图片和相应的位置信息,从而将该网页所需的所有图片一次性返回终端。其中,终端在需要加载网页时会首先发起网页获取请求,以获得该网页对应的网页文档;当解析出该网页文档中对应于“图片”的标签(tag)时,终端才会发起上述的“网页图片获取请求”,以获取整合图片和位置信息。In this embodiment, for the web page image acquisition request sent by the terminal, all the images required by the web page can be returned to the terminal at one time by returning the integrated image and corresponding location information. Wherein, when the terminal needs to load a webpage, it will first initiate a webpage acquisition request to obtain the webpage document corresponding to the webpage; when the tag corresponding to the "picture" in the webpage document is parsed out, the terminal will initiate the above-mentioned " web page image fetch request" to obtain integrated image and location information.

由上述实施例可见,通过将每个网页中的所有图片(即子图片)生成为整合图片,使得终端在请求网页图片时,可以通过获取整合图片而实现对所有图片的一次性获取,使得对网页图片的请求次数不再关联于网页中包含图片的数量,有效降低了图片请求次数,有助于降低对网络资源的占用,并加快网页的加载速度。It can be seen from the above-mentioned embodiments that by generating all the pictures (i.e. sub-pictures) in each web page as integrated pictures, when the terminal requests a web page picture, it can realize the one-time acquisition of all pictures by obtaining the integrated picture, so that the The number of requests for webpage images is no longer related to the number of images contained in the webpage, which effectively reduces the number of image requests, helps reduce the occupation of network resources, and speeds up the loading speed of webpages.

在前述的网页图片的展现方法的实施例中,提出了基于服务器端的技术方案;相应的,本公开还提出了基于用户端的实施例。In the aforementioned embodiments of the method for displaying webpage pictures, a server-based technical solution is proposed; correspondingly, the present disclosure also proposes a client-based embodiment.

如图2所示,图2是根据一示例性实施例示出的另一种网页图片的展现方法的流程图,该展现方法可以应用于用户侧的终端或移动终端,可以包括以下步骤:As shown in FIG. 2, FIG. 2 is a flow chart of another method for displaying webpage pictures according to an exemplary embodiment. The method for displaying can be applied to a terminal or a mobile terminal on the user side, and may include the following steps:

在步骤201中,向服务器发送网页图片获取请求;In step 201, send a web page image acquisition request to the server;

在步骤202中,接收服务器返回的由具有相同特征的子图片生成的整合图片,以及子图片的位置信息;In step 202, the integrated picture generated by the sub-pictures with the same characteristics and the location information of the sub-pictures returned by the server are received;

在步骤203中,根据位置信息将每张子图片呈现在网页的相应位置。In step 203, each sub-picture is presented at a corresponding position of the webpage according to the position information.

其中,根据位置信息将多张图片中的每张图片呈现在网页的相应位置可以包括:根据位置信息从整合图片中获取每张子图片;将获取的每张子图片显示在网页的相应位置。Wherein, presenting each of the plurality of pictures at a corresponding position of the webpage according to the location information may include: obtaining each sub-picture from the integrated picture according to the location information; and displaying each obtained sub-picture at a corresponding position of the webpage.

在上述实施例中,仅需向服务器发起一次网页图片的获取请求,即可获取对应于网页中的所有图片的整合图片,以用于根据该整合图片和相应的位置信息,将每张图片分别展现于网页中,从而减少了请求发送次数,有助于降低网络资源的占用、加快网页展现速度。In the above-mentioned embodiment, it is only necessary to initiate a web page image acquisition request to the server once to obtain integrated images corresponding to all images in the web page, so as to separate each image according to the integrated image and corresponding location information. It is displayed on the webpage, thereby reducing the number of requests sent, helping to reduce the occupation of network resources and speed up the display of webpages.

作为一示例性实施例,图3示出了一种网页图片的展现方法的应用场景示意图。As an exemplary embodiment, FIG. 3 shows a schematic diagram of an application scenario of a method for displaying a web page picture.

如图3所示,假定一网页中包含左侧所示的7张独立的子图片。首先,服务器侧需要将这7张子图片的命名进行统一,比如采用“*.MI1.png”的格式,从而表明这些子图片需要展现在同一网页中。As shown in FIG. 3 , it is assumed that a web page contains 7 independent sub-pictures shown on the left. First of all, the server side needs to unify the naming of these 7 sub-pictures, such as adopting the format of "*.MI1.png", so as to indicate that these sub-pictures need to be displayed on the same webpage.

服务器可以根据名称中包含的识别参数(如上述的“MI1”)来调用当前网页对应的所有子图片,并在本地完成整合图片的生成。从理论上而言,只要多张子图片之间不存在交叉重叠等现象,即确保每张子图片在整合图片中的独立性,该整合图片即可应用于相应网页的展现中。The server can invoke all the sub-pictures corresponding to the current web page according to the identification parameters included in the name (such as the above-mentioned "MI1"), and complete the generation of the integrated picture locally. Theoretically speaking, as long as there is no crossing and overlapping between multiple sub-pictures, that is, the independence of each sub-picture in the integrated picture is ensured, the integrated picture can be applied to the presentation of the corresponding webpage.

可选的,由于终端在展现网页时,是根据位置信息从整合图片中获取每张子图片的,因而为了方便对每张子图片的获取,并且降低记录的位置信息的复杂度,需要在整合处理的过程中加以更多干涉。该干涉过程可以包括:Optionally, since the terminal obtains each sub-picture from the integrated picture according to the location information when displaying the webpage, in order to facilitate the acquisition of each sub-picture and reduce the complexity of the recorded location information, it is necessary to more intervention in the process. This intervention process can include:

如图3所示,将每张子图片对应的占用区域都扩展为虚线所示的矩形区域中,且多张子图片之间的矩形区域相互不重叠。因此,仅需要记录每个矩形区域的一个端点的坐标信息以及该矩形区域的长、宽,即可在整合图片上唯一确定相应的子图片。As shown in FIG. 3 , the occupied area corresponding to each sub-picture is expanded into a rectangular area shown by a dotted line, and the rectangular areas between multiple sub-pictures do not overlap each other. Therefore, it is only necessary to record the coordinate information of one end point of each rectangular area and the length and width of the rectangular area, so that the corresponding sub-picture can be uniquely determined on the integrated picture.

作为一示例性实施例,图3中以整合图片的左上角为原点O(0,0)来建立坐标系XOY,则可以分别记录每张子图片的位置信息。比如最左侧的“时钟”子图片的位置信息可以为:{(0,0)、256px、260px},表明在整合图片中以(0,0)为端点、沿X轴方向取长度为256px(像素)、沿Y轴方向取宽度为260px,即可获取该“时钟”子图片。再比如与“时钟”子图片相邻的“笑脸”子图片的位置信息可以为:{(262,137)、128、123},表明在整合图片中以(262,137)为端点、沿X轴方向取长度为128px、沿Y轴方向取宽度为123px,即可获取该“笑脸”子图片。As an exemplary embodiment, in FIG. 3 , the coordinate system XOY is established with the upper left corner of the integrated picture as the origin O(0,0), and the position information of each sub-picture can be recorded separately. For example, the position information of the leftmost "clock" sub-picture can be: {(0,0), 256px, 260px}, indicating that in the integrated picture, the end point is (0,0) and the length along the X axis is 256px (pixels), take the width along the Y axis as 260px, and you can get the "clock" sub-picture. For another example, the position information of the "smiley face" sub-picture adjacent to the "clock" sub-picture can be: {(262,137), 128, 123}, indicating that in the integrated picture, the end point is (262,137) and the length is taken along the X-axis direction 128px and a width of 123px along the Y axis to get the "smiley face" sub-picture.

在相关技术中,终端在展现该网页时,需要向服务器分别发送7次网页图片的获取请求,以分别获取这7张独立图片。而在本公开的技术方案中,通过将这7张子图片整合为一张整合图片,使得终端仅需要发送一次网页图片的获取请求,即可获取该整合图片,并据此实现对网页中所有图片的展现。当然,图3仅示出了一种示例性的图片整合方式,而对于多张子图片的整合,实际上可能存在很多种不同情况。因此,可以根据实际需求来确定采用的整合方式。In the related technology, when displaying the webpage, the terminal needs to send seven acquisition requests of webpage images to the server, so as to obtain the seven independent images respectively. However, in the technical solution of the present disclosure, by integrating these 7 sub-pictures into one integrated picture, the terminal only needs to send a webpage picture acquisition request once to obtain the integrated picture, and accordingly realize all the pictures in the webpage The display of pictures. Of course, FIG. 3 only shows an exemplary picture integration manner, but for the integration of multiple sub-pictures, there may actually be many different situations. Therefore, the integration method adopted can be determined according to actual needs.

此外,本公开中的“相应位置”是指每张子图片在网页上被配置的展现位置,由浏览器根据对网页文档(如HTML(HyperText Mark-up Language,超文本标记语言)文档)的解析,即可确定每张子图片在网页上的展现位置。比如图3中,“时钟”子图片展现在网页的右上角、“笑脸”子图片展现在网页的左上角等。In addition, the "corresponding position" in the present disclosure refers to the configured display position of each sub-picture on the webpage, which is determined by the browser according to the configuration of the webpage document (such as HTML (HyperText Mark-up Language, hypertext markup language) document). Parse to determine the display position of each sub-picture on the web page. For example, in Figure 3, the "clock" sub-picture is displayed in the upper right corner of the webpage, the "smiley face" sub-picture is displayed in the upper left corner of the webpage, and so on.

如图4所示,图4示出了根据一示例性实施例示出的一种网页图片的展现方法的流程图,该方法的实现步骤可以包括:As shown in FIG. 4, FIG. 4 shows a flow chart of a method for displaying a web page picture according to an exemplary embodiment, and the implementation steps of the method may include:

在步骤401中,调用具有相同特征的子图片;In step 401, subpictures with the same characteristics are called;

在步骤402中,确定用于对所述子图片进行整合的整合方式;In step 402, an integration method for integrating the sub-pictures is determined;

在本实施例中,作为一示例性实施例,由于多张子图片的每种整合方式,实际上都可以通过相应的二叉树结构来进行表示,因而可以根据多张子图片对应的二叉树结构来确定相应的整合方式。In this embodiment, as an exemplary embodiment, since each integration method of multiple sub-pictures can actually be represented by a corresponding binary tree structure, it can be determined according to the binary tree structure corresponding to multiple sub-pictures corresponding integration method.

比如图5A中,以“图1”、“图2”和“图3”的整合为例,说明了二叉树结构与整合方式之间的相互关系。首先,确定“图1”、“图2”和“图3”的数量,即共3张子图片;然后,根据数量生成图5A左侧所示的二叉树结构,该结构中沿Y轴方向(即竖直方向)的线A将“图1”与其他子图片之间分离,并通过沿X轴方向(即水平方向)的线B将“图2”和“图3”之间分离;最后,基于上述的二叉树结构,即可生成图5A右侧所示的整合结果。For example, in FIG. 5A , taking the integration of "Figure 1", "Figure 2" and "Figure 3" as an example, it illustrates the relationship between the binary tree structure and the way of integration. First, determine the quantity of "Figure 1", "Figure 2" and "Figure 3", that is, a total of 3 sub-pictures; then, according to the quantity, generate the binary tree structure shown on the left side of Figure 5A, in this structure along the Y axis direction ( That is, the line A in the vertical direction) separates "Figure 1" from other sub-pictures, and the line B along the X-axis direction (ie, the horizontal direction) separates "Figure 2" and "Figure 3"; finally , based on the above binary tree structure, the integration result shown on the right side of FIG. 5A can be generated.

类似地,如图5B所示,示出了对“图1”、“图2”和“图3”进行整合的另一整合方式:在图5B左侧所示的二叉树结构中,通过沿Y轴方向的线A将“图1”与其他子图片之间分离,并通过沿Y轴方向的线B将“图2”和“图3”之间分离,从而基于该二叉树结构,即可生成图5B右侧所示的整合结果。Similarly, as shown in Figure 5B, another way of integrating "Figure 1", "Figure 2" and "Figure 3" is shown: in the binary tree structure shown on the left side of Figure 5B, through the The line A in the axis direction separates "Figure 1" from other sub-pictures, and the line B along the Y-axis direction separates "Figure 2" and "Figure 3", so that based on the binary tree structure, you can generate The integration results are shown on the right side of Figure 5B.

在步骤403中,从整合方式中选择对子图片进行整合后占用面积最小的整合方式;In step 403, the integration method that occupies the smallest area after integrating the sub-pictures is selected from the integration methods;

在本实施例中,结合图5A和图5B所示的实施例:根据每种二叉树结构,就可以确定“图1”、“图2”和“图3”对应的整合图片(如图5A和图5B的右侧所示),并由此计算相应的整合后占用面积。比如图5A中,整合后占用面积即“图1”、“图2”和“图3”的面积之和;而在图5B中,整合后占用面积为虚线所示的矩形的面积,即三个“图1”的面积之和。因此,图5A对应的整合方式可以被认为优于图5B对应的整合方式。In this embodiment, combined with the embodiment shown in FIG. 5A and FIG. 5B: according to each binary tree structure, it is possible to determine the integrated pictures corresponding to "Fig. 1", "Fig. 2" and "Fig. 3" (as shown in Fig. 5A and shown on the right side of Figure 5B), and the corresponding integrated occupied area is calculated accordingly. For example, in Fig. 5A, the area occupied after integration is the sum of the areas of "Fig. 1", "Fig. 2" and "Fig. 3"; while in Fig. 5B, the area occupied after integration is the area of the rectangle shown by the dotted line, i.e. three The sum of the areas of "Figure 1". Therefore, the integration method corresponding to FIG. 5A can be considered to be superior to the integration method corresponding to FIG. 5B .

在步骤404中,按照占用面积最小的整合方式将具有相同特征的子图片生成整合图片,并记录每张子图片在整合图片中的位置信息。In step 404, the sub-pictures with the same characteristics are generated into an integrated picture according to the integration method with the smallest occupied area, and the position information of each sub-picture in the integrated picture is recorded.

在本实施例中,通过比较各个整合方式对应的整合后占用面积的大小,从而可以选出整合后占用面积最小的整合方式,并使得相应的整合图片的数据量最小,有助于缩短整合图片的传输时间,加快相应网页的展现速度。In this embodiment, by comparing the size of the integrated occupied area corresponding to each integrated method, the integrated integrated method with the smallest occupied area can be selected, and the data volume of the corresponding integrated image is minimized, which helps to shorten the integrated image. The transmission time is shortened, and the display speed of the corresponding web page is accelerated.

其中,当所需整合的子图片的数量一定时,其对应的二叉树结构也能够确定。但是,当子图片数量较大时,其对应的二叉树结构的数量将非常多,甚至远大于n!(n为子图片数量,n!表示n的阶乘)。因此,为了控制整合处理过程中的计算量,提高整合效率,可以进一步采用下述方式:Wherein, when the number of sub-pictures to be integrated is constant, the corresponding binary tree structure can also be determined. However, when the number of sub-pictures is large, the number of corresponding binary tree structures will be very large, even far greater than n! (n is the number of sub-pictures, n! represents the factorial of n). Therefore, in order to control the amount of calculation in the integration process and improve the integration efficiency, the following methods can be further adopted:

判断子图片的数量是否小于预设数量。其中,当子图片的数量小于预设数量时,通过穷举方式确定多种整合方式,即列举出子图片对应的所有情况下的整合方式,并一一确定相应的整合后占用面积,以选择出占用面积最小的整合方式。同时,当子图片的数量大于或等于预设数量时,可以通过贪心策略等确定多种整合方式。当采用贪心策略等方式时,每次总考虑当前最优解,从而通过多次试探,能够得到有限个数的相对较优的整合方式,从而能够在当前确定了的所有二叉树结构中,选择出整合后占用面积最小的整合方式。Determine whether the number of sub-pictures is less than a preset number. Among them, when the number of sub-pictures is less than the preset number, a variety of integration methods are determined through an exhaustive method, that is, the integration methods in all cases corresponding to the sub-pictures are listed, and the corresponding integrated occupied areas are determined one by one to select The integration method that takes up the smallest area. At the same time, when the number of sub-pictures is greater than or equal to the preset number, multiple integration methods may be determined through a greedy strategy or the like. When adopting methods such as the greedy strategy, the current optimal solution is always considered each time, so that a limited number of relatively good integration methods can be obtained through multiple trials, so that it can be selected among all the currently determined binary tree structures. The integration method that occupies the smallest area after integration.

需要说明的是:It should be noted:

在确定了最终所需要采用的整合方式后,本地设备执行对子图片的整合处理。在整合处理的过程中,基于每张子图片的长、宽等参数,以及多张子图片之间的位置关系,即可获取和记录每张子图片对应的位置信息,以用于最终的网页展现。After determining the final integration method to be adopted, the local device performs integration processing on the sub-pictures. In the process of integration processing, based on the length, width and other parameters of each sub-picture, as well as the positional relationship between multiple sub-pictures, the corresponding position information of each sub-picture can be obtained and recorded for use in the final web page show.

此外,除了在服务器本地执行整合处理,还可以配置另一整合服务器,使其专用于对子图片进行整合处理,则相应的处理步骤可以包括:将子图片上传至整合服务器;接收整合服务器返回的整合图片和每张子图片的位置信息。In addition, in addition to performing integration processing locally on the server, another integration server can also be configured to be dedicated to the integration processing of the sub-pictures, and the corresponding processing steps may include: uploading the sub-pictures to the integration server; Integrate the image and the location information of each sub-image.

其中,通过配置专用于子图片整合的整合服务器,有助于节省本地服务器的运算资源。并且,当整合服务器的配置较高时,有助于提高对子图片的整合效率。其中,整合服务器也可以采用图4所示的技术方案,确保选用整合后占用面积最小的整合方式,以减小整合图片的数据量、提高整合图片的传输效率以及加快网页的展现速度。Wherein, by configuring an integration server dedicated to sub-picture integration, it is helpful to save computing resources of the local server. Moreover, when the configuration of the integration server is higher, it is helpful to improve the integration efficiency of the sub-pictures. Among them, the integration server can also use the technical solution shown in Figure 4 to ensure that the integration method with the smallest occupied area after integration is selected to reduce the data volume of the integrated image, improve the transmission efficiency of the integrated image, and accelerate the display speed of the web page.

在步骤405中,当接收到终端发送的网页图片获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。In step 405, when receiving the web page picture acquisition request sent by the terminal, the integrated picture and location information are sent to the terminal, so that the terminal presents each sub-picture at the corresponding position of the webpage according to the location information.

在上述任一网页图片的展现方法的实施例中,还可以判断具有相同特征的子图片与整合图片中包含的子图片是否匹配;若不匹配,则更新整合图片和位置信息,从而确保终端获取的整合图片和位置信息总是最新数据,以使得呈现出最佳的网页展现效果。In any embodiment of the method for displaying webpage pictures above, it can also be judged whether the sub-pictures with the same characteristics match the sub-pictures contained in the integrated picture; The integrated pictures and location information are always the latest data, so as to present the best webpage display effect.

与前述的基于服务器侧的网页图片的展现方法的实施例相对应,本公开还提供了用于服务器侧的网页图片的展现装置的实施例。Corresponding to the foregoing embodiment of the method for displaying web page pictures based on the server side, the present disclosure also provides embodiments of an apparatus for displaying web page pictures on the server side.

图6是根据一示例性实施例示出的一种网页图片的展现装置的框图。如图6所示,该展现装置包括:调用单元61、处理单元62和传输单元63。Fig. 6 is a block diagram of an apparatus for displaying web page pictures according to an exemplary embodiment. As shown in FIG. 6 , the presentation device includes: a calling unit 61 , a processing unit 62 and a transmission unit 63 .

其中,调用单元61,被配置为调用具有相同特征的子图片;Wherein, the calling unit 61 is configured to call sub-pictures with the same characteristics;

处理单元62,被配置将具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;The processing unit 62 is configured to generate an integrated picture from the sub-pictures with the same characteristics, and record the position information of each sub-picture;

传输单元63,被配置为当接收到终端发送的网页图片获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。The transmission unit 63 is configured to send the integrated picture and location information to the terminal when receiving the webpage picture acquisition request sent by the terminal, so that the terminal presents each sub-picture at a corresponding position on the webpage according to the location information.

在上述实施例中,通过将每个网页中的所有图片(即子图片)生成为整合图片,使得终端在请求网页图片时,可以通过获取整合图片而实现对所有图片的一次性获取,使得对网页图片的请求次数不再关联于网页中包含图片的数量,有效降低了图片请求次数,有助于降低对网络资源的占用,并加快网页的加载速度。In the above-mentioned embodiment, by generating all the pictures (ie, sub-pictures) in each web page as integrated pictures, when the terminal requests a web page picture, it can realize the one-time acquisition of all pictures by obtaining the integrated picture, so that the The number of requests for webpage images is no longer related to the number of images contained in the webpage, which effectively reduces the number of image requests, helps reduce the occupation of network resources, and speeds up the loading speed of webpages.

如图7所示,图7是根据一示例性实施例示出的另一种网页图片的展现装置的框图,该实施例在前述图6所示实施例的基础上,处理单元62可以包括:确定子单元621、选择子单元622和生成子单元623。As shown in FIG. 7 , FIG. 7 is a block diagram of another display device for web page pictures according to an exemplary embodiment. On the basis of the embodiment shown in FIG. 6 , the processing unit 62 may include: determining A subunit 621 , a selection subunit 622 and a generation subunit 623 .

其中,确定子单元621,被配置为确定用于对子图片进行整合的整合方式;Wherein, the determining subunit 621 is configured to determine an integration method for integrating the sub-pictures;

选择子单元622,被配置为从整合方式中选择对子图片进行整合后占用面积最小的整合方式;The selection subunit 622 is configured to select an integration method that occupies the smallest area after integrating the sub-pictures from the integration methods;

生成子单元623,被配置为按照占用面积最小的整合方式将具有相同特征的子图片生成为整合图片。The generation subunit 623 is configured to generate sub-pictures with the same feature into an integrated picture in an integration manner that occupies the smallest area.

在上述实施例中,通过比较各个整合方式对应的整合后占用面积的大小,从而可以选出整合后占用面积最小的整合方式,并使得相应的整合图片的数据量最小,有助于缩短整合图片的传输时间,加快相应网页的展现速度。In the above-mentioned embodiment, by comparing the size of the integrated occupied area corresponding to each integrated method, the integrated integrated method with the smallest occupied area can be selected, and the data volume of the corresponding integrated image is minimized, which helps to shorten the integrated image. The transmission time is shortened, and the display speed of the corresponding web page is accelerated.

当然,本领域技术人员可以理解的是:采用任意方式对子图片进行整合后,生成的整合图片均能够适用于本公开的技术方案中。Of course, those skilled in the art can understand that: after the sub-pictures are integrated in any manner, the generated integrated picture can be applicable to the technical solution of the present disclosure.

如图8所示,图8是根据一示例性实施例示出的另一种网页图片的展现装置的框图,该实施例在前述图7所示实施例的基础上,确定子单元621可以包括:数量判断模块621A和策略确定模块621B。As shown in FIG. 8 , FIG. 8 is a block diagram of another webpage picture display device according to an exemplary embodiment. In this embodiment, on the basis of the embodiment shown in FIG. 7 , the determining subunit 621 may include: Quantity judging module 621A and strategy determining module 621B.

其中,数量判断模块621A,被配置为判断子图片的数量是否小于预设数量;Wherein, the number judging module 621A is configured to judge whether the number of sub-pictures is less than a preset number;

策略确定模块621B,被配置为在子图片的数量小于预设数量的情况下,通过穷举方式确定多种整合方式;以及,在子图片的数量大于或等于预设数量的情况下,通过贪心策略确定多种整合方式。The policy determination module 621B is configured to determine multiple integration methods in an exhaustive manner when the number of sub-pictures is less than a preset number; and, when the number of sub-pictures is greater than or equal to a preset number, greedily Strategies determine the various integration methods.

在上述实施例中,通过针对不同情况而采用不同的策略,有助于在子图片数量较少(比如小于预设数量)时,通过穷举方式来使得整合后占用面积最小;而在子图片数量较多(比如大于或等于预设数量)时,通过如贪心策略等来减小运算量,并在得到的多种整合方式中选择整合后占用面积相对最小的整合方式。In the above-mentioned embodiments, by adopting different strategies for different situations, it is helpful to minimize the occupied area after integration by exhaustive means when the number of sub-pictures is small (for example, less than the preset number); When the number is large (for example, greater than or equal to the preset number), the calculation amount is reduced through a greedy strategy, and the integration method with the smallest occupied area after integration is selected among the obtained multiple integration methods.

如图9所示,图9是根据一示例性实施例示出的另一种网页图片的展现装置的框图,该实施例在前述图6所示实施例的基础上,处理单元62可以包括:上传子单元624和接收子单元625。As shown in FIG. 9, FIG. 9 is a block diagram of another display device for webpage pictures according to an exemplary embodiment. On the basis of the embodiment shown in FIG. 6, the processing unit 62 may include: upload subunit 624 and receiving subunit 625 .

其中,上传子单元624,被配置为将子图片上传至整合服务器;Wherein, the upload subunit 624 is configured to upload the sub-picture to the integration server;

接收子单元625,被配置为接收整合服务器返回的整合图片和每张子图片的位置信息。The receiving subunit 625 is configured to receive the integrated picture and the location information of each sub-picture returned by the integration server.

需要说明的是,上述图9所示的装置实施例中的获取单元62的结构也可以包含在前述图6至图8任意一个装置实施例中,对此本公开不进行限制。It should be noted that the structure of the acquiring unit 62 in the device embodiment shown in FIG. 9 may also be included in any device embodiment in FIGS. 6 to 8 , and this disclosure is not limited thereto.

在上述实施例中,通过配置专用于图片整合的整合服务器,有助于节省本地服务器的运算资源。并且,当整合服务器的配置较高时,有助于提高对子图片的整合效率。In the foregoing embodiments, by configuring an integration server dedicated to image integration, it is helpful to save computing resources of the local server. Moreover, when the configuration of the integration server is higher, it is helpful to improve the integration efficiency of the sub-pictures.

如图10所示,图10是根据一示例性实施例示出的另一种网页图片的展现装置的框图,该实施例在前述图6所示实施例的基础上,还可以包括:判断单元64和更新单元65。As shown in FIG. 10 , FIG. 10 is a block diagram of another display device for webpage pictures according to an exemplary embodiment. On the basis of the embodiment shown in FIG. 6 , this embodiment may further include: a judging unit 64 and updating unit 65 .

其中,判断单元64,被配置为判断所述具有相同特征的子图片与所述整合图片中包含的子图片是否匹配;Wherein, the judging unit 64 is configured to judge whether the sub-picture with the same feature matches the sub-picture included in the integrated picture;

更新单元65,被配置为在不匹配的情况下,更新所述整合图片和所述位置信息。The updating unit 65 is configured to update the integrated picture and the location information in the case of mismatch.

在上述实施例中,通过查看子图片与整合图片中包含的子图片之间的匹配关系,及时更新整合图片和位置信息,以便确保在终端上实现最佳的网页呈现效果。In the above embodiment, by checking the matching relationship between the sub-picture and the sub-picture included in the integrated picture, the integrated picture and the location information are updated in time, so as to ensure the best web page rendering effect on the terminal.

上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.

对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. It can be understood and implemented by those skilled in the art without creative effort.

相应的,本公开还提供一种网页图片的展现装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为:调用具有相同特征的子图片;将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;当接收到终端发送的网页图片获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。Correspondingly, the present disclosure also provides an apparatus for displaying webpage pictures, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: call a sub-picture with the same feature; Sub-pictures with the same characteristics generate an integrated picture, and record the location information of each sub-picture; when receiving a web page picture acquisition request sent by the terminal, send the integrated picture and location information to the terminal, so that the terminal can Render each sub-picture in its corresponding position on the web page.

相应的,本公开还提供一种服务器,服务器包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行一个或者一个以上程序包含用于进行以下操作的指令:调用具有相同特征的子图片;将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;当接收到终端发送的网页图片的获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。Correspondingly, the present disclosure also provides a server, the server includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors. The above program includes instructions for performing the following operations: call the sub-pictures with the same characteristics; generate an integrated picture from the sub-pictures with the same characteristics, and record the position information of each sub-picture; when receiving the sub-picture sent by the terminal When obtaining a request for a webpage image, the integrated image and location information are sent to the terminal, so that the terminal presents each sub-image at a corresponding location on the webpage according to the location information.

如图11所示,图11是根据一示例性实施例示出的一种用于网页图片的展现装置的一结构示意图。例如,装置1100可以被提供为一服务器。参照图11,装置1100包括处理组件1122,其进一步包括一个或多个处理器,以及由存储器1132所代表的存储器资源,用于存储可由处理部件1122的执行的指令,例如应用程序。存储器1132中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1122被配置为执行指令,以执行上述网页图片的展现方法。As shown in FIG. 11 , FIG. 11 is a schematic structural diagram of an apparatus for displaying web page pictures according to an exemplary embodiment. For example, the apparatus 1100 may be provided as a server. Referring to FIG. 11 , apparatus 1100 includes processing component 1122 , which further includes one or more processors, and a memory resource represented by memory 1132 for storing instructions executable by processing component 1122 , such as application programs. The application program stored in memory 1132 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1122 is configured to execute instructions to execute the above-mentioned method for displaying webpage pictures.

装置1100还可以包括一个电源组件1126被配置为执行装置1100的电源管理,一个有线或无线网络接口1150被配置为将装置1100连接到网络,和一个输入输出(I/O)接口1158。装置1100可以操作基于存储在存储器1132的操作系统,例如Windows ServerTM,MacOS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Device 1100 may also include a power component 1126 configured to perform power management of device 1100 , a wired or wireless network interface 1150 configured to connect device 1100 to a network, and an input-output (I/O) interface 1158 . The apparatus 1100 can operate based on an operating system stored in the memory 1132, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™ or the like.

与前述的基于终端侧的网页图片的展现方法的实施例相对应,本公开还提供了基于终端侧的网页图片的展现装置的实施例。Corresponding to the foregoing embodiment of the method for displaying a web page image based on the terminal side, the present disclosure also provides an embodiment of an apparatus for displaying a web page image based on the terminal side.

如图12所示,图12是根据一示例性实施例示出的一种网页图片的展现装置的框图,该展现装置可以包括:发送单元1201、接收单元1202和呈现单元1203。As shown in FIG. 12 , FIG. 12 is a block diagram of an apparatus for displaying webpage pictures according to an exemplary embodiment, and the apparatus for display may include: a sending unit 1201 , a receiving unit 1202 and a presentation unit 1203 .

其中,发送单元1201,被配置为向服务器发送网页图片获取请求;Wherein, the sending unit 1201 is configured to send a web page picture acquisition request to the server;

接收单元1202,被配置为接收服务器返回的由具有相同特征的子图片生成的整合图片,以及子图片的位置信息;The receiving unit 1202 is configured to receive an integrated picture generated by sub-pictures with the same characteristics and location information of the sub-pictures returned by the server;

呈现单元1203,被配置为根据位置信息将每张子图片呈现在网页的相应位置。The presenting unit 1203 is configured to present each sub-picture at a corresponding position of the webpage according to the position information.

在上述实施例中,仅需向服务器发起一次网页图片的获取请求,即可获取对应于网页中的所有图片的整合图片,以用于根据该整合图片和相应的位置信息,将每张子图片分别展现于网页中,从而减少了请求发送次数,有助于降低网络资源的占用、加快网页展现速度。In the above-mentioned embodiment, it is only necessary to initiate a webpage image acquisition request to the server once to obtain the integrated images corresponding to all the images in the webpage, so that each sub-image can be They are displayed on the webpage respectively, thereby reducing the number of requests to send, helping to reduce the occupation of network resources and speed up the display of webpages.

如图13所示,图13是根据一示例性实施例示出的另一种网页图片的展现装置的框图,该实施例在前述图12所示实施例的基础上,呈现单元1203可以包括:获取子单元1203A和显示子单元1203B。As shown in FIG. 13, FIG. 13 is a block diagram of another webpage picture display device according to an exemplary embodiment. In this embodiment, on the basis of the embodiment shown in FIG. 12, the presentation unit 1203 may include: Subunit 1203A and display subunit 1203B.

获取子单元1203A,被配置为根据位置信息从整合图片中获取每张子图片;The obtaining subunit 1203A is configured to obtain each sub-picture from the integrated picture according to the position information;

显示子单元1203B,被配置为将获取的每张子图片显示在网页的相应位置。The display subunit 1203B is configured to display each acquired sub-picture on a corresponding position of the webpage.

上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.

对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. It can be understood and implemented by those skilled in the art without creative effort.

相应的,本公开还提供一种网页图片的展现装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为:向服务器发送网页图片获取请求;接收服务器返回的由具有相同特征的子图片生成的整合图片,以及每张子图片的位置信息;根据位置信息将每张子图片呈现在网页的相应位置。Correspondingly, the present disclosure also provides an apparatus for displaying webpage pictures, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to: send a webpage picture acquisition request to a server; receive a request returned by the server An integrated picture generated from sub-pictures with the same characteristics, and the location information of each sub-picture; present each sub-picture at a corresponding position on the webpage according to the location information.

相应的,本公开还提供一种终端,终端包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行一个或者一个以上程序包含用于进行以下操作的指令:向服务器发送网页图片获取请求;接收服务器返回的由具有相同特征的子图片生成的整合图片,以及子图片的位置信息;根据位置信息将每张子图片呈现在网页的相应位置。Correspondingly, the present disclosure also provides a terminal. The terminal includes a memory and one or more programs, wherein one or more programs are stored in the memory and are configured to be executed by one or more processors. The above program includes instructions for the following operations: sending a web page picture acquisition request to the server; receiving the integrated picture generated by the sub-pictures with the same characteristics returned by the server, and the location information of the sub-pictures; according to the location information, each sub-picture displayed at the appropriate location on the web page.

如图14所示,图14是根据一示例性实施例示出的一种用于网页图片的展现装置的一结构示意图。例如,装置1400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。As shown in FIG. 14 , FIG. 14 is a schematic structural diagram of an apparatus for displaying web page pictures according to an exemplary embodiment. For example, the apparatus 1400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图14,装置1400可以包括以下一个或多个组件:处理组件1402,存储器1404,电源组件1406,多媒体组件1408,音频组件1410,输入/输出(I/O)的接口812,传感器组件1414,以及通信组件1416。14, device 1400 may include one or more of the following components: processing component 1402, memory 1404, power supply component 1406, multimedia component 1408, audio component 1410, interface 812 of input/output (I/O), sensor component 1414, and a communication component 1416 .

处理组件1402通常控制装置1400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件1402可以包括一个或多个处理器1420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1402可以包括一个或多个模块,便于处理组件1402和其他组件之间的交互。例如,处理部件1402可以包括多媒体模块,以方便多媒体组件1408和处理组件1402之间的交互。The processing component 1402 generally controls the overall operations of the device 1400, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 1402 may include one or more processors 1420 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1402 may include one or more modules that facilitate interaction between processing component 1402 and other components. For example, processing component 1402 may include a multimedia module to facilitate interaction between multimedia component 1408 and processing component 1402 .

存储器1404被配置为存储各种类型的数据以支持在设备1400的操作。这些数据的示例包括用于在装置1400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1404 is configured to store various types of data to support operations at the device 1400 . Examples of such data include instructions for any application or method operating on device 1400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1404 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件1406为装置1400的各种组件提供电力。电源组件1406可以包括电源管理系统,一个或多个电源,及其他与为装置1400生成、管理和分配电力相关联的组件。The power supply component 1406 provides power to various components of the device 1400 . Power components 1406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 1400 .

多媒体组件1408包括在装置1400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1408包括一个前置摄像头和/或后置摄像头。当装置1400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1408 includes a screen that provides an output interface between the device 1400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 1408 includes a front camera and/or a rear camera. When the device 1400 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件1410被配置为输出和/或输入音频信号。例如,音频组件1410包括一个麦克风(MIC),当装置1400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1404或经由通信组件1416发送。在一些实施例中,音频组件1410还包括一个扬声器,用于输出音频信号。The audio component 1410 is configured to output and/or input audio signals. For example, the audio component 1410 includes a microphone (MIC) configured to receive external audio signals when the device 1400 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 1404 or sent via communication component 1416 . In some embodiments, the audio component 1410 also includes a speaker for outputting audio signals.

I/O接口1412为处理组件1402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1412 provides an interface between the processing component 1402 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件1414包括一个或多个传感器,用于为装置1400提供各个方面的状态评估。例如,传感器组件1414可以检测到装置1400的打开/关闭状态,组件的相对定位,例如组件为装置1400的显示器和小键盘,传感器组件1414还可以检测装置1400或装置1400一个组件的位置改变,用户与装置1400接触的存在或不存在,装置1400方位或加速/减速和装置1400的温度变化。传感器组件1414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 1414 includes one or more sensors for providing various aspects of status assessment for device 1400 . For example, the sensor component 1414 can detect the open/closed state of the device 1400, the relative positioning of components, such as the display and keypad of the device 1400, the sensor component 1414 can also detect a change in the position of the device 1400 or a component of the device 1400, the user Presence or absence of contact with device 1400 , device 1400 orientation or acceleration/deceleration and temperature change of device 1400 . Sensor assembly 1414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 1414 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor component 1414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件1416被配置为便于装置1400和其他设备之间有线或无线方式的通信。装置1400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件1416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信部件1416还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 1416 is configured to facilitate wired or wireless communication between the apparatus 1400 and other devices. The device 1400 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1416 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置1400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 1400 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1404,上述指令可由装置1400的处理器1420执行以完成上述网页图片的展现方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 1404 including instructions, which can be executed by the processor 1420 of the device 1400 to complete the above-mentioned method for displaying webpage pictures. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

此外,本公开还提供了:Additionally, the present disclosure provides:

一种非临时性计算机可读存储介质,当存储介质中的指令由服务器的处理器执行时,使得服务器能够执行一种网页图片的展现方法,方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of the server, the server can execute a method for displaying webpage pictures, the method comprising:

调用具有相同特征的子图片;call a subpicture with the same characteristics;

将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息;Generating an integrated picture from the sub-pictures with the same characteristics, and recording the position information of each sub-picture;

当接收到终端发送的网页图片获取请求时,将整合图片和位置信息发送至终端,以使终端根据位置信息将每张子图片呈现在网页的相应位置。When receiving the webpage image acquisition request sent by the terminal, the integrated image and location information are sent to the terminal, so that the terminal presents each sub-image at a corresponding location on the webpage according to the location information.

可选的,将所述具有相同特征的子图片生成一张整合图片,包括:Optionally, generate an integrated picture from the sub-pictures with the same characteristics, including:

确定用于对所述子图片进行整合的整合方式;determining an integration method for integrating the sub-pictures;

从所述整合方式中选择对所述子图片进行整合后占用面积最小的整合方式;Selecting an integration method that occupies the smallest area after integrating the sub-pictures from the integration methods;

按照所述占用面积最小的整合方式将所述具有相同特征的子图片生成所述整合图片。and generating the integrated picture from the sub-pictures having the same feature according to the integration manner with the smallest occupied area.

可选的,确定用于对所述子图片进行整合的整合方式包括:Optionally, determining an integration method for integrating the sub-pictures includes:

判断所述子图片的数量是否小于预设数量;judging whether the number of sub-pictures is less than a preset number;

当所述子图片的数量小于预设数量时,通过穷举方式确定所述多种整合方式;以及When the number of sub-pictures is less than a preset number, determine the multiple integration methods in an exhaustive manner; and

当所述子图片的数量大于或等于所述预设数量时,通过贪心策略确定所述多种整合方式。When the number of the sub-pictures is greater than or equal to the preset number, the multiple integration methods are determined through a greedy strategy.

可选的,将所述具有相同特征的子图片生成一张整合图片,并记录每张子图片的位置信息,包括:Optionally, generate an integrated picture from the sub-pictures with the same characteristics, and record the position information of each sub-picture, including:

将所述多张图片上传至整合服务器;Upload the plurality of pictures to the integration server;

接收所述整合服务器返回的所述整合图片和每张子图片的位置信息。receiving the integrated picture and the location information of each sub-picture returned by the integrated server.

可选的,还包括:Optionally, also include:

判断所述具有相同特征的子图片与所述整合图片中包含的子图片是否匹配;judging whether the sub-picture with the same feature matches the sub-picture included in the integrated picture;

若不匹配,则更新所述整合图片和所述位置信息。If not, update the integrated picture and the location information.

一种非临时性计算机可读存储介质,当存储介质中的指令由终端的处理器执行时,使得终端能够执行一种网页图片的展现方法,方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the terminal, the terminal can execute a method for displaying webpage pictures, the method comprising:

向服务器发送网页图片获取请求;Send a web page picture acquisition request to the server;

接收服务器返回的由具有相同特征的子图片生成的整合图片,以及每张子图片的位置信息;Receiving the integrated picture generated by sub-pictures with the same characteristics returned by the server, and the location information of each sub-picture;

根据位置信息将每张子图片呈现在网页的相应位置。Each sub-picture is presented at a corresponding position on the webpage according to the position information.

可选的,根据所述位置信息将每张子图片呈现在网页的相应位置包括:Optionally, presenting each sub-picture at a corresponding position of the webpage according to the position information includes:

根据所述位置信息从所述整合图片中获取每张子图片;Acquiring each sub-picture from the integrated picture according to the position information;

将获取的每张子图片显示在网页的相应位置。Each obtained sub-picture is displayed on a corresponding position of the web page.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. a kind of Web page picture shows method, it is characterised in that including:
Call the sub-pictures with same characteristic features;
The sub-pictures with same characteristic features are generated into an integration picture, and record the positional information of every sub-pictures;
When the Web page picture for receiving terminal transmission obtains request, the integration picture and the positional information are sent to institute Terminal is stated, so that every sub-pictures are presented on the relevant position of webpage according to the positional information by the terminal;
Also include:
Judge whether the sub-pictures with same characteristic features match with the sub-pictures included in the integration picture;
If mismatching, the integration picture and the positional information are updated.
2. according to claim 1 show method, it is characterised in that by the sub-pictures generation one with same characteristic features Open and integrate picture, including:
It is determined that for the Integration Mode integrated to the sub-pictures;
The minimum Integration Mode of area occupied after selection is integrated to the sub-pictures from the Integration Mode;
The sub-pictures with same characteristic features are generated into the integration picture according to the minimum Integration Mode of the area occupied.
3. according to claim 2 show method, it is characterised in that it is determined that whole for being integrated to the sub-pictures Conjunction mode includes:
Judge whether the quantity of the sub-pictures is less than predetermined number;
When the quantity of the sub-pictures is less than predetermined number, a variety of Integration Modes are determined by exhaustive mode, when the subgraph When the quantity of piece is more than or equal to the predetermined number, a variety of Integration Modes are determined by Greedy strategy.
4. according to claim 1 show method, it is characterised in that by the sub-pictures generation one with same characteristic features Open and integrate picture, and record the positional information of every sub-pictures, including:
The sub-pictures are uploaded to integrated service device;
Receive the positional information of the integration picture and every sub-pictures that the integrated service device returns.
A kind of 5. demonstration device of Web page picture, it is characterised in that including:
Call unit, for calling the sub-pictures with same characteristic features;
Processing unit, for the sub-pictures with same characteristic features to be generated into an integration picture, and record every sub-pictures Positional information;
Transmission unit, for when the Web page picture for receiving terminal transmission obtains request, picture and institute's rheme to be integrated by described Confidence breath is sent to the terminal, so that every sub-pictures are presented on the corresponding of webpage by the terminal according to the positional information Position;
Also include:
Judging unit, for judging whether the sub-pictures with same characteristic features integrate the sub-pictures included in picture with described Matching;
Updating block, in absence of such a match, updating the integration picture and the positional information.
6. demonstration device according to claim 5, it is characterised in that the processing unit includes:
Determination subelement, for determining to be used for the Integration Mode for integrating the sub-pictures;
Select subelement, for from the Integration Mode selection sub-pictures are integrated after minimum whole of area occupied Conjunction mode;
Subelement is generated, for the sub-pictures with same characteristic features being given birth to according to the minimum Integration Mode of the area occupied As the integration picture.
7. demonstration device according to claim 6, it is characterised in that the determination subelement includes:
Quantity judge module, for judging whether the quantity of the sub-pictures is less than predetermined number;
Tactful determining module, in the case of being less than predetermined number in the quantity of the sub-pictures, determined by exhaustive mode A variety of Integration Modes, it is true by Greedy strategy in the case where the quantity of the sub-pictures is more than or equal to the predetermined number Fixed a variety of Integration Modes.
8. demonstration device according to claim 7, it is characterised in that the processing unit includes:
Subelement is uploaded, for the sub-pictures to be uploaded into integrated service device;
Receiving subelement, for receiving the integration picture of the integrated service device return and the position letter of every sub-pictures Breath.
A kind of 9. demonstration device of Web page picture, it is characterised in that including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Call the sub-pictures with same characteristic features;
The sub-pictures with same characteristic features are generated into an integration picture, and record the positional information of every sub-pictures;
When the Web page picture for receiving terminal transmission obtains request, the integration picture and the positional information are sent to institute Terminal is stated, so that every sub-pictures are presented on the relevant position of webpage according to the positional information by the terminal;
Also include:
Judge whether the sub-pictures with same characteristic features match with the sub-pictures included in the integration picture;
If mismatching, the integration picture and the positional information are updated.
CN201410240146.3A 2014-05-30 2014-05-30 Web page picture shows method and demonstration device Expired - Fee Related CN104063424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410240146.3A CN104063424B (en) 2014-05-30 2014-05-30 Web page picture shows method and demonstration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410240146.3A CN104063424B (en) 2014-05-30 2014-05-30 Web page picture shows method and demonstration device

Publications (2)

Publication Number Publication Date
CN104063424A CN104063424A (en) 2014-09-24
CN104063424B true CN104063424B (en) 2018-02-02

Family

ID=51551139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410240146.3A Expired - Fee Related CN104063424B (en) 2014-05-30 2014-05-30 Web page picture shows method and demonstration device

Country Status (1)

Country Link
CN (1) CN104063424B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330814A (en) * 2015-06-16 2017-01-11 阿里巴巴集团控股有限公司 Method and device for displaying detail information of target object
CN108874829B (en) * 2017-05-12 2023-05-09 腾讯科技(深圳)有限公司 Webpage processing method and device, intelligent equipment and computer storage medium
CN109003313B (en) * 2017-06-06 2021-09-03 腾讯科技(深圳)有限公司 Method, device and system for transmitting webpage picture
CN111435527A (en) * 2019-01-11 2020-07-21 北京京东尚科信息技术有限公司 Page picture display method and device, storage medium and electronic equipment
CN111729304B (en) * 2020-05-26 2024-04-05 广州尊游软件科技有限公司 Method for displaying mass objects

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737067A (en) * 2011-04-15 2012-10-17 阿里巴巴集团控股有限公司 Method and system for outputting webpage

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2009260721B2 (en) * 2008-06-06 2013-05-09 Google Llc Annotating images

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737067A (en) * 2011-04-15 2012-10-17 阿里巴巴集团控股有限公司 Method and system for outputting webpage

Also Published As

Publication number Publication date
CN104063424A (en) 2014-09-24

Similar Documents

Publication Publication Date Title
CN106569800B (en) Front-end interface generation method and device
RU2637475C2 (en) Method and device for controlling page display
WO2017113666A1 (en) Application interface switching method and device
US10642456B2 (en) Application distribution method and device
US10957012B2 (en) System and method for processing image information
RU2623502C2 (en) Method and device for image transmission
CN105808305B (en) Static resource loading method and device
CN104063424B (en) Web page picture shows method and demonstration device
CN110704059B (en) Image processing method, device, electronic equipment and storage medium
CN108804179B (en) Method, device, terminal and storage medium for displaying notification bar message
RU2663709C2 (en) Method and device for data processing
CN107193441B (en) Desktop pendant previewing method and device
CN106547547B (en) data acquisition method and device
US10831514B2 (en) Display method and device of application interface
CN106126725B (en) Page display method and device
JP2016524763A (en) Tag creation method, apparatus, terminal, program, and recording medium
CN110704053B (en) Style information processing method and device
RU2626089C2 (en) Method and device for subject application download
CN107463372B (en) Data-driven page updating method and device
CN107402756B (en) Method, device and terminal for drawing page
CN105468606B (en) Webpage saving method and device
CN107368562B (en) Page display method and device and terminal
CN107179837B (en) Input method and device
CN111695064B (en) Buried point loading method and device
CN105630948A (en) Web page display method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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: 20180202