WO2017088509A1 - Page customization method and device - Google Patents

Page customization method and device Download PDF

Info

Publication number
WO2017088509A1
WO2017088509A1 PCT/CN2016/092198 CN2016092198W WO2017088509A1 WO 2017088509 A1 WO2017088509 A1 WO 2017088509A1 CN 2016092198 W CN2016092198 W CN 2016092198W WO 2017088509 A1 WO2017088509 A1 WO 2017088509A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
static
dynamic
displayed
module
Prior art date
Application number
PCT/CN2016/092198
Other languages
French (fr)
Chinese (zh)
Inventor
王凤
Original Assignee
华讯方舟科技有限公司
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 华讯方舟科技有限公司 filed Critical 华讯方舟科技有限公司
Publication of WO2017088509A1 publication Critical patent/WO2017088509A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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

Definitions

  • the present invention relates to the field of page push technologies, and in particular, to a method and apparatus for page customization.
  • WIFI Wireless Fidelity
  • the portal portal promotion page is commonly used.
  • a large number of advertisement maps are usually loaded, which directly causes the page to be loaded slowly, and in order to save the time for loading the image, the size of the image can often be controlled, thereby affecting the display effect;
  • the displayed page is relatively fixed, and the style of the page cannot be customized.
  • the reuse rate of the page code is not high.
  • a first aspect of the present invention provides a method for page customization, including:
  • the static template related to the page call instruction is obtained to form a page to be displayed, and is returned to the client.
  • a second aspect of the present invention provides a device for page customization, including:
  • the obtaining module is configured to obtain content data included in the webpage to be displayed, and generate the content data according to the obtained content data.
  • a decomposition module configured to decompose the dynamic page into a plurality of static templates
  • a saving module configured to save the static template on a server
  • the combination module is configured to: when receiving a page call instruction sent by the client, acquire a static template related to the page call instruction to form a page to be displayed, and return the page to the client.
  • the present invention has the beneficial effects that the technical solution provided by the present invention implements a method for decomposing a dynamic page into a plurality of static templates and selecting a static template related to the page calling instruction to form a page to be displayed.
  • the page is loaded quickly, while increasing the reuse rate of the page code.
  • FIG. 1 is a flowchart of a page customization method according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of a page customization method according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic diagram of combining different static templates to form a page to be displayed in a page customization method according to Embodiment 2 of the present invention
  • FIG. 4 is a schematic structural diagram of a system for applying the page customization method in a page customization method according to Embodiment 2 of the present invention.
  • FIG. 5 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic diagram of a composition of a page customization device according to Embodiment 4 of the present invention.
  • FIG. 7 is a schematic diagram of the composition of a page customization apparatus according to Embodiment 5 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • Embodiment 1 is a flowchart of a page customization method according to Embodiment 1 of the present invention, which specifically includes steps S101 to S104, which are described in detail as follows:
  • a dynamic page is a web page that generates a client webpage code by executing a webpage editing program such as asp, php, jsp, or .net framework 4.0.
  • Dynamic pages are generally based on database technology.
  • a dynamic web page is not a web page file that exists independently on the server.
  • the server returns a complete web page only when requested by the user.
  • the server first obtains the user's instructions, then searches for the corresponding data in the database, and then compiles the dynamic page into a standard HTML (HyperText Markup Language) code, which is passed to the user's browser for viewing.
  • HTML HyperText Markup Language
  • the content data included in the web page to be displayed is first acquired, and then the dynamic page to be displayed on the user browser, such as an advertisement page, a company profile, a product introduction, and the like, are generated according to the acquired content data.
  • the content of the dynamic page is decomposed according to the type of the page content, for example, the header of the definition of the webpage document, the style of the page, the script defining the client, the text of the webpage main body, the image of the webpage main body, and the like may be separately packaged into independent Page file as a static template.
  • Static templates do not need to interact with the back-end database as opposed to dynamic pages. They exist as separate files and can be read and called directly.
  • the static template obtained in step S102 does not need to interact with the background database, and does not need to read the related configuration file, and can be saved as a separate file on the server, and is directly read and called when needed.
  • the server saves various independent static templates.
  • the server selects to read the related static template according to the requirements of the page calling instruction, and The page to be displayed and returned to the client browser for viewing.
  • the dynamic page is decomposed into a plurality of static templates and saved on the server.
  • the static template related to the page calling instruction is configured to form a page to be displayed, and is provided to the page.
  • the client which reduces the query to the database, achieves a fast loading of the page, and improves the reuse rate of the page code.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 2 is a flowchart of a page customization method according to Embodiment 2 of the present invention, which specifically includes steps S201 to S207, which are as follows:
  • a dynamic page is a web page that generates a client webpage code by executing a webpage editing program such as asp, php, jsp, or .net framework 4.0.
  • Dynamic pages are generally based on database technology.
  • a dynamic web page is not a web page file that exists independently on the server.
  • the server returns a complete web page only when requested by the user.
  • the server first obtains the user's instructions, then searches for the corresponding data in the database, and then compiles the dynamic page into a standard HTML (HyperText Markup Language) code, which is passed to the user's browser for viewing.
  • HTML HyperText Markup Language
  • the content data included in the web page to be displayed is first acquired, and then the dynamic page to be displayed on the user browser, such as an advertisement page, a company profile, a product introduction, and the like, are generated according to the acquired content data.
  • the content of the dynamic page is decomposed according to the type of the page content.
  • the header of the definition of the webpage document, the style of the page, the script defining the client, the text of the webpage body, the image of the webpage main body, and the like may be respectively packaged into separate HTML page files.
  • the HTML page does not need to interact with the background database. As a separate file, it can be directly read and called.
  • the server receives a modification instruction of the page style, and the instruction is used to instruct the server to modify the style of the dynamic page.
  • the entire page file does not need to be modified, and only the page needs to be modified.
  • the HTML page corresponding to the dynamic page pointed to by the style modification instruction can be modified.
  • a preset timing task may be started, and the timing task is responsible for generating a corresponding HTML page according to the required changed display content timing for the client to call, thereby It can effectively reduce the amount of tasks that the background manager manually generates HTML pages.
  • the generated HTML pages are respectively stored on different sub-servers, thereby improving the access speed and reducing the access speed.
  • the pressure on the main server if there are multiple servers in a larger system, the generated HTML pages are respectively stored on different sub-servers, thereby improving the access speed and reducing the access speed.
  • the server saves various independent HTML pages.
  • the server selects to read the related static template according to the request of the page calling instruction, composes the page to be displayed, and returns it to the client. Browser view.
  • a JSP (Java Server Pages) page can be used to include the required HTML pages, such as the ⁇ head> ⁇ /head> encapsulated HTML page and the ⁇ script> ⁇ /script> encapsulated HTML page through the page.
  • the tag ⁇ %include> is included, and the ⁇ div> required by the UI (User Interface) design is also included in the JSP page with ⁇ %include> to form a page to be displayed for the client to call.
  • Figure 3 shows the combination of different static templates to form a page to be displayed.
  • a.css, b.css, 1.html, 2.html, 3.html, 4.html, and 5.html are static templates obtained by step S202, respectively, and different static templates are displayed according to the content of the displayed page.
  • the combination of the A page and the B page respectively can effectively improve the reuse rate of the page code.
  • the static template corresponding to the modified content needs to be modified.
  • FIG. 4 shows the system components that apply this page customization method.
  • the WEB web server 5 decomposes the dynamic page into a plurality of HTML pages according to the operation of the background manager 6 or the trigger of the background timing task 7, and these HTML pages are respectively stored as static templates in different servers 2 and file servers 3, when the client When the terminal 1 needs to view the page to be displayed, the page call instruction is sent to the server 2.
  • the server 2 selects and reads the related static template according to the request of the page call instruction to form a page to be displayed, and provides the browser to the client 1 to view the view.
  • the dynamic page is decomposed into a plurality of HTML pages as static templates, and is saved on the server.
  • the related static templates are directly combined into a page to be displayed and provided to the client, thereby reducing the database.
  • the query enables fast loading of the page and improves the reuse rate of the page code.
  • the dynamic page style is customized, the static template corresponding to the style is directly modified, which is beneficial to the reuse of the code; the method of starting the preset timed task to update the static template periodically reduces the background. The amount of tasks that the administrator manually generates static templates.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 5 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 3 of the present invention. Only parts related to the embodiment of the present invention are shown.
  • the device for page customization illustrated in FIG. 5 may be an execution body of the method for page customization provided in the foregoing Embodiment 1, which may be a function module in a server or a server.
  • the apparatus for page customization illustrated in FIG. 5 mainly includes an acquisition module 51, an decomposition module 52, a save module 53, and a combination module 54. Each function module is described in detail as follows:
  • the obtaining module 51 is configured to acquire content data included in the webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
  • the decomposition module 52 is configured to decompose the dynamic page into a plurality of static templates
  • a saving module 53 configured to save the static template in a server
  • the combining module 54 is configured to: when receiving the page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 6 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 4 of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown.
  • the apparatus for page customization exemplified in FIG. 6 may be an execution body of the method for page customization provided by the foregoing second embodiment, which may be a function module of a server or a server.
  • the apparatus for page customization illustrated in FIG. 6 mainly includes an acquisition module 61, an decomposition module 62, a saving module 63, a combination module 64, a modification instruction receiving module 65, a modification instruction execution module 66, and a timing module 67.
  • Each function module is described in detail as follows:
  • An obtaining module 61 configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
  • the decomposition module 62 is configured to decompose the dynamic page into a plurality of static templates
  • a saving module 63 configured to save the static template in a server
  • the combining module 64 is configured to: when receiving a page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client;
  • the modify instruction receiving module 65 is configured to receive a page style modification instruction, where the page style modification instruction is used to instruct the server to modify the dynamic page;
  • the instruction execution module 66 is configured to modify a static template corresponding to the dynamic page pointed by the page style modification instruction
  • the timing module 67 is configured to start a preset timing task to update the static template timing.
  • the decomposition module 62 is further configured to decompose the dynamic page into a plurality of hypertext markup language HTML pages according to the type of the page content, as the static template.
  • the saving module 63 is further configured to save a plurality of the static templates in different sub-servers.
  • the dynamic page is decomposed into a plurality of HTML pages as a static template, and is saved on the server, and the related static template is directly needed when the reading is needed.
  • the composition of the page to be displayed is provided to the client, which reduces the query to the database, realizes the fast loading of the page, and improves the reuse rate of the page code.
  • the static template corresponding to the style is directly modified, which is beneficial to the reuse of the code; the method of starting the preset timed task to update the static template periodically reduces the background. The amount of tasks that the administrator manually generates static templates.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • the page customization device 700 may be a function module or the like in the server or the server.
  • the specific embodiment of the present invention does not limit the specific implementation of the page customization device.
  • the page customization device 700 includes:
  • a processor 710 a communications interface 720, a memory 730, and a bus 740.
  • the processor 710, the communication interface 720, and the memory 730 complete communication with each other via the bus 740.
  • the communication interface 720 is configured to communicate with an external device, such as a personal computer, a server, or the like.
  • the processor 710 is configured to execute the program 732.
  • program 732 can include program code, the program code including computer operating instructions.
  • the processor 710 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one configured to implement an embodiment of the present invention. Or multiple integrated circuits.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the memory 730 is configured to store the program 732.
  • the memory 730 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the program 732 may specifically include:
  • the obtaining module 301 is configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
  • the decomposition module 302 is configured to decompose the dynamic page into a plurality of static templates.
  • a saving module 303 configured to save the static template in a server
  • the combining module 304 is configured to: when receiving the page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention Portions of the invention, or portions of the technical solution, may be embodied in the form of a software product stored in a storage medium, including instructions for causing a computer device ( It may be a personal computer, a server, or a network device, etc.) performing all or part of the steps of the method described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like.
  • each module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented; in addition, the specific name of each functional module It is also for convenience of distinguishing from each other and is not intended to limit the scope of protection of the present invention.

