WO2015100994A1 - 页面处理方法、装置及系统 - Google Patents

页面处理方法、装置及系统 Download PDF

Info

Publication number
WO2015100994A1
WO2015100994A1 PCT/CN2014/081398 CN2014081398W WO2015100994A1 WO 2015100994 A1 WO2015100994 A1 WO 2015100994A1 CN 2014081398 W CN2014081398 W CN 2014081398W WO 2015100994 A1 WO2015100994 A1 WO 2015100994A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
parsing
user
client
html
Prior art date
Application number
PCT/CN2014/081398
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP14802582.8A priority Critical patent/EP2913767A4/en
Priority to US14/587,754 priority patent/US20150188981A1/en
Publication of WO2015100994A1 publication Critical patent/WO2015100994A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars

Definitions

  • the present invention relates to the field of communications, and in particular, to a page processing method, apparatus, and system. Background technique
  • RIA Rich Internet Application
  • the client browser 11 requests the web server 12 for the service-related web application URL; the web server 12 returns the extended hypertext markup language (HTML) tag of the service; and the script related to the extended tag.
  • Language (JavaScript, JS) logic the browser parses the response tag in the foreground, generates an HTML template of unbound data, and simultaneously sends Ajax to the web server 12 to request service data from the data source 13, and the browser will correspond to the service data of the tag.
  • the binding JS logic generates an HTML page and displays it (as shown in FIG. 1); or, the client browser 21 requests the web server 22 for the business-related web application URL, which is parsed by the web server 22 and obtained from the data source 23.
  • the data binding generates a response page containing the data and the HTML tag and sends it to the client browser, and the browser displays the response page (as shown in Figure 2).
  • an embodiment of the present invention provides a page processing method, including:
  • a parsing policy table is generated according to the page attribute and/or the client attribute sent by the receiving client browser, where the parsing policy table is used to determine a parsing manner of the user requesting to access the webpage, where the parsing manner includes parsing and/or parsing at the web server end. Parsing in the client browser;
  • the page that the user asks for is analyzed.
  • the parsing manner of the user requesting to access the webpage is determined by the client browser according to the parsing policy table, the user accesses the webpage according to the parsing manner. Analyze, including:
  • Pre-parsing the label used by the speculative page and storing it in a cache space Pre-parsing the label used by the speculative page and storing it in a cache space; generating an HTML speculative template according to the pre-parsed label stored in the cache space and sending the HTML speculative template to the client browser, Having the client browser parse the page returned by receiving the user request access and generating the page displayed to the user in conjunction with data binding in the data source.
  • the parsing manner of the user requesting to access the page is determined by the parsing policy table to be parsed by the server, the parsing of the page requested by the user according to the parsing manner is performed. , including:
  • Pre-parsing the label used by the speculative page and storing it in a cache space Pre-parsing the label used by the speculative page and storing it in a cache space; generating an HTML speculative template according to the pre-parsed label stored in the cache space, and extracting the received image according to the HTML speculative template Deriving that the user requests access to the returned page for parsing and combining the data binding in the data source to generate the page displayed to the user;
  • the page displayed to the user is sent to the client browser.
  • the parsing, by the HTML speculative template, the received page that is returned by the user request includes:
  • the request response tag queue or the pre-resolved tag queue is selected to be executed according to a preset priority.
  • the pre-resolving the label used by the speculative page is stored in a cache
  • the space includes:
  • Pre-resolving the label used by the speculative page and storing a label common to a plurality of users, a partially parsed label, or a label that needs to be cached according to the parsing policy table, and storing the label into a cache space
  • the tag is sent to the client browser for storage in the cache space of the client browser.
  • the label that is required to be used by the user to request a page to be accessed by the user includes:
  • the sending, by the client browser, the HTML speculation template includes:
  • the HTML speculative template is sent to the client browser.
  • the label is a label with service semantics, or a common component with data processing and display logic label.
  • the page attribute includes a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, and a client network access Type or client application scenario type.
  • a page processing method including:
  • the returned page is parsed according to the HTML speculative template and the page displayed to the user is generated in conjunction with the data binding provided by the data source.
  • the receiving, by the web server, the HTML speculation template includes:
  • the page attribute includes a page configuration preference policy, a page data binding location, or a page related parameter
  • the client attribute includes a client browser type, a network access type of the client, or a client application scenario type.
  • an embodiment of the present invention provides a web server, including:
  • a generating module configured to generate a parsing policy table according to a page attribute and/or a client attribute sent by the receiving client browser, where the parsing policy table is used to determine a parsing manner of the user requesting to access the webpage, where the parsing manner is included in the web server End parsing and / or parsing in the client browser;
  • the parsing manner is parsing in a client, where the web server further includes:
  • a speculative module configured to infer a label used by the user to request a page accessed by the user
  • a pre-parsing module configured to pre-resolve the label used by the speculative page and store the label in the cache space
  • a sending module configured to generate a hypertext markup language HTML speculative template according to the pre-resolved tag stored in the cache space, and send the HTML speculative template to the client browser, so that the client browser receives the received
  • the user requests access to the returned page for parsing and combining the data source
  • the data binding in is generated to the page displayed to the user.
  • the parsing manner is parsing on the server side, and the web server further includes:
  • a speculative module configured to infer a label used by the user to request a page accessed by the user
  • a pre-parsing module configured to pre-resolve the label used by the speculative page and store the label in the cache space
  • Generating a display page module configured to generate an HTML speculation template according to the pre-resolved tag stored in the cache space, and parse and return the returned page according to the received HTML request speculative template according to the HTML speculative template
  • Medium data binding generates the page displayed to the user
  • a sending module configured to send the page displayed to the user to the client browser.
  • the parsing module is specifically configured to:
  • the request response tag queue or the pre-resolved tag queue is selected to be executed according to a preset priority.
  • the pre-parsing module is specifically configured to:
  • Pre-resolving the label used by the speculative page and storing a label common to a plurality of users, a partially parsed label, or a label that needs to be cached according to the parsing policy table, and storing the label into a cache space
  • the tag is sent to the client browser for storage in the cache space of the client browser.
  • Creating a page database that the user has requested to access where the page database stores the pages visited by the user history; Receiving a page requested by the user to access, and combining the page database to infer a label that the user needs to use for the next requested page. .
  • the sending module is specifically configured to:
  • the HTML speculative template is sent to the client browser.
  • the label parsed by the pre-parsing module is a label with service semantics, or with data processing and Displays the common component tag of the logic.
  • the page attribute received by the generating module includes a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, a client End network access type or client application scenario type.
  • an embodiment of the present invention provides a client browser, including:
  • a sending module configured to send a request page attribute and/or a client attribute to the webpage server to enable the webpage server to generate a parsing policy table
  • a receiving module configured to receive a hypertext markup language HTML speculative template sent by the webpage server;
  • a parsing module configured to: when the user asks for the returned page, parse the returned page according to the HTML speculative template and generate the page displayed to the user according to the data binding provided by the data source.
  • the receiving module is specifically configured to: receive the HTML speculative template that is actively pushed by the webpage server; or
  • the page attribute sent by the sending module includes a page configuration preference policy, a page data binding location or a page related parameter
  • the client attribute includes a client browser type, a network access type of the client, or a client application scenario type.
  • an embodiment of the present invention provides a page processing system, including a web server, a client, and a data source, where the web server includes the third aspect, the third aspect, the first to the eighth
  • the web server described in the possible implementation manner, the client includes the client browser as described in the fourth aspect, the first or the second of any possible implementation manner.
  • the embodiment of the present invention solves the problem that the page processing is not flexible and the processing efficiency is low in the prior art by generating a parsing policy table to determine different parsing methods according to actual network or service conditions.
  • FIG. 1 is a network structure diagram of parsing a webpage in a client browser in the prior art
  • FIG. 2 is a network structure diagram of parsing a webpage on a server side in the prior art
  • FIG. 3 is a flowchart of a page processing method according to Embodiment 1 of the present invention.
  • FIG. 4 is a flowchart of a page processing method according to Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a page processing method according to Embodiment 3 of the present invention.
  • FIG. 6 is a flowchart of a page processing method according to Embodiment 4 of the present invention.
  • FIG. 7 is a structural diagram of a web server according to Embodiment 5 of the present invention
  • FIG. 8 is a structural diagram of a web server according to Embodiment 6 of the present invention
  • FIG. 9 is a structural diagram of a web server according to Embodiment 7 of the present invention.
  • FIG. 10 is a structural diagram of a client browser according to Embodiment 8 of the present invention.
  • FIG. 11 is a structural diagram of a page processing system according to Embodiment 9 of the present invention.
  • FIG. 12 is a structural diagram of a web server according to Embodiment 10 of the present invention
  • FIG. 13 is a structural diagram of a client device according to Embodiment 11 of the present invention.
  • the method provided by the embodiment of the present invention can be applied to a page processing system including a web server, a client, and a data source, wherein the client is configured with a browser that processes the page, such as a page processing system that adopts a data binding and a label resolution separation mode. .
  • FIG. 3 is a flowchart of a page processing method according to Embodiment 1 of the present invention.
  • the execution host of the method is a web server, such as a static web server.
  • the method specifically includes: Step 301: Generate a parsing policy table according to a page attribute and/or a client attribute sent by a receiving client browser, where the parsing policy table is used to determine that the user requests access to the page.
  • the method of parsing includes parsing on a web server side and/or parsing in a client browser.
  • the page attribute may include a page-related attribute such as a page configuration preference policy, a page data binding location, or a page-related parameter, such as a number of labels of the page, whether the data binding is on the server or a client.
  • a page-related attribute such as a page configuration preference policy, a page data binding location, or a page-related parameter, such as a number of labels of the page, whether the data binding is on the server or a client.
  • the client attribute includes a client browser type, a display screen size, a network access type of the client, a client application scenario type, and the like, and does not display an attribute of the client related to the page, such as a user browser type (PC, Pad, Mobile), access type (fixed network, wireless GPRS, 3G/4G, Wifi), power of the client, data traffic or user scenario (whether roaming, server is idle) and other parameters.
  • a user browser type PC, Pad, Mobile
  • access type fixed network, wireless GPRS, 3G/4G, Wifi
  • power of the client data traffic or user scenario (whether roaming, server is idle) and other parameters.
  • Step 302 Determine, according to the parsing policy table, a parsing manner of a user requesting to access a page.
  • the parsing method is determined according to the parsing policy table.
  • the parsing method may be selected only on the web server side, and only in the client browser parsing, or may be allocated according to a certain proportion, part of the selection is parsed on the web server side, and part is selected in the client browser.
  • different parsing strategies may be customized according to different permutations and combinations, that is, but not limited to the above three default policies, different parsing methods may be selected according to different pages, or the client browser may determine the parsing by itself.
  • the method may be determined by the web server, and the present invention is not limited thereto.
  • Step 303 Parse the accessed page by the user according to the parsing method.
  • the page is parsed on the server side or the client browser, and the page is fixedly set.
  • the dynamic selection analysis mode cannot be performed according to the service attribute or the actual network condition.
  • FIG. 4 is a flowchart of a page processing method according to Embodiment 2 of the present invention.
  • the method may specifically include:
  • Step 401 Generate a parsing policy table according to a page attribute and/or a client attribute sent by the receiving client browser.
  • the user may select a user to manually generate a parsing policy table according to page attributes and/or client attributes; or
  • a parsing policy table is automatically generated based on page attributes and/or client attributes.
  • the network class type and the setting intelligence adopt a configuration policy to adapt the user scenario, such as automatically matching the user scenario to roam or local.
  • Step 402 Determine, according to the parsing policy table, a parsing manner of a user requesting access to the page; the parsing mode may be set to server compiling, browser compiling, and intelligent hybrid mode, that is, part is compiled in the server, and part is compiled in the browser, and the following table 1 For example.
  • the parsing mode may be set to server compiling, browser compiling, and intelligent hybrid mode, that is, part is compiled in the server, and part is compiled in the browser, and the following table 1
  • the parsing mode may be set to server compiling, browser compiling, and intelligent hybrid mode, that is, part is compiled in the server, and part is compiled in the browser, and the following table 1
  • the type of the client is a mobile phone
  • the mobile phone access type is 3G mode
  • the user preference is set to save traffic
  • the scenario is local
  • the remaining circuit is less than 20%
  • the server empty state is empty
  • 3G saves ⁇ 20 free client stream % browser resolution
  • Wi power saving i [50 users intelligent mixed fi mode tour %, 20%] number ⁇ people largest
  • Step 403 Presume that the user needs to use a label for the next page requested by the user.
  • an optional implementation manner is: first creating a page database that the user has requested to access; and then receiving The user requests the accessed page, and combines the page database to infer the label that the user needs to use for the next requested page. For example, based on statistical experience and business processes, calculate the labels used by the next user.
  • Step 404 Pre-resolve the label used by the speculative page and store the label in the cache space
  • the label in the embodiment of the present invention represents a segment of an application or a specific business component (which can be parsed into a runnable HTML+JS+CSS, etc.), or a common component, tag translation or parsing. After that, generate a template without data, or an empty application without data
  • a preferred implementation manner is: pre-resolving the label used by the speculative page, and using a label common to multiple users, a partially parsed label, or according to the parsing
  • the policy table decision requires the cached tag to be stored in the cache space, and the user-specific tag is sent to the client browser for storage in the cache space of the client browser.
  • the user-specific tags refer to custom tags that different users have different from other users. By double-buffering tags on the browser side and the server side, it is possible to reduce the resolution and data transmission of extended tags or HTML tags, thereby saving bandwidth consumption.
  • Step 405 Generate an HTML speculative template according to the pre-resolved tag stored in the cache space, and send the HTML speculative template to the client browser, so that the client browser requests access to the user.
  • the returned page is parsed and combined with the data binding in the data source to generate the page displayed to the user;
  • the sending the HTML speculative template to the client browser includes: actively pushing the HTML speculative template to the client browser; or
  • the HTML speculation template is sent to the client browser.
  • parsing of the page returned by the received user request according to the HTML speculative template according to the method in the method includes:
  • the request response tag queue or the pre-resolved tag queue is selected to be executed according to a preset priority.
  • the above-mentioned scheduling execution queue algorithm may employ a queue scheduling algorithm including, but not limited to, specific user behavior habits, user roles, most recently used principles, or first in first out.
  • Step 406 Presuming a label that is required to be used by the user to request a page to be accessed
  • Step 407 Pre-resolve the label used by the speculative page and store the label in the buffer space
  • Step 408 Generate an HTML speculative template according to the pre-resolved tag stored in the cache space, and parse the returned page that is returned by the user request according to the HTML speculative template, and combine the data in the data source. Binding generates the page displayed to the user;
  • Step 409 Send the page displayed to the user to a client browser.
  • the pre-analyzed speculative label is implemented by speculating the label that the user needs to use to access the page, thereby reducing the transmission of repeated labels in the network, and reducing the repeated label resolution resources. Consumption, improve page processing efficiency.
  • the tag may be a tag with business semantics, or a common component tag with data processing and display logic.
  • FIG. 5 is a flowchart of a page processing method according to Embodiment 3 of the present invention.
  • the execution body of the method is a browser and is configured on a client. As shown in FIG. 5, the method includes:
  • Step 501 Send a request page attribute and/or a client attribute to the web server to enable the web server to generate a parsing policy table.
  • the page attributes described in this step may include a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, a network access type of the client, or a client application scenario type.
  • the user state parameter is intercepted by the facet method, and the parameters of the user request URL are filled in, not only the URL, the htt request parameter, the session and other parameter carriers.
  • Step 502 Receive an HTML speculative template sent by the web server.
  • the method may further include: receiving the HTML speculative template actively pushed by the web server; or
  • the client browser also caches the received HTML speculative template in the local, for subsequent users to access the web page parsing call. Thereby implementing a client-side browser and a server-side double buffering mechanism to process web pages more quickly.
  • Step 503 When the receiving user asks for the returned page, parsing the returned page according to the HTML speculative template and generating the page displayed to the user according to the data binding provided by the data source.
  • the webpage server generates a parsing policy table by sending a request page attribute and/or client attribute information to the webpage server, and dynamically determines a webpage parsing manner according to the parsing policy table, so as to solve the existing The problem of inflexible page processing in technology.
  • FIG. 6 is a flowchart of a page processing method according to Embodiment 4 of the present invention. As shown in FIG. 6, the page parsing process is as follows:
  • the tag compilation parsing module 66 preferentially obtains the content in the queue for parsing (in the mixed mode, according to the policy)
  • the degree of execution of the table decision resolution that is, the server completes the template parsing part, the browser completes the data binding page generation part), and transmits it to the browser by pushing or directly responding to the user, and simultaneously caches on the browser;
  • two sets of unused template generation mechanisms and data binding logic are provided for different devices to adapt to different screen sizes, device types, and the like.
  • a template of corresponding size is adopted to adapt to the user's browsing requirements on different client devices.
  • the browser In the first step of compiling and parsing the page in step 2.1, the browser generates the page, and the user foreground operation is performed before or at the same time.
  • the background speculation module 62 speculates on the possible next business steps and pages according to the workflow and user behavior.
  • the tag is placed in the pre-parsing tag parsing queue 64.
  • the push or page response process can be judged by the priority queue. The priority of the current user response is high, and the priority of the next service step is estimated to be low.
  • the template push module pushes or responds to the user request or the prediction request according to the priority.
  • the pre-parsed label can be stored in the template cache of the server or the client browser according to the setting, so that the pre-parsed double buffer is realized, and the page processing efficiency is further improved.
  • FIG. 7 is a structural diagram of a web server according to Embodiment 5 of the present invention.
  • the web server 700 includes a generating module 71, a determining module 72, and a parsing module 73, where:
  • the generating module 71 is configured to generate a parsing policy table according to the page attribute and/or the client attribute sent by the receiving client browser, where the parsing policy table is used to determine a parsing manner of the user requesting to access the webpage, where the parsing manner is included in the webpage Server-side parsing and/or parsing in the client browser;
  • the determining module 72 is configured to determine, according to the parsing policy table, an resolution manner of the user requesting to access the page;
  • the parsing module 73 is configured to parse the page accessed by the user according to the parsing method.
  • the web server of this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 3, and has a function module corresponding to each step. The implementation principle and the technical effect are similar, and details are not described herein again.
  • the web server provided in this embodiment determines the adopted parsing manner by generating a parsing policy table before parsing the page, and implements flexible adjustment of the parsing method to improve the processing efficiency of the webpage.
  • FIG. 8 is a structural diagram of a web server according to Embodiment 5 of the present invention. On the basis of the embodiment shown in FIG. 7, it is assumed that the determined parsing manner is parsed at a client, as shown in FIG. 800 into one includes:
  • the speculative module 81 is configured to speculate the label that the user needs to use for the next request to access the page;
  • the pre-parsing module 82 is configured to pre-resolve the label used by the speculative page and store the label in the buffer space;
  • the sending module 83 is configured to generate a hypertext markup language HTML speculative template according to the pre-resolved tag stored in the cache space, and send the HTML speculative template to the client browser, so that the client browser receives the The user requests access to the returned page for parsing and combining data
  • the data binding in the source generates the page that is displayed to the user.
  • speculation module 81 is specifically configured to:
  • the web server of the present embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 4, and has a function module corresponding to each step.
  • the implementation principle and the technical effect are similar, and details are not described herein again.
  • the pre-resolving 82 module is specifically configured to: pre-resolve the label used by the speculative page, and use a label common to multiple users, and a partially-resolved label. Or, according to the parsing policy table, the tag that needs to be cached is stored in the cache space, and the user-specific tag is sent to the client browser to be stored in the cache space of the client browser.
  • the sending module 83 is specifically configured to:
  • the HTML speculative template is sent to the client browser.
  • the foregoing embodiment sends the generated HTML speculative template to the client for browsing, thereby implementing pre-processing of the page by the client browser, and further improving the efficiency of processing the page on the client browser.
  • FIG. 9 is a structural diagram of a web server according to Embodiment 7 of the present invention.
  • the web server is 900 into one includes:
  • the speculative module 91 is configured to speculate the label that the user needs to use for the next requested page
  • the pre-parsing module 92 is configured to pre-parse the label used by the speculative page and store the label in the buffer space;
  • the generating display page module 93 is configured to generate an HTML speculative template according to the pre-resolved tag stored in the cache space, and request the received user to be accessed according to the HTML speculative template. Asking the returned page to parse and combine the data binding in the data source to generate the page displayed to the user;
  • the sending module 94 is configured to send the page displayed to the user to a client browser. Further, the speculation module 91 is specifically configured to:
  • the web server of the present embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 4, and has a function module corresponding to each step.
  • the implementation principle and the technical effect are similar, and details are not described herein again.
  • the parsing module 93 is specifically configured to:
  • the request response tag queue or the pre-resolved tag queue is selected to be executed according to a preset priority.
  • the label parsed by the pre-parsing module 92 is a label with business semantics or a common component label with data processing and display logic.
  • the page attribute received by the generating module 71 includes a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, a network access type of the client, or a client.
  • Application scenario type the page attribute received by the generating module 71 includes a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, a network access type of the client, or a client.
  • the generating module 71 is specifically configured to:
  • the user manually configures the generated resolution policy table according to the page attribute and/or the client attribute; or, automatically generates a resolution policy table according to the page attribute and/or the client attribute.
  • the foregoing embodiment implements pre-processing of the page by the server through the pre-generated HTML speculative template, and further improves the efficiency of processing the page on the server.
  • FIG. 10 is a structural diagram of a client browser according to Embodiment 8 of the present invention.
  • the client browser 1000 includes:
  • the sending module 101 is configured to send a request page attribute and/or a client attribute to the webpage server, so that the webpage server generates a parsing policy table;
  • the receiving module 102 is configured to receive a hypertext markup language HTML parsing module 103 sent by the webpage server, configured to receive, when the user asks to access the returned page, parse the returned page according to the HTML speculative template, and provide the data in combination with the data source.
  • the data binding generates the page that is displayed to the user.
  • the web server of the present embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 5, and has the function modules corresponding to the respective steps.
  • the implementation principle and technical effects are similar, and details are not described herein again.
  • the receiving module 102 is specifically configured to: receive the HTML speculative template that is actively pushed by the web server; or
  • the HTML speculative template that requests the web server to respond to the request after receiving the request for obtaining the HTML speculative template message is sent to the web server.
  • the page attributes sent by the sending module 101 include a page configuration preference policy, a page data binding location or a page related parameter
  • the client attributes include a client browser type and a client. End network access type or client application scenario type.
  • the client browser receives the HTML speculative template sent by the web server to implement pre-processing of the page, thereby improving the processing efficiency of the page.
  • FIG. 11 is a schematic structural diagram of a page processing system according to Embodiment 9 of the present invention.
  • the page processing system includes a web server 1101, a client 1102, and a data source 1103.
  • the web server 1101 includes FIG. 7-9.
  • the client 1102 includes a client browser as shown in FIG.
  • the data source 1103 can provide various services of a pure data source, such as a representational state transition.
  • REST Real State Transfer
  • SOA service-oriented architecture
  • the processing system provided in this embodiment can interact with the user, tag resolution, and data binding logic can be distributed to the browser end of the access user, the performance of the server software system is increased, and the same configuration server can access more users and other Business processing.
  • the webpage server in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 3 or FIG. 4, and has a function module corresponding to each step, and the implementation principle and the technical effect are similar, and details are not described herein again. .
  • the client browser in this embodiment may be used to execute the technical solution of the method embodiment shown in FIG. 5, and has a function module corresponding to each step.
  • the implementation principle and the technical effect are similar, and details are not described herein again.
  • the web server 1200 may include an input device 1201 (optional), an output device 1204 (optional), a processor 1202, and a memory. 1203.
  • Memory 1203 can include read only memory and random access memory and provides instructions and data to processor 1202. A portion of the memory 1203 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • Memory 1203 stores the following elements, executable modules or data structures, or subsets thereof, or their extended sets:
  • Operation instructions Includes various operation instructions for implementing various operations.
  • Operating System Includes a variety of system programs for implementing basic services and handling hardware-based tasks.
  • the processor 1202 performs the following operations by calling an operation instruction stored in the memory 1203 (the operation instruction can be stored in the operating system):
  • the parsing policy table is configured to determine a parsing manner of the user requesting to access the webpage according to the page attribute and/or the client attribute sent by the client browser, where the parsing method includes parsing in the web server end. And/or parsing in the client browser;
  • the page that the user asks for is analyzed.
  • the web server 1200 generates a parsing policy table by the processor 1202, and determines a processing method of the page parsing according to the parsing policy table, thereby improving the flexibility and efficiency of the page processing.
  • the processor 1202 controls the operation of the web server 1200, and the processor 1202 may also be referred to as a CPU. (Central Processing Unit, Central Processing Unit).
  • Memory 1203 can include read only memory and random access memory and provides instructions and data to processor 1202. A portion of the memory 1203 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the components of the web server 1200 are coupled together by a bus system 1205.
  • the bus system 1205 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1205 in the figure.
  • Processor 1202 may be an integrated circuit chip with signal processing capabilities. In an implementation process, the steps of the above method may be completed by an integrated logic circuit of hardware in the processor 1202 or an instruction in the form of software.
  • the processor 1202 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware. Component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the methods, steps, and logic blocks disclosed in the embodiments of the invention may be implemented or carried out.
  • the general purpose processor can be a microprocessor or the processor can be any conventional processor or the like.
  • the steps of the method disclosed in connection with the embodiments of the present invention may be directly embodied by the execution of the hardware decoding processor, or by a combination of hardware and software modules in the decoding processor.
  • the software modules can be located in a conventional memory medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 1203, and the processor 1202 reads the information in the memory 1203, and completes the steps of the above method in combination with the hardware thereof.
  • the parsing manner is performed on the client, and the processor 1202 may further infer the label that the user needs to use to access the page that is requested to be accessed; the processor 1202 may further pre-parse the speculative page.
  • the label to be used is stored in the cache space; the output device 1204 may further generate a hypertext markup language HTML speculative template according to the pre-parsed label stored in the cache space and send the HTML speculation template to the client browser, so that The client browser parses the page returned by receiving the user request access and generates the page displayed to the user in conjunction with data binding in the data source.
  • the parsing manner is performed on the server side, and the processor 1202 may further infer the label that the user needs to use for the next requested page; the processor 1202 may pre-parse the speculative page.
  • the tag to be used is stored in the cache space; the processor 1202 may further generate an HTML speculative template according to the pre-parsed tag stored in the cache space, and according to the HTML
  • the speculative template parses the received page returned by the user request access and generates the page displayed to the user by combining the data binding in the data source; the output device 1204 may also send the message to the user browser to the user The page shown.
  • the processor 1202 may be configured to generate a request response label queue according to a message that is accessed by a user sent by the client browser, and generate a pre-resolved label queue according to the label used by the pre-resolved the estimated page;
  • the preset priority is selected to execute the request response tag queue or the pre-resolved tag queue.
  • the processor 1202 may specifically pre-resolve the label used by the speculative page, and use a label common to multiple users, a partially parsed label, or a cached decision according to the parsing policy table.
  • the tag is stored in the cache space, and the user-specific tag is sent to the client browser for storage in the cache space of the client browser.
  • the processor 1202 may specifically create a page database that the user has requested to access, where the page database stores the page visited by the user history; the input device 1201 may receive the page requested by the user, and Combining the page database to infer the label that the user needs to use for the next requested page.
  • the output device 1204 may specifically push the HTML speculative template to the client browser.
  • the output device 1204 After the input device 1201 receives the request sent by the client browser to obtain the HTML speculative template message, the output device 1204 The HTML speculation template is sent to the client browser.
  • the label parsed by the pre-parsing module is a label with business semantics, or a common component label with data processing and display logic.
  • the page attribute received by the input device 1201 includes a page configuration preference policy, a page data binding location, or a page related parameter, where the client attribute includes a client browser type, a network access type of the client, or a client application scenario. Types of.
  • the processor 1202 may be configured to manually generate a parsing policy table according to the page attribute and/or the client attribute; or automatically generate the parsing policy table according to the page attribute and/or the client attribute.
  • the web server 1200 can also perform the method and the embodiment shown in FIG. 3 or FIG. 4, and the embodiments of the present invention are not described herein again.
  • the web server that is improved in this embodiment can generate a parsing policy table in advance, and can determine the manner of page parsing according to the parsing policy table during page processing, compared with the fixed in the prior art.
  • the way of label parsing improves the processing efficiency and flexibility of the page.
  • FIG. 13 is a structural diagram of a client device according to Embodiment 11 of the present invention.
  • the client device 1300 includes: at least one processor 1301, at least one network interface 1304 or other user interface 1303, and a memory 1305.
  • Communication bus 1302 is used to implement connection communication between these components.
  • the client device 1300 optionally includes a user interface 1303, including a display (eg, a touch screen, LCD, CRT, Holographic or Projector, etc.), a keyboard or a pointing device (eg, a mouse, a trackball) ), touchpad or touch screen, etc.).
  • a display eg, a touch screen, LCD, CRT, Holographic or Projector, etc.
  • a keyboard or a pointing device eg, a mouse, a trackball
  • touchpad or touch screen etc.
  • Memory 1305 can include read only memory and random access memory and provides instructions and data to processor 1301. A portion of memory 1305 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the network interface 1304 is configured to: send a request page attribute and/or a client attribute to the webpage server to enable the webpage server to generate a parsing policy table; and receive a hypertext markup language sent by the webpage server
  • the HTML speculative template is used by the processor 1301 to receive the page that is returned to the user according to the HTML speculative template and parse the returned page according to the data binding provided by the data source.
  • the network interface 1304 is specifically configured to: receive the HTML speculative template that is actively pushed by the webpage server; or
  • the HTML that sends the webpage server request response after sending the request to obtain the HTML speculation template message to the webpage server is further, the page attribute sent by the network interface 1304 includes The page configuration preference policy, the page data binding location, or the page related parameter, the client property includes a client browser type, a client network access type, or a client application scenario type.
  • client device 1300 can also perform the method and the embodiment of FIG. 5, and details are not described herein again.
  • the client device mentioned in this embodiment may be a user terminal device, for example, a tablet computer, an intelligent terminal, or the like.
  • the client device provided by the foregoing embodiment implements pre-processing of the page on the client browser by receiving the HTML push template sent by the web server, thereby implementing the page improvement.
  • Surface processing efficiency
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

