CN102253986A - Method and device for improving webpage displaying effect in multiple terminals - Google Patents
Method and device for improving webpage displaying effect in multiple terminals Download PDFInfo
- Publication number
- CN102253986A CN102253986A CN2011101814164A CN201110181416A CN102253986A CN 102253986 A CN102253986 A CN 102253986A CN 2011101814164 A CN2011101814164 A CN 2011101814164A CN 201110181416 A CN201110181416 A CN 201110181416A CN 102253986 A CN102253986 A CN 102253986A
- Authority
- CN
- China
- Prior art keywords
- webpage
- version
- label
- terminal
- factory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method and device for improving a webpage displaying effect in multiple terminals, which are capable of remarkably reducing the work load of webpage development and improving the resource utilization ratio and the service expandability. The method for improving the webpage displaying effect in the multiple terminals, provided by embodiment of the invention, comprises the following steps of: setting labels independent of webpage versions, wherein the labels define a semantic function which can be supported by webpages, and the labels form a uniform template; respectively identifying the webpage versions supported by each terminal by utilizing the received requests of different terminals; and converting the uniform template into contents corresponding to the webpage versions supported by the terminals by utilizing a factory pattern so as to respectively display corresponding webpages on each terminal.
Description
Technical field
The present invention relates to networking technology area, especially relate to a kind of method and apparatus that improves the multiple terminals display effect of network page.
Background technology
In the development course of surfing Internet with cell phone technology, the webpage version that mobile phone browser can be supported, successively experienced WAP Markup Language (wireless markup language, wml) 1.2 versions, the wml2.0 version, text mark language (hypertext markup language, html) version and up-to-date html 5 versions.
At present, support on the market that the mobile phone of new and old webpage version has all occupied certain share.A mobile phone can only be supported a kind of webpage version usually preferably, and when the inconsistent webpage of webpage version of mobile phone access and its support, its getable webpage of institute is second-rate, and corresponding display effect is also poor, even the situation that can't show can occur.
In order to address the above problem, existing processing scheme is all write a template for each version of webpage, utilizes each template that the webpage of respective version is provided to mobile phone.
Yet, existing this processing scheme, owing to all will write a template for each version, workload is excessive, has expended too much exploitation strength, has also improved the difficulty that administers and maintains, and has hindered the development of technology; And for some follow-on redactions, it is compared with legacy version, when having difference, also keep some identical parts, existing processing scheme resource utilization is lower, is unfavorable for interpolation or modification to the webpage function, and professional extensibility is lower.
Summary of the invention
The embodiment of the invention provides a kind of method and apparatus that improves the multiple terminals display effect of network page, can significantly reduce the workload of webpage development, has improved the utilization factor and the professional extensibility of resource.
For achieving the above object, the technical scheme of the embodiment of the invention is achieved in that
The embodiment of the invention provides a kind of method that improves the multiple terminals display effect of network page, comprising:
Setting is independent of the label of page versions, described label definition the semantic function that can support of the page, form unified template by described label;
The webpage version that each terminal is supported is discerned in the request of the different terminals that utilization receives respectively;
Utilize factory mode with described unified template be converted to that described terminal supports the content of webpage version correspondence, on each terminal, to show corresponding web page respectively.
The embodiment of the invention also provides a kind of device that improves the multiple terminals display effect of network page, and this device comprises:
Webpage version recognition unit, the webpage version that is used to utilize the request identification terminal of the terminal that receives to be supported;
The tag processes unit is used to be provided with the label that is independent of page versions, described label definition the semantic function that can support of the page, form unified template by described label; And, by factory mode described unified template is converted to the webpage that the terminal of described webpage version is supported, on terminal, to show corresponding web page.
By as seen above-mentioned, the technical scheme of the embodiment of the invention is on early stage version base of recognition, generated the page of different editions by the unified template of a cover, promptly can utilize a cover template to support to have a plurality of terminals of different web pages version simultaneously, thereby solved in the prior art because the version of the webpage version that terminal self is supported and its accessed web page when inconsistent problem that page display effect is relatively poor.
And the technical program can significantly reduce the workload of webpage development, reduces the difficulty that webpage is managed and safeguards, helps development of internet technology; And,, improved the utilization factor and the professional extensibility of resource owing to, the web page resources of new early version is shared by label in the unified template can be added the webpage function or revise easily.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
A kind of method flow synoptic diagram that improves the multiple terminals display effect of network page that Fig. 1 provides for the embodiment of the invention one;
The method flow synoptic diagram of the raising multiple terminals display effect of network page that Fig. 2 is provided for the embodiment of the invention two;
A kind of apparatus structure synoptic diagram that improves the multiple terminals display effect of network page that Fig. 3 provides for the embodiment of the invention three.
Embodiment
Below in conjunction with accompanying drawing of the present invention, technical scheme of the present invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills are obtained under the prerequisite of not making creative work belongs to the scope of protection of the invention.
The embodiment of the invention one provides a kind of method that improves the multiple terminals display effect of network page, and referring to Fig. 1, described method comprises:
11: the label be independent of page versions is set, described label definition the semantic function that can support of the page, form by described label and to unify template;
12: utilize the request of the different terminals that receives to discern the webpage version that each terminal is supported respectively;
13: utilize factory mode that described unified template is converted to the content of the webpage version correspondence that described terminal supports, on each terminal, to show corresponding web page respectively.
By as seen above-mentioned, the technical scheme of the embodiment of the invention is on early stage version base of recognition, generated the page of different editions by the unified template of a cover, promptly can utilize a cover template to support to have a plurality of terminals of different web pages version simultaneously, thereby solved in the prior art because the version of the webpage version that terminal self is supported and its accessed web page when inconsistent problem that page display effect is relatively poor.
And the technical program can significantly reduce the workload of webpage development, reduces the difficulty that webpage is managed and safeguards, helps development of internet technology; And,, improved the utilization factor and the professional extensibility of resource owing to, the web page resources of new early version is shared by label in the unified template can be added the webpage function or revise easily.
A kind of method that improves the multiple terminals display effect of network page that the embodiment of the invention two is provided describes below.Referring to Fig. 2, the method flow synoptic diagram that has shown the raising multiple terminals display effect of network page that the embodiment of the invention provided, in scene shown in Figure 2,, specifically comprise to utilize webpage version recognition unit and tag processes unit to realize that the concrete steps of this method are that example describes:
1: the request that the receiving terminal user sends.
Above-mentioned terminal can be portable terminal, as mobile phone, also can be catv terminal, as computing machine etc.Terminal as the web page access request message, sends request to webpage version recognition unit by corresponding request message.
2: the webpage version that terminal is supported is discerned.
Webpage version recognition unit is according to the request from the terminal user, the webpage version that identification terminal is supported.Webpage version recognition unit can be handled the request of a plurality of terminals simultaneously, identifies the webpage version that a plurality of terminal is supported simultaneously.
The webpage version that terminal is supported is including, but not limited to following a kind of version:
WAP Markup Language wml1.2 version, wml2.0 version, text mark language html version and html5 version.
The existing utilization in the process that template generates the page to each ingredient of the page, all needs to carry out one by one the identification of release type in the process that generates, need repetitive operation, and complex operation, also causes when revising and make template, and difficulty is bigger.
At this problem, the technical program is in the page generates early stage process, at first the webpage version is continued identification and affirmation, in the implementation that subsequent page generates, need not to carry out again version identification, promptly distinguished significantly, be convenient to expansion the new page version to the deterministic process of page versions with to the interpretation process of label, and, to the increase or the deletion of label in the unified template.
3: obtain corresponding factory and realize class.
The pairing factory of the webpage version that acquisition identifies realizes class.For example, factory realizes that class WML1.2Factory has realized the label generation work of label corresponding to wml1.2, and factory realizes that class HTMLFactory has realized the label generation work of label corresponding to html.
The technical program is not carried out the strictness qualification to the concrete execution order of each step, and for example, the establishment of factory's realization class can be finished before the receiving terminal request in advance, can work as to receive terminal request execution more afterwards yet.Referring to Fig. 2, according to the webpage version difference that terminal is supported, obtain a plurality of different factories and realize class, realize class 1 as factory, factory realizes that class 2 realizes class n to factory, n is a sequence number.
4: give the tag processes unit with the factory's realization class that obtains.
5: tag processes unit by using factory realizes that class makes an explanation to unified template, to obtain the content of the webpage version correspondence that each terminal supports.
The label be independent of page versions is set in the tag processes unit, described label definition the semantic function that can support of the page, form the unification template by described label, unify template as label according to the predetermined relationship composition.
The embodiment of the invention has at first proposed one and has overlapped the label that is independent of each page versions, the label of this " independence " mainly is meant the definition of label and does not rely on concrete webpage version, this label has just defined the semantic function that the page can be supported, be in the embodiment of the invention according to the function and the design feature of the webpage of being realized, extract label with semantic concept fundamental element as unified template.
For example, label<ui:textarea name=" content "〉</ui:textarea〉be called the semantic function of the input frame of content corresponding to a name.
Similarly, can also pass through label definition document (doc), document head (head), document body pairing semantic functions such as (body).The attribute that the concrete mode that label is realized and these labels have (as the function of needs realization) is according to the actual needs adjusted.
After having defined these labels, just can use these labels to define or form unified template, label mainly is from semantically having described the structure of unified template.
For example, be the simple examples of a defined unified template below:
In above-mentioned unified template, comprise label<ui:doc 〉, label<ui:head 〉, label<ui:title〉and label<ui:body.
Therefore, stated a document in the example of above-mentioned unified template, as label<ui:doc 〉, it has a document head (), and the name that has wherein defined document is called " test ", and it has also defined document body, and its content is " content measurement ".
Further, different labels is to form unified template according to predetermined relationship, and described predetermined relationship is arranged in the described label.For example, in above-mentioned unified template example, label<ui:doc〉in just be provided with a kind of relation of inclusion, by this relation of inclusion with label<ui:head be included in label<ui:doc; And label<ui:head〉in also be provided with a kind of relation of inclusion, by this relation of inclusion with label<ui:title be included in label<ui:head in.
Yet, above-mentioned unified template can not directly return to user's browser, because unified template is not the realization of a concrete page versions, all browsers all nonrecognition are unified template, before turning back to user's browser, need it is translated, finally convert user's the browser acceptable page to, and this process realizes by factory mode in this programme.Tag processes unit by using factory mode is converted to the content of the webpage version correspondence that described terminal supports with described unified template, to show corresponding web page respectively on each terminal.
Factory that the tag processes unit by using is created out realizes that class makes an explanation to unified template, obtains the webpage that the webpage version of terminal is supported.
Further, corresponding with the definition of label, for each label, realize in the class explanation function being set in factory, this explanation function is interpreted as label the statement of corresponding webpage version.
For example, label<ui:textarea name=" content "〉</ui:textarea〉in factory's realization class of wml, will be translated into<input name=" content " type=" text "/
And this label is realized can being translated in the class in the factory of html:
<textarea?name=″content″></textarea>。
6: the web page contents that the tag processes unit will obtain after will explaining sends to each terminal user respectively.
Because the webpage version that web page contents that obtains after explaining and terminal are supported can be consistent, terminal can access the higher web data of quality, thereby can improve the display effect of webpage on the terminal browser.
Further, the technical program is by increasing or revise described label described unified template is upgraded, thereby is convenient to increase new function on the page, perhaps, introduces new page versions.
The technical program clear and definite definition on the basis of the label that can support, the use factory mode provides the support to different page versions respectively, the page that adds redaction only need increase a new factory newly and realize that class gets final product, and only need realize that the method for an output label of class increase gets final product to each factory when increasing a label newly.
By as seen above-mentioned, the technical scheme of the embodiment of the invention is on early stage version base of recognition, generated the page of different editions by the unified template of a cover, promptly can utilize a cover template to support to have a plurality of terminals of different web pages version simultaneously, thereby solved in the prior art because the version of the webpage version that terminal self is supported and its accessed web page when inconsistent problem that page display effect is relatively poor.
And the technical program can significantly reduce the workload of webpage development, reduces the difficulty that webpage is managed and safeguards, helps development of internet technology; And,, improved the utilization factor and the professional extensibility of resource owing to, the web page resources of new early version is shared by label in the unified template can be added the webpage function or revise easily.
The embodiment of the invention three also provides a kind of device that improves the multiple terminals display effect of network page, and referring to Fig. 3, described device comprises:
Webpage version recognition unit 31, the webpage version that is used to utilize the request identification terminal of the terminal that receives to be supported;
Further, described tag processes unit 32 comprises that factory realizes class creation module and version explanation module,
Described factory realizes the class creation module, is used to create the pairing factory of the webpage version that is identified and realizes class;
Described version explanation module is used to utilize described factory to realize that class makes an explanation to unified template, obtains the webpage that the webpage version of described terminal is supported.
Further, described device also comprises unified template renewal unit 33, is used for by increasing or revising described label described unified template is upgraded.
The concrete working method of each unit and module is referring to the inventive method embodiment among apparatus of the present invention embodiment.
The technical program clear and definite definition on the basis of the label that can support, the use factory mode provides the support to different page versions respectively, the page that adds redaction only need increase a new factory newly and realize that class gets final product, and only need realize that the method for an output label of class increase gets final product to each factory when increasing a label newly.
By as seen above-mentioned, the technical scheme of the embodiment of the invention is on early stage version base of recognition, generated the page of different editions by the unified template of a cover, promptly can utilize a cover template to support to have a plurality of terminals of different web pages version simultaneously, thereby solved in the prior art because the version of the webpage version that terminal self is supported and its accessed web page when inconsistent problem that page display effect is relatively poor.
And the technical program can significantly reduce the workload of webpage development, reduces the difficulty that webpage is managed and safeguards, helps development of internet technology; And,, improved the utilization factor and the professional extensibility of resource owing to, the web page resources of new early version is shared by label in the unified template can be added the webpage function or revise easily.
Those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can software product form embody, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.
Claims (9)
1. a method that improves the multiple terminals display effect of network page is characterized in that, described method comprises:
Setting is independent of the label of page versions, described label definition the semantic function that can support of the page, form unified template by described label;
The webpage version that each terminal is supported is discerned in the request of the different terminals that utilization receives respectively;
Utilize factory mode that described unified template is converted to the content of the webpage version correspondence that described terminal supports, on each terminal, to show corresponding web page respectively.
2. method according to claim 1 is characterized in that, describedly by factory mode described unified template is converted to the webpage that the webpage version of described terminal supported and comprises:
Create the pairing factory of the webpage version that is identified and realize class;
Utilize described factory to realize that class makes an explanation to unified template, obtain the webpage that the webpage version of described terminal is supported.
3. method according to claim 2 is characterized in that, utilizes described factory realization class that unified template is made an explanation and comprises:
For each label, realize in the class explanation function being set in factory, described explanation function is interpreted as label the statement of corresponding webpage version.
4. according to each described method of claim 1 to 3, it is characterized in that described method comprises:
By increasing or revising described label described unified template is upgraded.
5. method according to claim 4 is characterized in that,
Described label is formed unified template according to predetermined relationship, and described predetermined relationship is arranged in the described label.
6. method according to claim 4 is characterized in that,
The webpage version that described terminal is supported is following a kind of version:
WAP Markup Language wml 1.2 versions, wml2.0 version, text mark language html version, html 5 versions.
7. a device that improves the multiple terminals display effect of network page is characterized in that, described device comprises:
Webpage version recognition unit, the webpage version that is used to utilize the request identification terminal of the terminal that receives to be supported;
The tag processes unit is used to be provided with the label that is independent of page versions, described label definition the semantic function that can support of the page, form unified template by described label; And, by factory mode described unified template is converted to the webpage that the terminal of described webpage version is supported, on terminal, to show corresponding web page.
8. device according to claim 7 is characterized in that, described tag processes unit comprises that factory realizes class creation module and version explanation module,
Described factory realizes the class creation module, is used to create the pairing factory of the webpage version that is identified and realizes class;
Described version explanation module is used to utilize described factory to realize that class makes an explanation to unified template, obtains the webpage that the webpage version of described terminal is supported.
9. according to claim 7 or 8 described devices, it is characterized in that described device also comprises unified template renewal unit, be used for by increasing or revising described label described unified template is upgraded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101814164A CN102253986A (en) | 2011-06-30 | 2011-06-30 | Method and device for improving webpage displaying effect in multiple terminals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101814164A CN102253986A (en) | 2011-06-30 | 2011-06-30 | Method and device for improving webpage displaying effect in multiple terminals |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102253986A true CN102253986A (en) | 2011-11-23 |
Family
ID=44981250
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101814164A Pending CN102253986A (en) | 2011-06-30 | 2011-06-30 | Method and device for improving webpage displaying effect in multiple terminals |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102253986A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103414734A (en) * | 2013-09-05 | 2013-11-27 | 广东动易网络科技有限公司 | Multi-screen optimization technology for supporting different types of terminal equipment to access same website |
CN104102731A (en) * | 2014-07-24 | 2014-10-15 | 中国农业银行股份有限公司 | Method and system for transplanting product data under product factory pattern |
CN104536751A (en) * | 2014-12-26 | 2015-04-22 | 小米科技有限责任公司 | Webpage source code migrating method and device |
CN104715357A (en) * | 2013-12-17 | 2015-06-17 | 远光软件股份有限公司 | Method and device for document configuration |
CN104978415A (en) * | 2015-06-26 | 2015-10-14 | 成都梦旅程网络科技有限公司 | Web page processing method convenient for quickly updating web pages |
CN106487861A (en) * | 2015-09-01 | 2017-03-08 | 腾讯科技(北京)有限公司 | Network data provides method and apparatus |
CN115981588A (en) * | 2023-03-16 | 2023-04-18 | 中国邮电器材集团有限公司 | Multi-terminal data display method, equipment and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101197849A (en) * | 2007-12-21 | 2008-06-11 | 腾讯科技(深圳)有限公司 | Method and device for commuting internet page into wireless application protocol page |
CN101706821A (en) * | 2009-12-10 | 2010-05-12 | 中兴通讯股份有限公司 | Tag-based mobile internet page design system and method |
CN101815093A (en) * | 2010-03-11 | 2010-08-25 | 深圳市嘉讯软件有限公司 | Method for adapting webpage to mobile terminal and mobile terminal page adaptation device |
-
2011
- 2011-06-30 CN CN2011101814164A patent/CN102253986A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101197849A (en) * | 2007-12-21 | 2008-06-11 | 腾讯科技(深圳)有限公司 | Method and device for commuting internet page into wireless application protocol page |
CN101706821A (en) * | 2009-12-10 | 2010-05-12 | 中兴通讯股份有限公司 | Tag-based mobile internet page design system and method |
CN101815093A (en) * | 2010-03-11 | 2010-08-25 | 深圳市嘉讯软件有限公司 | Method for adapting webpage to mobile terminal and mobile terminal page adaptation device |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103414734A (en) * | 2013-09-05 | 2013-11-27 | 广东动易网络科技有限公司 | Multi-screen optimization technology for supporting different types of terminal equipment to access same website |
CN104715357A (en) * | 2013-12-17 | 2015-06-17 | 远光软件股份有限公司 | Method and device for document configuration |
CN104102731A (en) * | 2014-07-24 | 2014-10-15 | 中国农业银行股份有限公司 | Method and system for transplanting product data under product factory pattern |
CN104102731B (en) * | 2014-07-24 | 2017-06-30 | 中国农业银行股份有限公司 | The implantation method and system of product data under a kind of product factory mode |
CN104536751A (en) * | 2014-12-26 | 2015-04-22 | 小米科技有限责任公司 | Webpage source code migrating method and device |
CN104536751B (en) * | 2014-12-26 | 2018-04-06 | 小米科技有限责任公司 | Webpage source code moving method and device |
CN104978415A (en) * | 2015-06-26 | 2015-10-14 | 成都梦旅程网络科技有限公司 | Web page processing method convenient for quickly updating web pages |
CN106487861A (en) * | 2015-09-01 | 2017-03-08 | 腾讯科技(北京)有限公司 | Network data provides method and apparatus |
CN115981588A (en) * | 2023-03-16 | 2023-04-18 | 中国邮电器材集团有限公司 | Multi-terminal data display method, equipment and system |
CN115981588B (en) * | 2023-03-16 | 2023-09-26 | 中国邮电器材集团有限公司 | Multi-terminal data display method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102185864B1 (en) | Server-side rendering method and system of native content for presentation | |
CN102567516B (en) | Script loading method and device | |
CN103955364B (en) | A kind of front end assemblies method suitable for mobile phone | |
CN104461484B (en) | The implementation method and device of front-end template | |
KR100490734B1 (en) | Annotation-based automatic document generation apparatus and method | |
CN101122921B (en) | Method forming tree-shaped display structure based on ajax and html | |
CN106293675B (en) | System static resource loading method and device | |
CN102253986A (en) | Method and device for improving webpage displaying effect in multiple terminals | |
CN105787091B (en) | Support the content delivering system and method for multiple terminals | |
CN104142826A (en) | Method, device and system for constructing page | |
CN104820589B (en) | A kind of method and its device of dynamic adaptation webpage | |
CN105373615A (en) | Page customization method and device | |
CN101815093A (en) | Method for adapting webpage to mobile terminal and mobile terminal page adaptation device | |
WO2007041924A1 (en) | A device of implementing a flexible page layout and method thereof | |
CN109684580A (en) | A kind of methods of exhibiting and electronic equipment of dynamic page | |
US11003835B2 (en) | System and method to convert a webpage built on a legacy framework to a webpage compatible with a target framework | |
CN103383687A (en) | Page processing method and device | |
CN102298599A (en) | Method and system for browsing web pages in offline state | |
CN107122187A (en) | A kind of operation system OS accesses design method | |
CN103365877B (en) | Method and server to establishing catalogue after webpage progress transcoding | |
CN105068802A (en) | Cross device running Web application software implementation system and method | |
CN102955852A (en) | Method, device and equipment for webpage resource processing | |
CN104834715A (en) | Website generating method and system based on components and container | |
CN101876998A (en) | Method and system for editing data | |
CN114756228A (en) | Page processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20111123 |