Landscapes

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

Abstract

A page customization method and device, which are used for solving the problems in the prior art of a low push page loading speed and a single display page. The method comprises: acquiring content data contained in a web page to be displayed, and generating a dynamic page of the page to be displayed according to the acquired content data; decomposing the dynamic page into a plurality of static templates; storing the static templates in a server; and when a page invoking instruction sent by a client is received, acquiring the static templates associated with the page invoking instruction to form the page to be displayed, and returning same to the client. By means of the method, a dynamic page is decomposed into a plurality of static templates, and the static templates associated with a page invoking instruction are selected to form a page to be displayed, so that the rapid loading of a page is achieved, and at the same time, the reuse ratio of a page code is improved.

Description

一种页面定制化的方法和装置Method and device for page customization 技术领域Technical field
本发明涉及页面推送技术领域,尤其涉及一种页面定制化的方法和装置。The present invention relates to the field of page push technologies, and in particular, to a method and apparatus for page customization.
背景技术Background technique
为了满足用户的上网需求,目前很多商家都提供了免费WIFI(Wireless Fidelity,无线保真)上网的功能,当未认证用户连接商家提供的WIFI进行认证并连接互联网时,商家会向用户推送特定门户网站站点登录页面,该登陆页面通常包含了网站设定的广告页面。In order to meet the user's Internet access needs, many merchants now provide free WIFI (Wireless Fidelity) Internet access. When an unauthenticated user connects to the WIFI provided by the merchant to authenticate and connect to the Internet, the merchant will push a specific portal to the user. Site site login page, which usually contains the ad page set by the site.
目前常见的Portal门户推广页面,一方面,为了直观展示通常都会加载大量广告图,直接导致页面加载变慢,而为了节约加载图片的时间,往往只能控制图片的大小,进而影响显示的效果;另一方面,展示的页面相对固定单一,无法自定义页面的样式,页面代码的复用率不高。At present, the portal portal promotion page is commonly used. On the one hand, in order to visually display, a large number of advertisement maps are usually loaded, which directly causes the page to be loaded slowly, and in order to save the time for loading the image, the size of the image can often be controlled, thereby affecting the display effect; On the other hand, the displayed page is relatively fixed, and the style of the page cannot be customized. The reuse rate of the page code is not high.
技术问题technical problem
本发明的目的在于提供一种页面定制化的方法和装置,旨在解决现有技术中推送页面加载速度慢,展示页面单一的问题。It is an object of the present invention to provide a method and apparatus for page customization, which aims to solve the problem that the push page loading speed is slow and the display page is single in the prior art.
问题的解决方案Problem solution
技术解决方案Technical solution
本发明第一方面,提供一种页面定制化的方法,包括:A first aspect of the present invention provides a method for page customization, including:
获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;Obtaining content data included in the webpage to be displayed, and generating a dynamic page of the to-be-displayed page according to the obtained content data;
将所述动态页面分解为若干个静态模板;Decomposing the dynamic page into a plurality of static templates;
将所述静态模板保存在服务器;Saving the static template on a server;
当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。When a page call instruction sent by the client is received, the static template related to the page call instruction is obtained to form a page to be displayed, and is returned to the client.
本发明第二方面,提供一种页面定制化的装置,包括:A second aspect of the present invention provides a device for page customization, including:
获取模块,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成 所述待显示页面的动态页面;The obtaining module is configured to obtain content data included in the webpage to be displayed, and generate the content data according to the obtained content data. The dynamic page of the page to be displayed;
分解模块,用于将所述动态页面分解为若干个静态模板;a decomposition module, configured to decompose the dynamic page into a plurality of static templates;
保存模块,用于将所述静态模板保存在服务器;a saving module, configured to save the static template on a server;
组合模块,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。The combination module is configured to: when receiving a page call instruction sent by the client, acquire a static template related to the page call instruction to form a page to be displayed, and return the page to the client.
发明的有益效果Advantageous effects of the invention
有益效果Beneficial effect
本发明与现有技术相比存在的有益效果是:本发明提供的技术方案通过将动态页面分解为若干个静态模板,并选择页面调用指令相关的静态模板组成待显示页面的方法,实现了对页面的快速加载,同时提高了页面代码的复用率。Compared with the prior art, the present invention has the beneficial effects that the technical solution provided by the present invention implements a method for decomposing a dynamic page into a plurality of static templates and selecting a static template related to the page calling instruction to form a page to be displayed. The page is loaded quickly, while increasing the reuse rate of the page code.
对附图的简要说明Brief description of the drawing
附图说明DRAWINGS
图1是本发明实施例一提供的页面定制化方法的流程图;1 is a flowchart of a page customization method according to Embodiment 1 of the present invention;
图2是本发明实施例二提供的页面定制化方法的流程图;2 is a flowchart of a page customization method according to Embodiment 2 of the present invention;
图3是本发明实施例二提供的页面定制化方法中组合不同静态模板形成待显示页面的示意图;3 is a schematic diagram of combining different static templates to form a page to be displayed in a page customization method according to Embodiment 2 of the present invention;
图4是本发明实施例二提供的页面定制化方法中应用该页面定制化方法的系统组成示意图;4 is a schematic structural diagram of a system for applying the page customization method in a page customization method according to Embodiment 2 of the present invention;
图5是本发明实施例三提供的页面定制化装置的组成示意图;FIG. 5 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 3 of the present invention; FIG.
图6是本发明实施例四提供的页面定制化装置的组成示意图;6 is a schematic diagram of a composition of a page customization device according to Embodiment 4 of the present invention;
图7是本发明实施例五提供的页面定制化装置的组成示意图。FIG. 7 is a schematic diagram of the composition of a page customization apparatus according to Embodiment 5 of the present invention.
发明实施例Invention embodiment
本发明的实施方式Embodiments of the invention
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
以下结合具体附图对本发明的实现进行详细的描述。 The implementation of the present invention will be described in detail below with reference to the specific drawings.
实施例一:Embodiment 1:
图1是本发明实施例一提供的页面定制化方法的流程图,具体包括步骤S101至S104,详述如下:1 is a flowchart of a page customization method according to Embodiment 1 of the present invention, which specifically includes steps S101 to S104, which are described in detail as follows:
S101、获取待显示网页中包含的内容数据,根据获取的内容数据生成待显示页面的动态页面。S101. Acquire content data included in a webpage to be displayed, and generate a dynamic page of the page to be displayed according to the obtained content data.
动态页面是通过执行asp、php、jsp或.net framework 4.0等网页编辑程序生成客户端网页代码的网页。动态页面一般以数据库技术为基础,实际上动态网页并不是独立存在于服务器上的网页文件,只有当用户请求时服务器才返回一个完整的网页。服务器首先获得用户的指令,然后到数据库中查找和指令相对应的数据,再把动态页面编译成标准的HTML(HyperText Markup Language,超文本标记语言)代码,传递给用户浏览器进行查看。A dynamic page is a web page that generates a client webpage code by executing a webpage editing program such as asp, php, jsp, or .net framework 4.0. Dynamic pages are generally based on database technology. In fact, a dynamic web page is not a web page file that exists independently on the server. The server returns a complete web page only when requested by the user. The server first obtains the user's instructions, then searches for the corresponding data in the database, and then compiles the dynamic page into a standard HTML (HyperText Markup Language) code, which is passed to the user's browser for viewing.
具体地,首先获取待显示网页中包含的内容数据,再根据所获取的内容数据生成待显示在用户浏览器上的动态页面,例如广告页面、公司简介、商品介绍等。Specifically, the content data included in the web page to be displayed is first acquired, and then the dynamic page to be displayed on the user browser, such as an advertisement page, a company profile, a product introduction, and the like, are generated according to the acquired content data.
S102、将动态页面分解为若干个静态模板。S102. Decompose the dynamic page into a plurality of static templates.
具体地,将动态页面的内容按照页面内容的类型进行分解,例如可以将定义网页文档的头部、页面样式、定义客户端的脚本、网页主体的文本、网页主体的图片等部分分别封装成独立的页面文件,作为静态模板。静态模板相对于动态页面而言,不需要与后台数据库交互,作为一个独立的文件单独存在,可以直接被读取调用。Specifically, the content of the dynamic page is decomposed according to the type of the page content, for example, the header of the definition of the webpage document, the style of the page, the script defining the client, the text of the webpage main body, the image of the webpage main body, and the like may be separately packaged into independent Page file as a static template. Static templates do not need to interact with the back-end database as opposed to dynamic pages. They exist as separate files and can be read and called directly.
S103、将静态模板保存在服务器。S103. Save the static template on the server.
具体地,步骤S102得到的静态模板,因为不需要与后台数据库交互,也不需要读取相关的配置文件,可以作为一个独立的文件保存在服务器上,当需要使用的时候直接被读取调用。Specifically, the static template obtained in step S102 does not need to interact with the background database, and does not need to read the related configuration file, and can be saved as a separate file on the server, and is directly read and called when needed.
S104、当接收到客户端发送的页面调用指令时,获取页面调用指令相关的静态模板组成待显示页面,并返回给客户端。S104. When receiving a page call instruction sent by the client, obtain a static template related to the page call instruction to form a page to be displayed, and return the page to the client.
具体地,服务器上保存了各种独立的静态模板,当接收到客户端发送的页面调用指令时,服务器根据页面调用指令的要求,选择读取相关的静态模板,组成 待显示的页面,并返回给客户端浏览器查看。Specifically, the server saves various independent static templates. When receiving the page calling instruction sent by the client, the server selects to read the related static template according to the requirements of the page calling instruction, and The page to be displayed and returned to the client browser for viewing.
本实施例中,通过将动态页面分解成若干个静态模板,并保存在服务器上,当接收到客户端发送的页面调用指令时,获取页面调用指令相关的静态模板组成待显示页面,并提供给客户端,从而减少了对数据库的查询,实现了对页面的快速加载,同时提高了页面代码的复用率。In this embodiment, the dynamic page is decomposed into a plurality of static templates and saved on the server. When receiving the page calling instruction sent by the client, the static template related to the page calling instruction is configured to form a page to be displayed, and is provided to the page. The client, which reduces the query to the database, achieves a fast loading of the page, and improves the reuse rate of the page code.
实施例二:Embodiment 2:
图2是本发明实施例二提供的页面定制化方法的流程图,具体包括步骤S201至S207,详述如下:2 is a flowchart of a page customization method according to Embodiment 2 of the present invention, which specifically includes steps S201 to S207, which are as follows:
S101、获取待显示网页中包含的内容数据,根据获取的内容数据生成待显示页面的动态页面。S101. Acquire content data included in a webpage to be displayed, and generate a dynamic page of the page to be displayed according to the obtained content data.
动态页面是通过执行asp、php、jsp或.net framework 4.0等网页编辑程序生成客户端网页代码的网页。动态页面一般以数据库技术为基础,实际上动态网页并不是独立存在于服务器上的网页文件,只有当用户请求时服务器才返回一个完整的网页。服务器首先获得用户的指令,然后到数据库中查找和指令相对应的数据,再把动态页面编译成标准的HTML(HyperText Markup Language,超文本标记语言)代码,传递给用户浏览器进行查看。A dynamic page is a web page that generates a client webpage code by executing a webpage editing program such as asp, php, jsp, or .net framework 4.0. Dynamic pages are generally based on database technology. In fact, a dynamic web page is not a web page file that exists independently on the server. The server returns a complete web page only when requested by the user. The server first obtains the user's instructions, then searches for the corresponding data in the database, and then compiles the dynamic page into a standard HTML (HyperText Markup Language) code, which is passed to the user's browser for viewing.
具体地,首先获取待显示网页中包含的内容数据,再根据所获取的内容数据生成待显示在用户浏览器上的动态页面,例如广告页面、公司简介、商品介绍等。Specifically, the content data included in the web page to be displayed is first acquired, and then the dynamic page to be displayed on the user browser, such as an advertisement page, a company profile, a product introduction, and the like, are generated according to the acquired content data.
S202、将动态页面按照页面内容的类型,分解为若干个HTML页面,作为静态模板。S202. Decompose the dynamic page into a plurality of HTML pages according to the type of the page content, as a static template.
将动态页面的内容按照页面内容的类型进行分解,例如可以将定义网页文档的头部、页面样式、定义客户端的脚本、网页主体的文本、网页主体的图片等部分分别封装成独立的HTML页面文件,作为静态模板。HTML页面相对于动态页面而言,不需要与后台数据库交互,作为一个独立的文件单独存在,可以直接被读取调用。The content of the dynamic page is decomposed according to the type of the page content. For example, the header of the definition of the webpage document, the style of the page, the script defining the client, the text of the webpage body, the image of the webpage main body, and the like may be respectively packaged into separate HTML page files. As a static template. Compared with the dynamic page, the HTML page does not need to interact with the background database. As a separate file, it can be directly read and called.
具体地,首先可以将动态页面上的<head></head>封装成一个HTML模块,将样式CSS(Cascading Style  Sheets,层叠样式表)封装成一个HTML模块,将<script></script>里面的Java Script脚本封装成一个HTML模块,将<body><body>中的DIV(DIVision,层叠样式表单元的位置和层次)按照设计图的布局逐行切图,包含背景、图标和按钮等,然后查询数据库的情况并分解成若干个后缀名为ftl的Freemarker模板文件。Specifically, you can first encapsulate <head></head> on a dynamic page into an HTML module, and style CSS (Cascading Style). Sheets, Cascading Style Sheets) is packaged into an HTML module that encapsulates the Java Script script inside <script></script> into an HTML module that will be the DIV in the <body><body> (DIVision, the location of the Cascading Style Sheet cells) And level) according to the layout of the design diagram line by line, including the background, icons and buttons, and then query the database and break it down into a number of Freemarker template files with the suffix named ftl.
然后,通过调用javax.servlet.ServletConte类中的方法生成HTML页面输出流,并调用freemarker.template.Configuration类中的方法setEncoding根据项目编码设置编码格式,调用freemarker.template.Template类中的方法process处理模板,将封装好的HTML模块分别转成HTML页面。Then, generate the HTML page output stream by calling the method in the javax.servlet.ServletConte class, and call the method setEncoding in the freemarker.template.Configuration class to set the encoding format according to the project encoding, and call the method process in the freemarker.template.Template class. A template that converts the packaged HTML modules into HTML pages.
S203、接收页面样式修改指令,页面样式修改指令用于指示服务器修改动态页面。S203. Receive a page style modification instruction, where the page style modification instruction is used to instruct the server to modify the dynamic page.
具体地,当需要对动态页面的样式进行自定义修改时,服务器会接收到页面样式的修改指令,该指令用于指示服务器修改动态页面的样式。Specifically, when a custom modification of the style of the dynamic page is required, the server receives a modification instruction of the page style, and the instruction is used to instruct the server to modify the style of the dynamic page.
S204、修改页面样式修改指令指向的动态页面对应的静态模板。S204. Modify a static template corresponding to the dynamic page pointed to by the page style modification instruction.
具体地,由于动态页面的各部分内容已经被分解成若干HTML页面,因此当接收到页面样式修改指令,需对动态页面的样式进行自定义修改时,不需要修改整个页面文件,只需要对页面样式修改指令指向的动态页面对应的HTML页面进行修改即可。Specifically, since the content of each part of the dynamic page has been decomposed into several HTML pages, when the page style modification instruction is received, and the style of the dynamic page needs to be customized, the entire page file does not need to be modified, and only the page needs to be modified. The HTML page corresponding to the dynamic page pointed to by the style modification instruction can be modified.
S205、启动预先设置的定时任务对静态模板定时更新。S205. Start a preset timing task to update the static template periodically.
具体地,当客户端显示的页面内容需要按时间规律定时变化时,可启动预先设置的定时任务,该定时任务负责根据所需变化的显示内容定时生成对应的HTML页面,供客户端调用,从而可以有效减少后台管理人员手动生成HTML页面的任务量。Specifically, when the page content displayed by the client needs to be periodically changed according to the time rule, a preset timing task may be started, and the timing task is responsible for generating a corresponding HTML page according to the required changed display content timing for the client to call, thereby It can effectively reduce the amount of tasks that the background manager manually generates HTML pages.
S206、将若干个静态模板分别保存在不同的子服务器。S206. Save a plurality of static templates in different sub-servers.
具体地,为了避免高并发时对服务器的压力,在较大的系统中如果有多台服务器的情况下,将所生成的若干个HTML页面分别保存在不同的子服务器上,提高访问速度,减少对主服务器的压力。Specifically, in order to avoid the pressure on the server during high concurrency, if there are multiple servers in a larger system, the generated HTML pages are respectively stored on different sub-servers, thereby improving the access speed and reducing the access speed. The pressure on the main server.
S207、当接收到客户端发送的页面调用指令时,获取页面调用指令相关的静态 模板组成待显示页面,并返回给客户端。S207. When receiving a page call instruction sent by the client, acquiring a static related to the page call instruction The template forms the page to be displayed and is returned to the client.
服务器上保存了各种独立的HTML页面,当接收到客户端发送的页面调用指令时,服务器根据页面调用指令的要求,选择读取相关的静态模板,组成待显示的页面,并返回给客户端浏览器查看。The server saves various independent HTML pages. When receiving the page calling instruction sent by the client, the server selects to read the related static template according to the request of the page calling instruction, composes the page to be displayed, and returns it to the client. Browser view.
具体地,可以用一个JSP(Java Server Pages,Java服务器页面)页面包含需要的HTML页面,例如将<head></head>封装的HTML页面和<script></script>封装的HTML页面通过页面标签<%include>包含进去,再根据UI(User Interface,用户界面)设计将需要的<div>也用<%include>包含到JSP页面中,形成待显示页面供客户端调用。Specifically, a JSP (Java Server Pages) page can be used to include the required HTML pages, such as the <head></head> encapsulated HTML page and the <script></script> encapsulated HTML page through the page. The tag <%include> is included, and the <div> required by the UI (User Interface) design is also included in the JSP page with <%include> to form a page to be displayed for the client to call.
图3显示了组合不同静态模板形成待显示的页面。其中,a.css、b.css、1.html、2.html、3.html、4.html和5.html分别为通过步骤S202得到的静态模板,根据显示页面的内容,对静态模板进行不同的组合即可分别得到A页面和B页面,从而有效提高了页面代码的复用率,当局部内容需要修改时只需要对所修改内容对应的静态模板进行修改即可。Figure 3 shows the combination of different static templates to form a page to be displayed. Among them, a.css, b.css, 1.html, 2.html, 3.html, 4.html, and 5.html are static templates obtained by step S202, respectively, and different static templates are displayed according to the content of the displayed page. The combination of the A page and the B page respectively can effectively improve the reuse rate of the page code. When the local content needs to be modified, only the static template corresponding to the modified content needs to be modified.
图4显示了应用该页面定制化方法的系统组成。WEB网页服务器5根据后台管理人员6的操作或者后台定时任务7的触发,将动态页面分解为若干HTML页面,这些HTML页面作为静态模板被分别保存在不同的服务器2和文件服务器3中,当客户端1需要查看待显示页面时发送页面调用指令到服务器2,服务器2根据页面调用指令的要求,选择读取相关的静态模板,组成待显示的页面,提供给客户端1的浏览器调用查看。Figure 4 shows the system components that apply this page customization method. The WEB web server 5 decomposes the dynamic page into a plurality of HTML pages according to the operation of the background manager 6 or the trigger of the background timing task 7, and these HTML pages are respectively stored as static templates in different servers 2 and file servers 3, when the client When the terminal 1 needs to view the page to be displayed, the page call instruction is sent to the server 2. The server 2 selects and reads the related static template according to the request of the page call instruction to form a page to be displayed, and provides the browser to the client 1 to view the view.
本实施例中,通过将动态页面分解成若干个HTML页面作为静态模板,并保存在服务器上,待需要读取时直接将相关静态模板组合成待显示页面提供给客户端,减少了对数据库的查询,实现了对页面的快速加载,并提高了页面代码的复用率。同时,当对动态页面的样式进行自定义修改时,直接修改所述样式对应的静态模板,有利于代码的复用;采用启动预先设置的定时任务对静态模板定时更新的方式,有效减少了后台管理人员手动生成静态模板的任务量。In this embodiment, the dynamic page is decomposed into a plurality of HTML pages as static templates, and is saved on the server. When the need to read, the related static templates are directly combined into a page to be displayed and provided to the client, thereby reducing the database. The query enables fast loading of the page and improves the reuse rate of the page code. At the same time, when the dynamic page style is customized, the static template corresponding to the style is directly modified, which is beneficial to the reuse of the code; the method of starting the preset timed task to update the static template periodically reduces the background. The amount of tasks that the administrator manually generates static templates.
实施例三:Embodiment 3:
图5是本发明实施例三提供的页面定制化装置的组成示意图,为了便于说明, 仅示出了与本发明实施例相关的部分。图5示例的用于页面定制化的装置可以是前述实施例一提供的用于页面定制化的方法的执行主体,其可以是服务器或者服务器中的一个功能模块。图5示例的用于页面定制化的装置主要包括:获取模块51、分解模块52、保存模块53和组合模块54。各功能模块详细说明如下:FIG. 5 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 3 of the present invention. Only parts related to the embodiment of the present invention are shown. The device for page customization illustrated in FIG. 5 may be an execution body of the method for page customization provided in the foregoing Embodiment 1, which may be a function module in a server or a server. The apparatus for page customization illustrated in FIG. 5 mainly includes an acquisition module 51, an decomposition module 52, a save module 53, and a combination module 54. Each function module is described in detail as follows:
获取模块51,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;The obtaining module 51 is configured to acquire content data included in the webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
分解模块52,用于将所述动态页面分解为若干个静态模板;The decomposition module 52 is configured to decompose the dynamic page into a plurality of static templates;
保存模块53,用于将所述静态模板保存在服务器;a saving module 53, configured to save the static template in a server;
组合模块54,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。The combining module 54 is configured to: when receiving the page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client.
从上述图5示例的用于页面定制化的装置可知,本实施例中,通过将动态页面分解成若干个静态模板,并保存在服务器上,当接收到客户端发送的页面调用指令时,获取页面调用指令相关的静态模板组成待显示页面,并提供给客户端,从而减少了对数据库的查询,实现了对页面的快速加载,同时提高了页面代码的复用率。It can be seen from the device for page customization described in FIG. 5 that, in this embodiment, by decomposing the dynamic page into a plurality of static templates and saving them on the server, when receiving the page calling instruction sent by the client, obtaining The static template related to the page call instruction constitutes the page to be displayed and is provided to the client, thereby reducing the query on the database, realizing the fast loading of the page, and improving the reuse rate of the page code.
实施例四:Embodiment 4:
图6是本发明实施例四提供的页面定制化装置的组成示意图,为了便于说明,仅示出了与本发明实施例相关的部分。图6示例的用于页面定制化的装置可以是前述实施例二提供的用于页面定制化的方法的执行主体,其可以是服务器或者服务器中的一个功能模块。图6示例的用于页面定制化的装置主要包括:获取模块61、分解模块62、保存模块63、组合模块64、修改指令接收模块65、修改指令执行模块66和定时模块67。各功能模块详细说明如下:FIG. 6 is a schematic diagram of a composition of a page customization apparatus according to Embodiment 4 of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. The apparatus for page customization exemplified in FIG. 6 may be an execution body of the method for page customization provided by the foregoing second embodiment, which may be a function module of a server or a server. The apparatus for page customization illustrated in FIG. 6 mainly includes an acquisition module 61, an decomposition module 62, a saving module 63, a combination module 64, a modification instruction receiving module 65, a modification instruction execution module 66, and a timing module 67. Each function module is described in detail as follows:
获取模块61,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;An obtaining module 61, configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
分解模块62,用于将所述动态页面分解为若干个静态模板;The decomposition module 62 is configured to decompose the dynamic page into a plurality of static templates;
保存模块63,用于将所述静态模板保存在服务器;a saving module 63, configured to save the static template in a server;
组合模块64,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端; The combining module 64 is configured to: when receiving a page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client;
修改指令接收模块65,用于接收页面样式修改指令,所述页面样式修改指令用于指示所述服务器修改所述动态页面;The modify instruction receiving module 65 is configured to receive a page style modification instruction, where the page style modification instruction is used to instruct the server to modify the dynamic page;
修改指令执行模块66,用于修改所述页面样式修改指令指向的动态页面对应的静态模板;The instruction execution module 66 is configured to modify a static template corresponding to the dynamic page pointed by the page style modification instruction;
定时模块67,用于启动预先设置的定时任务对所述静态模板定时更新。The timing module 67 is configured to start a preset timing task to update the static template timing.
具体地,分解模块62,还用于将所述动态页面按照页面内容的类型,分解为若干个超文本标记语言HTML页面,作为所述静态模板。Specifically, the decomposition module 62 is further configured to decompose the dynamic page into a plurality of hypertext markup language HTML pages according to the type of the page content, as the static template.
具体地,保存模块63,还用于将若干个所述静态模板分别保存在不同的子服务器。Specifically, the saving module 63 is further configured to save a plurality of the static templates in different sub-servers.
从上述图6示例的用于页面定制化的装置可知,本实施例中,通过将动态页面分解成若干个HTML页面作为静态模板,并保存在服务器上,待需要读取时直接将相关静态模板组合成待显示页面提供给客户端,减少了对数据库的查询,实现了对页面的快速加载,并提高了页面代码的复用率。同时,当对动态页面的样式进行自定义修改时,直接修改所述样式对应的静态模板,有利于代码的复用;采用启动预先设置的定时任务对静态模板定时更新的方式,有效减少了后台管理人员手动生成静态模板的任务量。It can be seen from the device for page customization described in FIG. 6 that, in this embodiment, the dynamic page is decomposed into a plurality of HTML pages as a static template, and is saved on the server, and the related static template is directly needed when the reading is needed. The composition of the page to be displayed is provided to the client, which reduces the query to the database, realizes the fast loading of the page, and improves the reuse rate of the page code. At the same time, when the dynamic page style is customized, the static template corresponding to the style is directly modified, which is beneficial to the reuse of the code; the method of starting the preset timed task to update the static template periodically reduces the background. The amount of tasks that the administrator manually generates static templates.
实施例五:Embodiment 5:
请参考图7,本发明提供了一种页面定制化装置700的示意图。页面定制化装置700可能是服务器或者服务器中的一个功能模块等,本发明具体实施例并不对页面定制化装置的具体实现做限定。页面定制化装置700包括:Referring to FIG. 7, the present invention provides a schematic diagram of a page customization device 700. The page customization device 700 may be a function module or the like in the server or the server. The specific embodiment of the present invention does not limit the specific implementation of the page customization device. The page customization device 700 includes:
处理器(processor)710,通信接口(Communications Interface)720,存储器(memory)730,总线740。A processor 710, a communications interface 720, a memory 730, and a bus 740.
处理器710,通信接口720,存储器730通过总线740完成相互间的通信。The processor 710, the communication interface 720, and the memory 730 complete communication with each other via the bus 740.
通信接口720,用于与外界设备,例如,个人电脑、服务器等通信。The communication interface 720 is configured to communicate with an external device, such as a personal computer, a server, or the like.
处理器710,用于执行程序732。The processor 710 is configured to execute the program 732.
具体地,程序732可以包括程序代码,所述程序代码包括计算机操作指令。In particular, program 732 can include program code, the program code including computer operating instructions.
处理器710可能是一个中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个 或多个集成电路。The processor 710 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one configured to implement an embodiment of the present invention. Or multiple integrated circuits.
存储器730,用于存放程序732。存储器730可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。程序732具体可以包括:The memory 730 is configured to store the program 732. The memory 730 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory. The program 732 may specifically include:
获取模块301,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;The obtaining module 301 is configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
分解模块302,用于将所述动态页面分解为若干个静态模板;The decomposition module 302 is configured to decompose the dynamic page into a plurality of static templates.
保存模块303,用于将所述静态模板保存在服务器;a saving module 303, configured to save the static template in a server;
组合模块304,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。The combining module 304 is configured to: when receiving the page calling instruction sent by the client, acquire a static template related to the page calling instruction to form a to-be-displayed page, and return the page to the client.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案 本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention Portions of the invention, or portions of the technical solution, may be embodied in the form of a software product stored in a storage medium, including instructions for causing a computer device ( It may be a personal computer, a server, or a network device, etc.) performing all or part of the steps of the method described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每一个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同或者相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that each embodiment in the specification is described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. Just fine. For the device type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
值得注意的是,上述装置实施例中,所包括的各个模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能模块的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。It should be noted that, in the foregoing device embodiment, each module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding function can be implemented; in addition, the specific name of each functional module It is also for convenience of distinguishing from each other and is not intended to limit the scope of protection of the present invention.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (11)

  1. 一种页面定制化的方法,其特征在于,包括:A method for page customization, characterized in that it comprises:
    获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;Obtaining content data included in the webpage to be displayed, and generating a dynamic page of the to-be-displayed page according to the obtained content data;
    将所述动态页面分解为若干个静态模板;Decomposing the dynamic page into a plurality of static templates;
    将所述静态模板保存在服务器;Saving the static template on a server;
    当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。When a page call instruction sent by the client is received, the static template related to the page call instruction is obtained to form a page to be displayed, and is returned to the client.
  2. 根据权利要求1所述的页面定制化的方法,其特征在于,所述将所述动态页面分解为若干个静态模板包括:The method for page customization according to claim 1, wherein the decomposing the dynamic page into a plurality of static templates comprises:
    将所述动态页面按照页面内容的类型,分解为若干个超文本标记语言HTML页面,作为所述静态模板。The dynamic page is decomposed into a plurality of hypertext markup language HTML pages according to the type of the page content as the static template.
  3. 根据权利要求1所述的页面定制化的方法,其特征在于,所述将所述动态页面分解为若干个静态模板的步骤之后,包括:The method for page customization according to claim 1, wherein after the step of decomposing the dynamic page into a plurality of static templates, the method comprises:
    接收页面样式修改指令,所述页面样式修改指令用于指示所述服务器修改所述动态页面;Receiving a page style modification instruction, where the page style modification instruction is used to instruct the server to modify the dynamic page;
    修改所述页面样式修改指令指向的动态页面对应的静态模板。Modify the static template corresponding to the dynamic page pointed to by the page style modification instruction.
  4. 根据权利要求1所述的页面定制化的方法,其特征在于,所述将所述动态页面分解为若干个静态模板的步骤之后,还包括:The method for page customization according to claim 1, wherein after the step of decomposing the dynamic page into a plurality of static templates, the method further comprises:
    启动预先设置的定时任务对所述静态模板定时更新。The preset timing task is started to periodically update the static template.
  5. 根据权利要求1所述的页面定制化的方法,其特征在于,所述将所述静态模板保存在服务器包括:The method for page customization according to claim 1, wherein the saving the static template in the server comprises:
    将若干个所述静态模板分别保存在不同的子服务器。A plurality of the static templates are separately stored in different sub-servers.
  6. 一种页面定制化的装置,其特征在于,包括:A device for customizing a page, comprising:
    获取模块,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面;An acquiring module, configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
    分解模块,用于将所述动态页面分解为若干个静态模板;a decomposition module, configured to decompose the dynamic page into a plurality of static templates;
    保存模块,用于将所述静态模板保存在服务器; a saving module, configured to save the static template on a server;
    组合模块,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。The combination module is configured to: when receiving a page call instruction sent by the client, acquire a static template related to the page call instruction to form a page to be displayed, and return the page to the client.
  7. 根据权利要求6所述的页面定制化的装置,其特征在于,所述分解模块,还用于将所述动态页面按照页面内容的类型,分解为若干个超文本标记语言HTML页面,作为所述静态模板。The apparatus for page customization according to claim 6, wherein the decomposition module is further configured to decompose the dynamic page into a plurality of hypertext markup language HTML pages according to the type of the page content, as Static template.
  8. 根据权利要求6所述的页面定制化的装置,其特征在于,所述装置还包括:The apparatus for page customization according to claim 6, wherein the apparatus further comprises:
    修改指令接收模块,用于接收页面样式修改指令,所述页面样式修改指令用于指示所述服务器修改所述动态页面;And a modification instruction receiving module, configured to receive a page style modification instruction, where the page style modification instruction is used to instruct the server to modify the dynamic page;
    修改指令执行模块,用于修改所述页面样式修改指令指向的动态页面对应的静态模板。The instruction execution module is configured to modify a static template corresponding to the dynamic page pointed to by the page style modification instruction.
  9. 根据权利要求6所述的页面定制化的装置,其特征在于,所述装置还包括:The apparatus for page customization according to claim 6, wherein the apparatus further comprises:
    定时模块,用于启动预先设置的定时任务对所述静态模板定时更新。The timing module is configured to start a preset timing task to periodically update the static template.
  10. 根据权利要求6所述的页面定制化的装置,其特征在于,所述保存模块,还用于将若干个所述静态模板分别保存在不同的子服务器。The device for customizing a page according to claim 6, wherein the saving module is further configured to save a plurality of the static templates in different sub-servers.
  11. 一种页面定制化的装置,其特征在于,所述页面定制化的装置包括:处理器,通信接口,存储器和总线;A device for page customization, characterized in that: the device for page customization comprises: a processor, a communication interface, a memory and a bus;
    其中处理器、通信接口、存储器通过总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the bus;
    所述通信接口,用于与外界设备通信;The communication interface is configured to communicate with an external device;
    所述处理器,用于执行程序;The processor is configured to execute a program;
    所述存储器,用于存放所述程序;The memory is configured to store the program;
    所述程序包括:The program includes:
    获取模块,用于获取待显示网页中包含的内容数据,根据获取的内容数据生成所述待显示页面的动态页面; An acquiring module, configured to acquire content data included in a webpage to be displayed, and generate a dynamic page of the to-be-displayed page according to the obtained content data;
    分解模块,用于将所述动态页面分解为若干个静态模板;a decomposition module, configured to decompose the dynamic page into a plurality of static templates;
    保存模块,用于将所述静态模板保存在服务器;a saving module, configured to save the static template on a server;
    组合模块,用于当接收到客户端发送的页面调用指令时,获取所述页面调用指令相关的静态模板组成待显示页面,并返回给所述客户端。 The combination module is configured to: when receiving a page call instruction sent by the client, acquire a static template related to the page call instruction to form a page to be displayed, and return the page to the client.