提供一种页面处理方法、装置及系统。方法包括:根据接收客户端浏览器发送的页面属性和/或客户端属性生成解析策略表,所述解析策略表用于确定用户请求访问页面的解析方式,所述解析方式包括在网页服务器端解析和/或在客户端浏览器解析;根据所述解析策略表确定用户请求访问页面的解析方式;根据所述解析方式对用户请问访问的页面进行解析。通过生成解析策略表,使得可以根据实际网络或者业务情况选择不同的解析方式,实现页面处理的灵活性,提高页面处理效率。

Description

页面处理方法、 装置及系统
技术领域
本发明涉及通信领域, 尤其涉及一种页面处理方法、 装置及系统。 背景技术
随着信息化的发展, 网络和人们的日常生活日益紧密相关, 用户通过 上网浏览网页、 收发邮件、 订阅数据等, 就可以足不出户的和朋友交流。 富互联网应用 (Rich Internet Application, RIA)不仅可以提供类似于桌面 程序的交互方案, 也具有浏览器 /服务器(Browser/Server, B/S )程序的免 安装特性, 具有良好的表现能力和交互能力, 更能够满足用户直观和具交 互性的在线体验。
现有技术中,客户端浏览器 11向网页服务器 12请求业务相关的 Web 应用 URL; 网页服务器 12返回该业务的扩展超文本标记语言 (Hypertext Markup Language , HTML ) 标签; 以及该扩展标签相关的脚本语言 ( JavaScript, JS )逻辑; 浏览器在前台解析响应标签, 生成未绑定数据的 HTML模板, 同时下发 Ajax给网页服务器 12以从数据源 13请求业务数 据,浏览器将标签对应的业务数据绑定 JS逻辑生成 HTML页面并展示(如 图 1 所示) ; 或者, 客户端浏览器 21 向网页服务器 22请求业务相关的 Web应用 URL, 由网页服务器 22进行标签解析和从数据源 23得到的数 据绑定生成包含数据和 HTML标签的响应页面后发送给客户端浏览器,浏 览器显示该响应页面 (如图 2所示) 。
但是, 现有技术中, 无论是页面是在服务器端或者是客户端浏览器上 对页面进行解析是固定设置的, 无法根据业务属性或实际的网络情况进行 动态选择解析方式, 导致页面处理不灵活, 因此当存在大量的页面访问请 求时, 导致系统处理较慢, 效率较低。 发明内容
本发明提供一种页面处理方法、 装置及系统, 提高了页面的处理效率和 灵活性。 第一方面, 本发明实施例提供一种页面处理方法, 包括:
根据接收客户端浏览器发送的页面属性和 /或客户端属性生成解析策略 表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式 包括在网页服务器端解析和 /或在客户端浏览器解析;
根据所述解析策略表确定用户请求访问页面的解析方式;
根据所述解析方式对用户请问访问的页面进行解析。
在第一方面第一种可能实现的方式中, 若根据所述解析策略表确定用户 请求访问页面的解析方式为在客户端浏览器解析, 则所述根据所述解析方式 对用户请问访问的页面进行解析, 包括:
推测所述用户下一歩请求访问的页面所需要使用的标签;
预解析所述推测的所述页面所需要使用的标签并存入缓存空间; 根据所述缓存空间中存入的预解析的标签生成 HTML推测模板并向客户 端浏览器发送该 HTML推测模板, 以使所述客户端浏览器对接收到所述用户 请求访问返回的页面进行解析并结合数据源中的数据绑定生成向所述用户显 示的所述页面。
在第一方面第二种可能实现的方式中, 若根据所述解析策略表确定用户 请求访问页面的解析方式为在服务器端解析, 则所述根据所述解析方式对用 户请问访问的页面进行解析, 包括:
推测所述用户下一歩请求访问的页面所需要使用的标签;
预解析所述推测的所述页面所需要使用的标签并存入缓存空间; 根据所述缓存空间中存入的预解析的标签生成 HTML推测模板, 并根据 所述 HTML推测模板对接收到的所述用户请求访问返回的页面进行解析并结 合数据源中数据绑定生成向所述用户显示的所述页面;
向客户端浏览器发送向所述用户显示的所述页面。
根据第一方面第二种可能的实现方式中, 在第一方面第三种可能的实现 方式中, 所述根据所述 HTML推测模板对接收到的所述用户请求访问返回的 页面进行解析包括:
根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列; 根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列;
根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
根据第一方面第一种或者第二种可能的实现方式中, 在第一方面第四种 可能的实现方式中, 所述预解析所述推测的所述页面所需要使用的标签并存 入缓存空间包括:
预解析所述推测的所述页面所需要使用的标签, 并将多个用户共同的标 签、 已部分解析的标签、 或根据所述解析策略表决策需要缓存的标签存入缓 存空间, 将用户特有的标签发送到客户端浏览器以存入到客户端浏览器的缓 存空间。
根据第一方面第一种或者第二种可能的实现方式中, 在第一方面第五种 可能的实现方式中, 所述推测所述用户下一歩请求访问的页面所需要使用的 标签, 包括:
创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面;
接收所述用户请求访问的页面, 并结合所述页面数据库推测所述用户下 一歩请求访问的页面所需要使用的标签。
根据第一方面第一种可能的实现方式, 在第一方面第六种可能的实现方 式中, 所述向客户端浏览器发送该 HTML推测模板, 包括:
将所述 HTML推测模板主动推送给客户端浏览器; 或,
接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述 HTML推测模板发送给所述客户端浏览器。
根据第一方面第一种至第六种任意可能的实现方式, 在第一方面第七种 可能的实现方式中, 所述标签为带业务语义的标签, 或带数据处理和显示逻 辑的公共组件标签。
在第一方面第八种可能的实现方式中, 所述页面属性包括页面配置偏好 策略、 页面数据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏 览器类型、 客户端的网络接入类型或客户端应用场景类型。 第二方面, 本发明实施例提供一种页面处理方法, 包括:
向所述网页服务器发送请求页面属性和 /或客户端属性以使所述网页服 务器生成解析策略表;
接收所述网页服务器发送的 HTML推测模板;
接收用户请问访问返回的页面时, 根据所述 HTML推测模板解析所述返 回的页面并结合数据源提供的数据绑定生成向所述用户显示的所述页面。
在第二方面第一种可能的实现方式中, 所述接收所述网页服务器发送的 HTML推测模板包括:
接收所述网页服务器主动推送的所述 HTML推测模板; 或,
若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML 在第二方面第二种可能的实现方式中, 所述页面属性包括页面配置偏好 策略、 页面数据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏 览器类型、 客户端的网络接入类型或客户端应用场景类型。
第三方面, 本发明实施例提供一种网页服务器, 包括:
生成模块, 用于根据接收客户端浏览器发送的页面属性和 /或客户端属性 生成解析策略表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式包括在网页服务器端解析和 /或在客户端浏览器解析;
确定模块,用于根据所述解析策略表确定用户请求访问页面的解析方式; 解析模块, 用于根据所述解析方式对用户请问访问的页面进行解析。 在第三方面第一种可能实现的方式中, 所述解析方式为在客户端解析, 所述网页服务器还包括:
推测模块,用于推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析模块, 用于预解析所述推测的所述页面所需要使用的标签并存入 缓存空间;
发送模块, 用于根据所述缓存空间中存入的预解析的标签生成超文本标 记语言 HTML推测模板并向客户端浏览器发送该 HTML推测模板,以使所述 客户端浏览器对接收到所述用户请求访问返回的页面进行解析并结合数据源 中的数据绑定生成向所述用户显示的所述页面。
在第三方面第二种可能实现的方式中,所述解析方式为在服务器端解析, 所述网页服务器还包括:
推测模块,用于推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析模块, 用于预解析所述推测的所述页面所需要使用的标签并存入 缓存空间;
生成显示页面模块, 用于根据所述缓存空间中存入的预解析的标签生成 HTML推测模板, 并根据所述 HTML推测模板对接收到的所述用户请求访问 返回的页面进行解析并结合数据源中数据绑定生成向所述用户显示的所述页 面;
发送模块, 用于向客户端浏览器发送向所述用户显示的所述页面。
根据第三方面第二种可能的实现方式中, 在第三方面第三种可能的实现 方式中, 所述解析模块具体用于:
根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列;
根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列;
根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
根据第三方面第一种或者第二种可能的实现方式中, 在第三方面第四种 可能的实现方式中, 所述预解析模块具体用于:
预解析所述推测的所述页面所需要使用的标签, 并将多个用户共同的标 签、 已部分解析的标签、 或根据所述解析策略表决策需要缓存的标签存入缓 存空间, 将用户特有的标签发送到客户端浏览器以存入到客户端浏览器的缓 存空间。
根据第三方面第一种或者第二种可能的实现方式中, 在第三方面第五种 可能的实现方式中, 所述推测模块具体用于:
创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面; 接收所述用户请求访问的页面, 并结合所述页面数据库推测所述用户下 一歩请求访问的页面所需要使用的标签。 。
根据第三方面第一种可能的实现方式, 在第三方面第六种可能的实现方 式中, 所述发送模块具体用于:
将所述 HTML推测模板主动推送给客户端浏览器; 或,
接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述 HTML推测模板发送给所述客户端浏览器。
根据第三方面第一种至第六种任意可能的实现方式, 在第三方面第七种 可能的实现方式中, 所述预解析模块解析的标签为带业务语义的标签, 或带 数据处理和显示逻辑的公共组件标签。
在第三方面第八种可能的实现方式中, 所述生成模块接收的页面属性包 括页面配置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属 性包括客户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。
第四方面, 本发明实施例提供一种客户端浏览器, 包括:
发送模块, 用于向所述网页服务器发送请求页面属性和 /或客户端属性以 使所述网页服务器生成解析策略表;
接收模块, 用于接收所述网页服务器发送的超文本标记语言 HTML推测 模板;
解析模块, 用于接收用户请问访问返回的页面时, 根据所述 HTML推测 模板解析所述返回的页面并结合数据源提供的数据绑定生成向所述用户显示 的所述页面。
在第四方面第一种可能的实现方式中, 所述接收模块具体用于: 接收所述网页服务器主动推送的所述 HTML推测模板; 或,
若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML 在第四方面第二种可能的实现方式中, 所述发送模块发送的页面属性包 括页面配置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属 性包括客户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。 第五方面, 本发明实施例提供一种页面处理系统, 包括网页服务器、 客 户端和数据源, 其中, 所述网页服务器包括如第三方面、 第三方面第一种至 第八种任意一种可能实现方式中所述的网页服务器, 所述客户端包括如第四 方面, 第四方面第一种或第二种任意一种可能实现方式中所述的客户端浏览 器。
本发明实施例通过生成解析策略表, 以实现根据实际网络或者业务情况 确定选择不同的将解析方式, 解决现有技术中页面处理不够灵活, 处理效率 低的问题。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术中在客户端浏览器解析网页的网络结构图;
图 2为现有技术中在服务器端解析网页的网络结构图;
图 3为本发明实施例一提供的页面处理方法的流程图;
图 4为本发明实施例二提供的页面处理方法的流程图;
图 5为本发明实施例三提供的页面处理方法的流程图;
图 6为本发明实施例四提供的页面处理方法的流程图;
图 7为本发明实施例五提供的网页服务器的结构图; 图 8为本发明实施例六提供的网页服务器的结构图;
图 9为本发明实施例七提供的网页服务器的结构图;
图 10为本发明实施例八提供的客户端浏览器的结构图;
图 11为本发明实施例九提供的页面处理系统的架构图;
图 12为本发明实施例十提供的网页服务器的结构图; 图 13为本发明实施例十一提供的客户端设备的结构图。
具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供的方法可以应用于包括网页服务器、 客户端以及数据 源的页面处理系统中, 其中客户端配置有处理页面的浏览器, 比如采用数据 绑定和标签解析分离模式的页面处理系统。
图 3为本发明实施例一提供的页面处理方法的流程图, 本方法的执行主 体是网页服务器, 如静态网页服务器等。 如图 3所示, 该方法具体包括: 歩骤 301、 根据接收客户端浏览器发送的页面属性和 /或客户端属性生成 解析策略表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述 解析方式包括在网页服务器端解析和 /或在客户端浏览器解析。
可选地, 所述页面属性可以包括页面配置偏好策略、 页面数据绑定位置 或者页面相关参数等与页面相关的属性, 例如页面的标签数量、 数据绑定是 在服务器还是在客户端等因素。
所述客户端属性包括客户端浏览器类型、 显示屏幕大小、 客户端的网络 接入类型、 客户端应用场景类型等无显示所述页面相关的客户端的属性, 例 如用户浏览器类型(PC, Pad, Mobile),接入类型(固网,无线 GPRS , 3G/4G, Wifi) , 客户端的电量、 数据流量或者用户场景 (是否漫游, 服务器是否空 闲) 等参数。
歩骤 302、 根据所述解析策略表确定用户请求访问页面的解析方式。 根据所述解析策略表确定解析方式, 例如可以选择只在网页服务器端解 析, 只在客户端浏览器解析, 也可以按照一定比例分配, 一部分选择在网页 服务器端解析, 一部分选择在客户端浏览器解析。 本发明实施例可以根据不 同的排列组合, 定制出不同的解析策略, 即包括但不限于以上默认 3种策略, 可根据不同的页面选择不同的解析方式, 或者由客户端浏览器自行决定解析 方式, 或者由网页服务器自行决定解析方式, 本发明并不以此为限制。
歩骤 303、 根据所述解析方式对用户请问访问的页面进行解析。
由上可见, 相比于现有技术中, 页面在服务器端或者是客户端浏览器上 对页面进行解析是固定设置的, 无法根据业务属性或实际的网络情况进行动 态选择解析方式, 本发明实施例通过生成解析策略表, 使得可以根据实际网 络或者业务情况选择不同的将解析方式, 实现页面处理的灵活性, 从而提高 页面处理效率。
图 4为本发明实施例二提供的页面处理方法的流程图, 本实施例在上一 实施例的基础上, 增加与解析标签的歩骤, 如图 4所示, 该方法具体可以包 括:
歩骤 401、 根据接收客户端浏览器发送的页面属性和 /或客户端属性生成 解析策略表;
本歩骤中所述页面属性和客户端属性与上一实施例相同,在此不在赘述。 可选地, 本歩骤在具体实施时, 可以选择用户根据页面属性和 /或客户端 属性手动配置生成解析策略表; 或,
根据页面属性和 /或客户端属性自动生成解析策略表。
例如, 根据不同的用户终端类型, 网络类类型、 设置智能采用配置策略 以自适应用户场景, 如可自动匹配用户场景是漫游或本地。
歩骤 402、 根据所述解析策略表确定用户请求访问页面的解析方式; 解析模式可以设置为服务器编译、 浏览器编译以及智能混合模式, 即部 分在服务器编译, 部分在浏览器编译, 以下表 1为例。 当客户端的类型为手 机, 且手机接入类型为 3G模式, 用户偏好设置为节约流量, 场景在本地, 且电路剩余小于 20%, 服务器空状态为空时, 则可以确定选择解析方式为浏 览器编译, 即在客户端浏览器进行标签解析和数据绑定。 表 1
Figure imgf000011_0001
3G 节 约 <20 闲 客户端 流里 地 % 浏览器解析
Wi 省 电 i [50 用 户 智能混 fi 模式 游 % , 20%] 数< 人 最 大
用户数 /2
iPad … … … … …
… … … … … …
… … … … … …
PC … … … … …
… … … … … …
… … … … … … 进一歩地, 若在本歩骤中确定的解析方式是在客户端解析, 则执行歩骤
403-405。
歩骤 403、 推测所述用户下一歩请求访问的页面所需要使用的标签; 本歩骤具体实施时, 可选的一种实现方式为: 首先创建所述用户已请求 访问的页面数据库; 然后接收所述用户请求访问的页面, 并结合所述页面数 据库推测所述用户下一歩请求访问的页面所需要使用的标签。 例如根据统计 经验和业务流程计算下一歩用户所使用的标签。
歩骤 404、 预解析所述推测的所述页面所需要使用的标签并存入缓存空 间;
需要说明的是, 本发明实施例所述的标签代表了一段应用或者一个涵盖 业务组件 (可被解析成可运行的 HTML+JS+CSS等具体的业务代码) , 或公 共组件, 标签翻译或解析后, 生成一个不含数据的模板, 或无数据的空应用 本歩骤具体实施时, 优选的一种实现方式为: 预解析所述推测的所述页 面所需要使用的标签, 并将多个用户共同的标签、 已部分解析的标签、 或根 据所述解析策略表决策需要缓存的标签存入缓存空间, 将用户特有的标签发 送到客户端浏览器以存入到客户端浏览器的缓存空间。 所述用户特有的标签 是指不同的用户具有的区别于其他用户的自定义的标签。 通过在浏览器侧和 服务器侧双缓存标签, 实现减少扩展标签或 HTML标签的解析和数据传输, 节约带宽消耗。
歩骤 405、 根据所述缓存空间中存入的预解析的标签, 生成 HTML推测 模板并向客户端浏览器发送该 HTML推测模板, 以使所述客户端浏览器对接 收到所述用户请求访问返回的页面进行解析并结合数据源中的数据绑定生成 向所述用户显示的所述页面;
可选地, 本歩骤中,所述向客户端浏览器发送该 HTML推测模板,包括: 将所述 HTML推测模板主动推送给客户端浏览器; 或,
接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述
HTML推测模板发送给所述客户端浏览器。
进一歩地, 本歩骤中所述根据所述 HTML推测模板对接收到的所述用户 请求访问返回的页面进行解析包括:
根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列;
根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列;
根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
上述调度执行队列算法可采用包括但不限于根据具体用户行为习惯、 用 户角色、 最近最常使用原则或者先进先出等队列调度算法。
由上可见, 通过上述技术方案中调度执行双队列, 即请求响应标签队列 和预解析标签队列, 实现请求响应和预解析的并行执行, 进一歩提高页面处 理的效率。
若在歩骤 402确定的是在服务器端解析, 则执行歩骤 406-409: 歩骤 406、 推测所述用户下一歩请求访问的页面所需要使用的标签; 歩骤 407、 预解析所述推测的所述页面所需要使用的标签并存入缓存空 间;
歩骤 408、 根据所述缓存空间中存入的预解析的标签生成 HTML推测模 板, 并根据所述 HTML推测模板对接收到的所述用户请求访问返回的页面进 行解析并结合数据源中的数据绑定生成向所述用户显示的所述页面;
歩骤 409、 向客户端浏览器发送所述向所述用户显示的所述页面。
由上可见, 本发明实施例, 通过推测用户下一歩请求访问的页面所需要 使用的标签, 实现预解析推测的标签, 从而减少了数据在网络中重复标签的 传输, 降低了重复的标签解析资源消耗, 提高页面处理效率。
进一歩地, 在上述实施例的基础上, 所述标签可以为带业务语义的标签, 或带数据处理和显示逻辑的公共组件标签。
图 5为本发明实施例三提供的页面处理方法的流程图, 本方法的执行主 体是浏览器, 配置于客户端, 如图 5所示, 该方法包括:
歩骤 501、 向所述网页服务器发送请求页面属性和 /或客户端属性以使所 述网页服务器生成解析策略表;
本歩骤中所述页面属性可以包括页面配置偏好策略、 页面数据绑定位置 或者页面相关参数, 所述客户端属性包括客户端浏览器类型、 客户端的网络 接入类型或者客户端应用场景类型。 比如将用户状态参数由切面方法拦截, 填入用户请求 URL的参数中,不只限于 URL, htt 请求参数, session等参数 载体。
歩骤 502、 接收所述网页服务器发送的 HTML推测模板;
本歩骤,可选地,可以包括:接收所述网页服务器主动推送的所述 HTML 推测模板; 或,
若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML
、 需要说明的是, 客户端浏览器将接收到的 HTML推测模板也缓存在本地 中, 供后续的用户访问网页解析调用。 从而实现客户端浏览器和服务器端双 缓冲机制, 更加快速的对网页进行处理。 歩骤 503、 接收用户请问访问返回的页面时, 根据所述 HTML推测模板 解析所述返回的页面并结合数据源提供的数据绑定生成向所述用户显示的所 述页面。
由上可见, 本发明实施例通过向所述网页服务器发送请求页面属性和 /或 客户端属性信息实现所述网页服务器生成解析策略表并根据解析策略表动态 决定网页解析的方式, 以解决现有技术中页面处理不灵活的问题。
图 6为本发明实施例四提供的页面处理方法的流程图, 如图 6所示, 页 面解析的流程如下:
1、用户请求访问页面时, 首先检査浏览器缓存端是否有该请求访问页面 的缓存, 如有, 则直接从服务器取纯数据, 绑定生成最终显示页面;
2、如果没有该请求访问页面的缓存, 则将该用户访问请求发向用户请求 拦截器, 经过该拦截器对请求进行分发, 例如判断是否是第一次请求访问等;
2.1、 如果是第一次请求新业务, 则基于标签库 61 将当前待解析标签放 入请求响应标签队列 63中, 标签编译解析模块 66优先获取该队列中内容进 行解析 (混合模式下需要根据策略表决策解析的执行程度, 即服务器完成模 板解析部分, 浏览器完成数据绑定页面生成部分) , 并通过推送或是直接响 应用户的方式传递给浏览器, 同时在浏览器上缓存;
2.2、 如果该业务不是第一次请求, 则査找服务器缓存, 并同时向推测模 块 62发出请求推测用户下一歩请求访问的页面所需要使用的标签,并放入预 解析标签队列中, 其中所述推测模块 62基于历史页面数据库 65对用户下一 歩请求访问的页面所需要使用的标签进行推测。
可选地, 对于同一标签, 针对不同的设备提供两套不用的模板生成机制 和数据绑定逻辑, 以适应不同的屏幕大小, 设备类型等需求。 例如, 根据不 同手机型号的屏幕大小的不同, 采用对应大小的模板, 以适应用户在不同的 客户端设备上浏览的需求。
3、 在歩骤 2.1页面首次编译解析同时, 浏览器生成页面, 用户前台操作 下一歩提交前或同时, 后台推测模块 62根据工作流和用户行为操作习惯, 推 测可能的下一业务歩骤和页面的标签, 放入预解析标签解析队列 64, 在服务 器空闲时编译解析相关页面和业务标签模板, 放入服务器模板缓存, 同时推 送到浏览器模板缓存。 4、推送或页面响应过程可以经过优先级队列判断, 当前用户响应的优先 级高, 推测下一业务歩骤的优先级低, 模板推送模块根据优先级推送或响应 用户请求或预测请求。
由上可见, 本实施例通过歩骤 1-4, 使得预解析的标签可以根据设置存放 在服务器或者客户端浏览器的模板缓存中, 实现对预解析的双缓存, 进一歩 提高页面处理效率。
图 7为本发明实施例五提供的网页服务器的结构图, 如图 7所示, 该网 页服务器 700包括生成模块 71、 确定模块 72和解析模块 73, 其中:
生成模块 71,用于根据接收客户端浏览器发送的页面属性和 /或客户端属 性生成解析策略表,所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式包括在网页服务器端解析和 /或在客户端浏览器解析;
确定模块 72, 用于根据所述解析策略表确定用户请求访问页面的解析方 式;
解析模块 73, 用于根据所述解析方式对用户请问访问的页面进行解析。 本实施例的网页服务器, 可以用于执行图 3所示的方法实施例的技术方 案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处不再 赘述。
由上可见, 本实施例提供的网页服务器在解析页面之前, 通过生成解析 策略表来确定采用的解析方式, 实现了解析方式的灵活调整, 提高页面的处 理效率。
图 8为本发明实施例五提供的网页服务器的结构图, 本实施例在图 7所 示的基础上, 假设确定的所述解析方式为在客户端解析, 如图 8所示, 该网 页服务器 800进一歩包括:
推测模块 81, 用于推测所述用户下一歩请求访问的页面所需要使用的标 签;
预解析模块 82, 用于预解析所述推测的所述页面所需要使用的标签并存 入缓存空间;
发送模块 83, 用于根据所述缓存空间中存入的预解析的标签生成超文本 标记语言 HTML推测模板并向客户端浏览器发送该 HTML推测模板,以使所 述客户端浏览器对接收到所述用户请求访问返回的页面进行解析并结合数据 源中的数据绑定生成向所述用户显示的所述页面。
进一歩地, 所述推测模块 81具体用于:
创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面;
接收所述用户请求访问 71的页面,并结合所述页面数据库推测所述用户 下一歩请求访问的页面所需要使用的标签。
本实施例的网页服务器, 可以用于执行图 4所示的方法实施例的技术方 案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处不再 赘述。
在本实施的基础上, 进一歩地, 所述预解析 82模块具体用于: 预解析所述推测的所述页面所需要使用的标签, 并将多个用户共同的标 签、 已部分解析的标签、 或根据所述解析策略表决策需要缓存的标签存入缓 存空间, 将用户特有的标签发送到客户端浏览器以存入到客户端浏览器的缓 存空间。
在本实施的基础上, 进一歩地, 所述发送模块 83具体用于:
将所述 HTML推测模板主动推送给客户端浏览器; 或,
接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述 HTML推测模板发送给所述客户端浏览器。
由上可见, 上述实施例通过将生成的 HTML推测模板发送给所述客户端 浏览, 实现客户端浏览器对页面的预先处理, 进一歩提高页面在客户端浏览 器上处理的效率。
图 9为本发明实施例七提供的网页服务器的结构图, 本实施例在图 7所 示的基础上, 假设确定的所述解析方式为在服务器端解析, 如图 9所示, 该 网页服务器 900进一歩包括:
推测模块 91, 用于推测所述用户下一歩请求访问的页面所需要使用的标 签;
预解析模块 92, 用于预解析所述推测的所述页面所需要使用的标签并存 入缓存空间;
生成显示页面模块 93, 用于根据所述缓存空间中存入的预解析的标签生 成 HTML推测模板,并根据所述 HTML推测模板对接收到的所述用户请求访 问返回的页面进行解析并结合数据源中数据绑定生成向所述用户显示的所述 页面;
发送模块 94,用于向客户端浏览器发送所述向所述用户显示的所述页面。 进一歩地, 所述推测模块 91具体用于:
创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面;
接收所述用户请求访问的页面, 并结合所述页面数据库推测所述用户下 一歩请求访问的页面所需要使用的标签。
本实施例的网页服务器, 可以用于执行图 4所示的方法实施例的技术方 案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处不再 赘述。
在本实施例的基础上, 进一歩地, 所述解析模块 93具体用于:
根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列;
根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列;
根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
在上述任意网页服务器实施例的基础上, 进一歩地, 所述预解析模块 92 解析的标签为带业务语义的标签,或带数据处理和显示逻辑的公共组件标签。
可选地, 所述生成模块 71接收的页面属性包括页面配置偏好策略、 页面 数据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。
进一歩地, 所述生成模块 71, 具体用于:
用户根据页面属性和 /或客户端属性手动配置生成解析策略表; 或, 根据页面属性和 /或客户端属性自动生成解析策略表。
由上可见, 上述实施例通过预先生成的 HTML推测模板, 实现服务器对 页面的预先处理, 进一歩提高页面在服务器上处理的效率。
图 10为本发明实施例八提供的客户端浏览器的结构图, 如图 10所示, 该客户端浏览器 1000包括: 发送模块 101, 用于向所述网页服务器发送请求页面属性和 /或客户端属 性以使所述网页服务器生成解析策略表;
接收模块 102, 用于接收所述网页服务器发送的超文本标记语言 HTML 解析模块 103, 用于接收用户请问访问返回的页面时, 根据所述 HTML 推测模板解析所述返回的页面并结合数据源提供的数据绑定生成向所述用户 显示的所述页面。
本实施例的网页服务器, 可以用于执行图 5所示的方法实施例的技术方 案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处不再 赘述。
在本实施例的基础上, 进一歩地, 所述接收模块 102具体用于: 接收所述网页服务器主动推送的所述 HTML推测模板; 或,
若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML 推测模板。
在本实施例的基础上, 进一歩地, 所述发送模块 101发送的页面属性包 括页面配置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属 性包括客户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。
由上可见, 客户端浏览器通过接收网页服务器发送的 HTML推测模板, 实现对页面的预处理, 从而提高页面的处理效率。
图 11为本发明实施例九提供的页面处理系统的架构图, 如图 11所示, 该页面处理系统包括网页服务器 1101、 客户端 1102和数据源 1103, 其中网 页服务器 1101包括图 7-图 9任意所示的网页服务器, 客户端 1102包括如图 10所示的客户端浏览器。
该数据源 1103 可以提供纯数据源的各种服务, 比如表述性状态转移
( REpresentational State Transfer , REST ) 接口, 面向服务的体系结构 ( service-oriented architecture, SOA) 接口, 者 β可以作为数据源。
本实施例提供的处理系统, 在与用户交互, 标签解析, 数据绑定的逻辑 可以分布到接入用户的浏览器端, 服务器软件系统性能上升, 同配置服务器 可以接入更多的用户和其他业务处理。 本实施例中所述网页服务器可以用于执行图 3或图 4所示的方法实施例 的技术方案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处不再赘述。
本实施例中所述客户端浏览器可以用于执行图 5所示的方法实施例的技 术方案, 具备相应于各歩骤的功能模块, 其实现原理和技术效果类似, 此处 不再赘述。
由上可见, 在本实施例提高的页面处理系统中, 由于在页面处理之前, 通过生成解析策略表, 实现在页面处理时, 可以根据不同参数的综合考虑, 灵活的选择页面解析的方式, 提高页面处理效率。
图 12为本发明实施例十提供的网页服务器的结构图, 如图 12所示, 网 页服务器 1200可包括输入设备 1201 (可选的) 、 输出设备 1204 (可选的) 、 处理器 1202和存储器 1203。
存储器 1203可以包括只读存储器和随机存取存储器, 并向处理器 1202 提供指令和数据。存储器 1203的一部分还可以包括非易失性随机存取存储器 (NVRAM) 。
存储器 1203存储了如下的元素, 可执行模块或者数据结构, 或者它们的 子集, 或者它们的扩展集:
操作指令: 包括各种操作指令, 用于实现各种操作。
操作系统: 包括各种系统程序, 用于实现各种基础业务以及处理基于硬 件的任务。
在本发明实施例中, 处理器 1202通过调用存储器 1203存储的操作指令 (该操作指令可存储在操作系统中) , 执行如下操作:
根据输入设备 1201 接收客户端浏览器发送的页面属性和 /或客户端属性 生成解析策略表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式包括在网页服务器端解析和 /或在客户端浏览器解析;
根据所述解析策略表确定用户请求访问页面的解析方式;
根据所述解析方式对用户请问访问的页面进行解析。
本发明实施例中, 网页服务器 1200通过处理器 1202生成解析策略表, 并根据解析策略表确定页面解析的处理方式,提高页面处理的灵活性和效率。
处理器 1202控制网页服务器 1200的操作,处理器 1202还可以称为 CPU (Central Processing Unit, 中央处理单元) 。 存储器 1203可以包括只读存储 器和随机存取存储器, 并向处理器 1202提供指令和数据。 存储器 1203的一 部分还可以包括非易失性随机存取存储器 (NVRAM ) 。 具体的应用中, 网 页服务器 1200的各个组件通过总线系统 1205耦合在一起,其中总线系统 1205 除包括数据总线之外, 还可以包括电源总线、 控制总线和状态信号总线等。 但是为了清楚说明起见, 在图中将各种总线都标为总线系统 1205。
上述本发明实施例揭示的方法可以应用于处理器 1202中,或者由处理器 1202实现。 处理器 1202可能是一种集成电路芯片, 具有信号的处理能力。 在实现过程中,上述方法的各歩骤可以通过处理器 1202中的硬件的集成逻辑 电路或者软件形式的指令完成。上述的处理器 1202可以是通用处理器、数字 信号处理器 (DSP) 、 专用集成电路 (ASIC) 、 现成可编程门阵列 (FPGA) 或者其他可编程逻辑器件、 分立门或者晶体管逻辑器件、 分立硬件组件。 可 以实现或者执行本发明实施例中的公开的各方法、 歩骤及逻辑框图。 通用处 理器可以是微处理器或者该处理器也可以是任何常规的处理器等。 结合本发 明实施例所公开的方法的歩骤可以直接体现为硬件译码处理器执行完成, 或 者用译码处理器中的硬件及软件模块组合执行完成。 软件模块可以位于随机 存储器, 闪存、 只读存储器, 可编程只读存储器或者电可擦写可编程存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于存储器 1203, 处理器 1202读取存储器 1203中的信息, 结合其硬件完成上述方法的歩骤。
可选地, 所述解析方式为在客户端解析, 处理器 1202还可推测所述用户 下一歩请求访问的页面所需要使用的标签;处理器 1202还可预解析所述推测 的所述页面所需要使用的标签并存入缓存空间;输出设备 1204还可根据所述 缓存空间中存入的预解析的标签生成超文本标记语言 HTML推测模板并向客 户端浏览器发送该 HTML推测模板, 以使所述客户端浏览器对接收到所述用 户请求访问返回的页面进行解析并结合数据源中的数据绑定生成向所述用户 显示的所述页面。
可选地, 所述解析方式为在服务器端解析, 处理器 1202还可推测所述用 户下一歩请求访问的页面所需要使用的标签;处理器 1202还可预解析所述推 测的所述页面所需要使用的标签并存入缓存空间;处理器 1202还可根据所述 缓存空间中存入的预解析的标签生成 HTML推测模板, 并根据所述 HTML 推测模板对接收到的所述用户请求访问返回的页面进行解析并结合数据源中 数据绑定生成向所述用户显示的所述页面;输出设备 1204还可向客户端浏览 器发送向所述用户显示的所述页面。
可选地,处理器 1202具体可根据客户端浏览器发送的用户请求访问网页 的消息生成请求响应标签队列; 根据预解析所述推测的所述页面所需要使用 的标签生成预解析标签队列; 根据预设的优先级, 选择执行所述请求响应标 签队列或所述预解析标签队列。
可选地,处理器 1202具体可预解析所述推测的所述页面所需要使用的标 签, 并将多个用户共同的标签、 已部分解析的标签、 或根据所述解析策略表 决策需要缓存的标签存入缓存空间, 将用户特有的标签发送到客户端浏览器 以存入到客户端浏览器的缓存空间。
可选地, 处理器 1202具体可创建所述用户已请求访问的页面数据库, 所 述页面数据库中存储有所述用户历史访问过的页面;输入设备 1201可接收所 述用户请求访问的页面, 并结合所述页面数据库推测所述用户下一歩请求访 问的页面所需要使用的标签。
可选地, 输出设备 1204具体可将所述 HTML推测模板主动推送给客户 端浏览器; 或,输入设备 1201接收所述客户端浏览器发送的请求获取 HTML 推测模板消息后, 输出设备 1204将所述 HTML推测模板发送给所述客户端 浏览器。
可选地, 所述预解析模块解析的标签为带业务语义的标签, 或带数据处 理和显示逻辑的公共组件标签。
可选地, 输入设备 1201接收的页面属性包括页面配置偏好策略、 页面数 据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏览器类型、 客 户端的网络接入类型或客户端应用场景类型。
可选地, 处理器 1202 具体可用户根据页面属性和 /或客户端属性手动配 置生成解析策略表;或,根据页面属性和 /或客户端属性自动生成解析策略表。
另外, 网页服务器 1200还可执行图 3或图 4所示的方法及实施例, 本发 明实施例在此不再赘述。
由上可见, 本实施例提高的网页服务器通过预先生成解析策略表, 在页 面处理时可以根据解析策略表确定页面解析的方式, 相较于现有技术中固定 的标签解析方式, 提高了页面的处理效率和灵活性。
图 13为本发明实施例十一提供的客户端设备的结构图, 如图 13所示, 该客户端设备 1300包括: 至少一个处理器 1301, 至少一个网络接口 1304或 者其他用户接口 1303,存储器 1305,至少一个通信总线 1302。通信总线 1302 用于实现这些组件之间的连接通信。该客户端设备 1300可选的包含用户接口 1303, 包括显示器 (例如, 触摸屏、 LCD、 CRT, 全息成像 (Holographic) 或者投影(Projector)等),键盘或者点击设备(例如,鼠标,轨迹球(trackball) , 触感板或者触摸屏等) 。
存储器 1305可以包括只读存储器和随机存取存储器, 并向处理器 1301 提供指令和数据。存储器 1305的一部分还可以包括非易失性随机存取存储器 (NVRAM) 。
在本发明实施例中, 网络接口 1304用于: 向所述网页服务器发送请求页 面属性和 /或客户端属性以使所述网页服务器生成解析策略表; 接收所述网页 服务器发送的超文本标记语言 HTML推测模板; 处理器 1301用于接收用户 请问访问返回的页面时, 根据所述 HTML推测模板解析所述返回的页面并结 合数据源提供的数据绑定生成向所述用户显示的所述页面。
可选地, 作为一个实施例, 所述网络接口 1304具体用于: 接收所述网页 服务器主动推送的所述 HTML推测模板; 或,
若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML 进一歩地, 所述网络接口 1304发送的页面属性包括页面配置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏览器类 型、 客户端的网络接入类型或客户端应用场景类型。
另外, 客户端设备 1300还可执行图 5的方法及实施例, 本发明实施例在 此不再赘述。
本实施例中提到的客户端设备可以是用户终端设备, 例如, 平板电脑、 智能终端等等。
由上可见, 上述实施例提供的客户端设备通过接收网页服务器发送的 HTML推送模板, 在客户端浏览器上实现对页面的预处理, 从而实现提高页 面的处理效率。
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分歩 骤可以通过程序指令相关的硬件 (例如与内存连接的处理器) 来完成。 前述 的程序可以存储于一计算机可读取存储介质中。 该程序在执行时, 执行包括 上述各方法实施例的歩骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者 光盘等各种可以存储程序代码的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种页面处理方法, 其特征在于, 包括: 根据接收客户端浏览器发送的页面属性和 /或客户端属性生成解析策略 表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式 包括在网页服务器端解析和 /或在客户端浏览器解析; 根据所述解析策略表确定用户请求访问页面的解析方式; 根据所述解析方式对用户请问访问的页面进行解析。
2、 根据权利要求 1所述的方法, 其特征在于, 若根据所述解析策略表确 定用户请求访问页面的解析方式为在客户端浏览器解析, 则所述根据所述解 析方式对用户请问访问的页面进行解析, 包括: 推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析所述推测的所述页面所需要使用的标签并存入缓存空间; 根据所述缓存空间中存入的预解析的标签生成超文本标记语言 HTML推 测模板并向客户端浏览器发送该 HTML推测模板, 以使所述客户端浏览器对 接收到所述用户请求访问返回的页面进行解析并结合数据源中的数据绑定生 成向所述用户显示的所述页面。
3、 根据权利要求 1所述的方法, 其特征在于, 若根据所述解析策略表确 定用户请求访问页面的解析方式为在服务器端解析, 则所述根据所述解析方 式对用户请问访问的页面进行解析, 包括:
推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析所述推测的所述页面所需要使用的标签并存入缓存空间; 根据所述缓存空间中存入的预解析的标签生成 HTML推测模板, 并根据 所述 HTML推测模板对接收到的所述用户请求访问返回的页面进行解析并结 合数据源中数据绑定生成向所述用户显示的所述页面;
向客户端浏览器发送向所述用户显示的所述页面。
4、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述 HTML推 测模板对接收到的所述用户请求访问返回的页面进行解析包括: 根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列; 根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列;
根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
5、 根据权利要求 2或 3所述的方法, 其特征在于, 所述预解析所述推测 的所述页面所需要使用的标签并存入缓存空间包括:
预解析所述推测的所述页面所需要使用的标签, 并将多个用户共同的标 签、 已部分解析的标签、 或根据所述解析策略表决策需要缓存的标签存入缓 存空间, 将用户特有的标签发送到客户端浏览器以存入到客户端浏览器的缓 存空间。
6、 根据权利要求 2或 3所述的方法, 其特征在于, 所述推测所述用户下 一歩请求访问的页面所需要使用的标签, 包括:
创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面; 接收所述用户请求访问的页面, 并结合所述页面数据库推测所述用户下 一歩请求访问的页面所需要使用的标签。
7、 根据权利要求 2所述的方法, 其特征在于, 所述向客户端浏览器发送 该 HTML推测模板, 包括: 将所述 HTML推测模板主动推送给客户端浏览器; 或, 接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述 HTML推测模板发送给所述客户端浏览器。
8、 根据权利要求 2-7任一项所述的方法, 其特征在于, 所述标签为带业 务语义的标签, 或带数据处理和显示逻辑的公共组件标签。
9、 根据权利要求 1所述的方法, 其特征在于, 所述页面属性包括页面配 置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属性包括客 户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。
10、 一种页面处理方法, 其特征在于, 包括: 向所述网页服务器发送请求页面属性和 /或客户端属性以使所述网页服 务器生成解析策略表; 接收所述网页服务器发送的超文本标记语言 HTML推测模板; 接收用户请问访问返回的页面时, 根据所述 HTML推测模板解析所述返 回的页面并结合数据源提供的数据绑定生成向所述用户显示的所述页面。
11、 根据权利要求 10所述的方法, 其特征在于, 所述接收所述网页服务 器发送的 HTML推测模板包括: 接收所述网页服务器主动推送的所述 HTML推测模板; 或, 若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML
12、 根据权利要求 10所述的方法, 其特征在于, 所述页面属性包括页面 配置偏好策略、 页面数据绑定位置或者页面相关参数, 所述客户端属性包括 客户端浏览器类型、 客户端的网络接入类型或客户端应用场景类型。
13、 一种网页服务器, 其特征在于, 包括: 生成模块, 用于根据接收客户端浏览器发送的页面属性和 /或客户端属性 生成解析策略表, 所述解析策略表用于确定用户请求访问页面的解析方式, 所述解析方式包括在网页服务器端解析和 /或在客户端浏览器解析; 确定模块,用于根据所述解析策略表确定用户请求访问页面的解析方式; 解析模块, 用于根据所述解析方式对用户请问访问的页面进行解析。
14、 根据权利要求 13所述的网页服务器, 其特征在于, 所述解析方式为 在客户端解析, 所述网页服务器还包括: 推测模块,用于推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析模块, 用于预解析所述推测的所述页面所需要使用的标签并存入 缓存空间; 发送模块, 用于根据所述缓存空间中存入的预解析的标签生成超文本标 记语言 HTML推测模板并向客户端浏览器发送该 HTML推测模板,以使所述 客户端浏览器对接收到所述用户请求访问返回的页面进行解析并结合数据源 中的数据绑定生成向所述用户显示的所述页面。
15、 根据权利要求 13所述的网页服务器, 其特征在于, 所述解析方式为 在服务器端解析, 所述网页服务器还包括: 推测模块,用于推测所述用户下一歩请求访问的页面所需要使用的标签; 预解析模块, 用于预解析所述推测的所述页面所需要使用的标签并存入 缓存空间; 生成显示页面模块, 用于根据所述缓存空间中存入的预解析的标签生成
HTML推测模板, 并根据所述 HTML推测模板对接收到的所述用户请求访问 返回的页面进行解析并结合数据源中数据绑定生成向所述用户显示的所述页 面; 发送模块, 用于向客户端浏览器发送向所述用户显示的所述页面。
16、 根据权利要求 15所述的网页服务器, 其特征在于, 所述解析模块具 体用于: 根据客户端浏览器发送的用户请求访问网页的消息生成请求响应标签队 列; 根据预解析所述推测的所述页面所需要使用的标签生成预解析标签队 列; 根据预设的优先级, 选择执行所述请求响应标签队列或所述预解析标签 队列。
17、 根据权利要求 14或 15所述的网页服务器, 其特征在于, 所述预解 析模块具体用于: 预解析所述推测的所述页面所需要使用的标签, 并将多个用户共同的标 签、 已部分解析的标签、 或根据所述解析策略表决策需要缓存的标签存入缓 存空间, 将用户特有的标签发送到客户端浏览器以存入到客户端浏览器的缓 存空间。
18、 根据权利要求 14或 15所述的网页服务器, 其特征在于, 所述推测 模块具体用于: 创建所述用户已请求访问的页面数据库, 所述页面数据库中存储有所述 用户历史访问过的页面; 接收所述用户请求访问的页面, 并结合所述页面数据库推测所述用户下 一歩请求访问的页面所需要使用的标签。
19、 根据权利要求 14所述的网页服务器, 其特征在于, 所述发送模块具 体用于:
将所述 HTML推测模板主动推送给客户端浏览器; 或,
接收所述客户端浏览器发送的请求获取 HTML推测模板消息后, 将所述
HTML推测模板发送给所述客户端浏览器。
20、 根据权利要求 14-19任一项所述的网页服务器, 其特征在于, 所述 预解析模块解析的标签为带业务语义的标签, 或带数据处理和显示逻辑的公 共组件标签。
21、 根据权利要求 13所述的网页服务器, 其特征在于, 所述生成模块接 收的页面属性包括页面配置偏好策略、页面数据绑定位置或者页面相关参数, 所述客户端属性包括客户端浏览器类型、 客户端的网络接入类型或客户端应 用场景类型。
22、 一种客户端浏览器, 其特征在于, 包括: 发送模块, 用于向所述网页服务器发送请求页面属性和 /或客户端属性以 使所述网页服务器生成解析策略表; 接收模块, 用于接收所述网页服务器发送的超文本标记语言 HTML推测 模板;
解析模块, 用于接收用户请问访问返回的页面时, 根据所述 HTML推测 模板解析所述返回的页面并结合数据源提供的数据绑定生成向所述用户显示 的所述页面。
23、 根据权利要求 22所述的客户端浏览器, 其特征在于, 所述接收模块 具体用于: 接收所述网页服务器主动推送的所述 HTML推测模板; 或, 若存在用户请求访问返回的网页需要解析时, 向所述网页服务器发送请 求获取 HTML推测模板消息后接收所述网页服务器请求响应的所述 HTML 推测模板。
24、 根据权利要求 22所述的客户端浏览器, 其特征在于, 所述发送模块 发送的页面属性包括页面配置偏好策略、 页面数据绑定位置或者页面相关参 数, 所述客户端属性包括客户端浏览器类型、 客户端的网络接入类型或客户 端应用场景类型。
25、 一种页面处理系统, 其特征在于, 包括网页服务器、 客户端和数据 源, 其中, 所述网页服务器包括如权利要求 13-21任一项所述的网页服务器, 客户端包括如权利要求 22-24任一项所述的客户端浏览器。
PCT/CN2014/081398 2013-12-31 2014-07-01 页面处理方法、装置及系统 WO2015100994A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14802582.8A EP2913767A4 (en) 2013-12-31 2014-07-01 PAGE PROCESSING, DEVICE AND SYSTEM
US14/587,754 US20150188981A1 (en) 2013-12-31 2014-12-31 Page processing method, apparatus, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310754226.6A CN103714172A (zh) 2013-12-31 2013-12-31 页面处理方法、装置及系统
CN201310754226.6 2013-12-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/587,754 Continuation US20150188981A1 (en) 2013-12-31 2014-12-31 Page processing method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2015100994A1 true WO2015100994A1 (zh) 2015-07-09

Family

ID=50407147

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081398 WO2015100994A1 (zh) 2013-12-31 2014-07-01 页面处理方法、装置及系统

Country Status (3)

Country Link
EP (1) EP2913767A4 (zh)
CN (1) CN103714172A (zh)
WO (1) WO2015100994A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148298A (zh) * 2020-09-11 2020-12-29 杭州安恒信息技术股份有限公司 Html数据解析方法、装置、计算机设备和存储介质
CN114741206A (zh) * 2022-06-09 2022-07-12 深圳华锐分布式技术股份有限公司 客户端数据回放处理方法、装置、设备及存储介质
CN115334161A (zh) * 2022-07-25 2022-11-11 盐城金堤科技有限公司 访问请求处理方法和装置、以及存储介质和电子设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714172A (zh) * 2013-12-31 2014-04-09 华为技术有限公司 页面处理方法、装置及系统
CN105279178B (zh) * 2014-07-04 2018-11-27 中国银联股份有限公司 基于关联资源匹配的网页构建方法
US10452748B2 (en) * 2016-06-20 2019-10-22 Microsoft Technology Licensing, Llc Deconstructing and rendering of web page into native application experience
CN106791936B (zh) * 2016-11-28 2020-11-06 广州华多网络科技有限公司 一种虚拟礼物的展示方法及装置
CN109510850B (zh) * 2017-09-14 2021-08-20 阿里巴巴(中国)有限公司 浏览请求的处理方法、装置及系统
CN108196834B (zh) * 2018-01-23 2021-09-14 国泰新点软件股份有限公司 网站的静态化处理系统
CN109408136B (zh) * 2018-09-12 2021-06-15 Oppo广东移动通信有限公司 信息处理方法、装置、存储介质及电子设备
CN109358936B (zh) * 2018-09-29 2021-09-10 Oppo广东移动通信有限公司 信息处理方法、装置、存储介质、电子设备及系统
CN109471632B (zh) * 2018-11-23 2019-11-19 成都四方伟业软件股份有限公司 一种页面动态配置方法、装置、服务器及用户终端
CN109726344A (zh) * 2018-11-26 2019-05-07 国云科技股份有限公司 一种服务器端对客户端识别后重定向到对应页面的方法
CN110083845B (zh) * 2019-04-25 2023-06-16 四川语言桥信息技术有限公司 网页翻译方法及系统
CN110347949A (zh) * 2019-06-20 2019-10-18 中信百信银行股份有限公司 网页加载方法、装置、电子设备及计算机可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014478A1 (en) * 2001-06-29 2003-01-16 Noble Alan C. Dynamically distributed client-server web browser
CN101110819A (zh) * 2007-08-03 2008-01-23 中国网络通信集团公司 一种加快浏览页面切换速度的方法
CN103714172A (zh) * 2013-12-31 2014-04-09 华为技术有限公司 页面处理方法、装置及系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504913B2 (en) * 2007-06-08 2013-08-06 Apple Inc. Client-side components
US20090259934A1 (en) * 2008-04-11 2009-10-15 Go Hazel Llc System and method for rendering dynamic web pages with automatic ajax capabilities
CN102065571A (zh) * 2010-12-30 2011-05-18 深圳市五巨科技有限公司 一种移动终端浏览器及其工作方法
CN102184231A (zh) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 获取页面资源的方法及装置
US20130080576A1 (en) * 2011-09-27 2013-03-28 Brett R. Taylor Historical browsing session management
CN102446222B (zh) * 2011-12-22 2014-12-10 华为技术有限公司 一种网页内容预加载方法、装置及系统
CN102722551B (zh) * 2012-05-26 2014-11-26 广州市动景计算机科技有限公司 一种浏览器内核智能切换方法及系统
CN103019683A (zh) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 一种动态配置页面视图的方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014478A1 (en) * 2001-06-29 2003-01-16 Noble Alan C. Dynamically distributed client-server web browser
CN101110819A (zh) * 2007-08-03 2008-01-23 中国网络通信集团公司 一种加快浏览页面切换速度的方法
CN103714172A (zh) * 2013-12-31 2014-04-09 华为技术有限公司 页面处理方法、装置及系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148298A (zh) * 2020-09-11 2020-12-29 杭州安恒信息技术股份有限公司 Html数据解析方法、装置、计算机设备和存储介质
CN114741206A (zh) * 2022-06-09 2022-07-12 深圳华锐分布式技术股份有限公司 客户端数据回放处理方法、装置、设备及存储介质
CN115334161A (zh) * 2022-07-25 2022-11-11 盐城金堤科技有限公司 访问请求处理方法和装置、以及存储介质和电子设备
CN115334161B (zh) * 2022-07-25 2023-06-27 盐城金堤科技有限公司 访问请求处理方法和装置、以及存储介质和电子设备