PCT/CN2016/092198 2015-11-24 2016-07-29 Page customization method and device WO2017088509A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510824208.XA CN105373615B (en) 2015-11-24 2015-11-24 A kind of method and apparatus of page customization
CN201510824208.X 2015-11-24

Publications (1)

Publication Number Publication Date
WO2017088509A1 true WO2017088509A1 (en) 2017-06-01

Family

ID=55375813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092198 WO2017088509A1 (en) 2015-11-24 2016-07-29 Page customization method and device

Country Status (2)

Country Link
CN (1) CN105373615B (en)
WO (1) WO2017088509A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413273A (en) * 2019-08-01 2019-11-05 上海麦克风文化传媒有限公司 A kind of renewal of the page device that webpage development can configure in the process
CN112558964A (en) * 2020-11-27 2021-03-26 华帝股份有限公司 Webpage generation method, computer equipment and storage medium
CN112887362A (en) * 2021-01-08 2021-06-01 重庆锐明信息技术有限公司 Equipment access method, equipment access device and server
CN113609426A (en) * 2021-07-23 2021-11-05 北京淇瑀信息科技有限公司 Page staticizing processing method and device and electronic equipment

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373615B (en) * 2015-11-24 2018-12-21 华讯方舟科技有限公司 A kind of method and apparatus of page customization
CN105893043A (en) * 2016-03-30 2016-08-24 乐视控股(北京)有限公司 Page configuration method and system
CN105912324A (en) * 2016-04-05 2016-08-31 浪潮(苏州)金融技术服务有限公司 Method and device for generating Web page
CN106095411A (en) * 2016-05-31 2016-11-09 乐视控股(北京)有限公司 Display packing and terminal
CN106503162B (en) * 2016-10-31 2019-12-24 山东鲁能软件技术有限公司 SAP platform based page dynamic generation method and system
CN107451184A (en) * 2017-06-19 2017-12-08 阿里巴巴集团控股有限公司 Page display method and device, user equipment, storage medium
CN107894887B (en) * 2017-06-25 2021-02-09 平安科技(深圳)有限公司 Page componentization method and device and computer readable storage medium
CN107369090A (en) * 2017-07-25 2017-11-21 上海壹账通金融科技有限公司 Open an account generation method, equipment and the computer-readable recording medium of the page
CN107609898A (en) * 2017-08-24 2018-01-19 天脉聚源(北京)科技有限公司 The method and device that a kind of advertising message of intelligence reply high access is launched
CN108345482B (en) * 2017-12-29 2022-03-15 广州品唯软件有限公司 Dynamic page custom editing method and device, electronic equipment and storage medium
CN109032601A (en) * 2018-08-20 2018-12-18 北京知本源信息技术有限公司 Design drawing cooperates cut map device and method online
CN109324858B (en) * 2018-09-20 2022-03-22 郑州云海信息技术有限公司 Method and device for acquiring display content in webpage
CN110134477B (en) * 2019-04-24 2021-07-20 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for dynamically laying out user pages
CN110390065B (en) * 2019-07-31 2024-02-06 腾讯科技(深圳)有限公司 Webpage acquisition method, device and system
CN110688603A (en) * 2019-10-18 2020-01-14 郑瑞文 Automatic change of website interface
CN117251661B (en) * 2023-11-16 2024-02-27 建信金融科技有限责任公司 Webpage file generation method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183395A (en) * 2007-12-25 2008-05-21 北京中企开源信息技术有限公司 Method and system for realizing staticize of dynamic page
CN102662993A (en) * 2012-03-14 2012-09-12 北京神州数码思特奇信息技术股份有限公司 A method for providing page data
CN103198074A (en) * 2012-01-09 2013-07-10 北大方正集团有限公司 Page design method and system for dynamic publishing website
CN104317874A (en) * 2014-10-20 2015-01-28 北京锐安科技有限公司 Device and method for staticizing dynamic webpage
CN105373615A (en) * 2015-11-24 2016-03-02 深圳市华讯方舟科技有限公司 Page customization method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8082539B1 (en) * 2006-12-11 2011-12-20 Parallels Holdings, Ltd. System and method for managing web-based forms and dynamic content of website
TWI478043B (en) * 2012-11-22 2015-03-21 Inst Information Industry Systems and methods for app page template generation, and storage medium thereof
CN103034496B (en) * 2012-12-13 2016-06-01 海南电网公司 Based on the Locally-static portal generation method of template
CN103019724A (en) * 2012-12-18 2013-04-03 重庆金算盘软件有限公司 Webpage constructing and loading method and system
CN104899228A (en) * 2014-03-07 2015-09-09 中国移动通信集团河北有限公司 Method and device for publishing webpage resources
CN103944994A (en) * 2014-04-25 2014-07-23 中国联合网络通信集团有限公司 Distributed resource obtaining method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183395A (en) * 2007-12-25 2008-05-21 北京中企开源信息技术有限公司 Method and system for realizing staticize of dynamic page
CN103198074A (en) * 2012-01-09 2013-07-10 北大方正集团有限公司 Page design method and system for dynamic publishing website
CN102662993A (en) * 2012-03-14 2012-09-12 北京神州数码思特奇信息技术股份有限公司 A method for providing page data
CN104317874A (en) * 2014-10-20 2015-01-28 北京锐安科技有限公司 Device and method for staticizing dynamic webpage
CN105373615A (en) * 2015-11-24 2016-03-02 深圳市华讯方舟科技有限公司 Page customization method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413273A (en) * 2019-08-01 2019-11-05 上海麦克风文化传媒有限公司 A kind of renewal of the page device that webpage development can configure in the process
CN112558964A (en) * 2020-11-27 2021-03-26 华帝股份有限公司 Webpage generation method, computer equipment and storage medium
CN112887362A (en) * 2021-01-08 2021-06-01 重庆锐明信息技术有限公司 Equipment access method, equipment access device and server
CN112887362B (en) * 2021-01-08 2023-03-10 重庆锐明信息技术有限公司 Equipment access method, equipment access device and server
CN113609426A (en) * 2021-07-23 2021-11-05 北京淇瑀信息科技有限公司 Page staticizing processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN105373615A (en) 2016-03-02
CN105373615B (en) 2018-12-21

Similar Documents

Publication Publication Date Title
WO2017088509A1 (en) Page customization method and device
EP3518124A1 (en) Webpage rendering method and related device
EP3139331A1 (en) Advertisement template configuration method, server and system
JP5238851B2 (en) Screen generation system, screen generation method, and screen generation program
US9117314B2 (en) Information output apparatus, method, and recording medium for displaying information on a video display
WO2022048141A1 (en) Image processing method and apparatus, and computer readable storage medium
US9426202B2 (en) Transforming application cached template using personalized content
US20170212964A1 (en) System and method for dynamic content rendering
CN112487763A (en) SVG-based OFD file online display method, server side and system
US20100218110A1 (en) Methods and systems for displaying user interfaces on remote devices
CN105988814B (en) Interface generation method and device
CN112631564A (en) Content management system-based interface generation method, device, equipment and storage medium
CN112395848A (en) Rich text display method and device, computer equipment and storage medium
CN104156421B (en) The page shows method, apparatus and system
JP5604016B1 (en) Script caching method and information processing apparatus using the same
CN111723314B (en) Webpage display method and device, electronic equipment and computer readable storage medium
TW201441837A (en) System and method of loading control
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
CN110941401A (en) Printing method and device
CN103294463A (en) Editing system and method
JP2015518612A (en) Computer system, non-transitory computer readable storage medium and method enabling styling and decoration of multiple and dissimilar web pages by remote method invocation
CN113050921A (en) Webpage conversion method, device, storage medium and computer equipment
US9916391B2 (en) Method, apparatus and terminal for webpage content browsing
WO2022099913A1 (en) Interface configuration method and apparatus, and device and medium
JP4803218B2 (en) Information output device and information output processing program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16867736

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16867736

Country of ref document: EP

Kind code of ref document: A1