Also Published As

Publication number Publication date
CN103714172A (zh) 2014-04-09
EP2913767A4 (en) 2016-04-20
EP2913767A1 (en) 2015-09-02

Similar Documents

Publication Publication Date Title
WO2015100994A1 (zh) 页面处理方法、装置及系统
US9167054B2 (en) Remote browsing session management
US8577963B2 (en) Remote browsing session between client browser and network based browser
CA2840416C (en) Remote browsing session management
US9621406B2 (en) Remote browsing session management
US9723067B2 (en) Prioritized content transmission
US10506076B2 (en) Remote browsing session management with multiple content versions
US10331769B1 (en) Interaction based prioritized retrieval of embedded resources
US8914514B1 (en) Managing network based content
US9201634B2 (en) Method and system for controlling user experience with an application on a client device
US9585049B2 (en) Method for multipath scheduling based on a lookup table
Dasari et al. Impact of device performance on mobile internet qoe
US9491113B2 (en) Managing network connections for processing network resources
US20150188981A1 (en) Page processing method, apparatus, and system
US9785619B1 (en) Interaction based display of visual effects
JP5937207B2 (ja) 遠隔ブラウジングセッション管理
US20160150006A1 (en) Device data transfer via a wireless interface
US11176223B1 (en) Page rendering by an intermediary system that uses a truncated library
US11095748B1 (en) Network-based content rendering
US10878187B1 (en) Network-based content rendering
KR100925644B1 (ko) 오브젝트 전송 시스템 및 그 제어방법
US9178955B1 (en) Managing network based content

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2014802582

Country of ref document: EP

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

Ref document number: 14802582

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE