CN103383687A - Page processing method and device - Google Patents

Page processing method and device Download PDF

Info

Publication number
CN103383687A
CN103383687A CN2012101349665A CN201210134966A CN103383687A CN 103383687 A CN103383687 A CN 103383687A CN 2012101349665 A CN2012101349665 A CN 2012101349665A CN 201210134966 A CN201210134966 A CN 201210134966A CN 103383687 A CN103383687 A CN 103383687A
Authority
CN
China
Prior art keywords
module
request
content
pages
page
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.)
Granted
Application number
CN2012101349665A
Other languages
Chinese (zh)
Other versions
CN103383687B (en
Inventor
陈波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201210134966.5A priority Critical patent/CN103383687B/en
Publication of CN103383687A publication Critical patent/CN103383687A/en
Application granted granted Critical
Publication of CN103383687B publication Critical patent/CN103383687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a page processing method and device, and relates to the technical field of page processing. The method comprises the following steps: analyzing the parameter information in the page request, the parameter information comprises a target domain name and a first indication indicating that the page request belongs to a first module; the page request is sent by the user of the first module, the page content corresponding to the page request is provided by a third module; as for a request containing the first indication, the request is sent to a corresponding third module according to the target domain name of the request, and obtaining a responded page content from the third module; uploading the configuration information, which is corresponded to the first indication, in the configuration module, and conduct processing to the page content according to the configuration information; returning to the processed page content. According to the method provided by the invention, modification code of the first module is separated with the core business code of the third module, so as to enable the system to be easy to maintain and stable, and to respond to the modification request of other modules.

Description

A kind of page processing method and device
Technical field
The application relates to page processing technology field, particularly relates to a kind of page processing method and device.
Background technology
Along with popularizing of Internet enabled mobile terminal, most users has been brought into use mobile terminal Internet access, browsing page information.For this trend, each large website has been optimized WAP site (WAP, Wireless Application Protocol, the WAP (wireless application protocol) of oneself specially, a kind of application protocol standard that realizes that mobile phone is combined with the internet), done the WAP site of experiencing for mobile phone users.in practice, there is a kind of like this data processing method, the 3rd module of website A provides the web page contents of certain application, and the first module of website B needs the web page contents of this kind application that the 3rd module of website A provides, so that the content that the user of website B can provide by the 3rd module of website B access websites A, and for the user during from the web page contents of the 3rd module of website B access websites A, the relevant information (such as the logo at footer display web page B) that need to show website B in web page contents, the web page contents that is the 3rd module of website A need to be adjusted in conjunction with the relevant information of website B.
For above-mentioned situation, in prior art, for the relevant information of website B, need to carry out adaptability revision in the logical code that the original web page content is provided of website A, during the web page contents that provides with the first module accesses the 3rd module that ensures by website B, can show the relevant information of website B.
Due to above-mentioned alter mode, several shortcomings below prior art exists:
1, for distributed system, when namely existing a plurality of the 3rd modules that the web page contents of various application is provided, it is in a plurality of the 3rd modules that existing solution can cause the demand code of website B to be scattered in a plurality of application systems, the business logic codes coupling that web page contents is provided that need to be original with each the 3rd module, this has increased maintenance cost.
The website of the web page contents that 2, provides along with needs the 3rd module increases and the variation of demand, such as the web page contents that also has website C, D also to need certain the 3rd module to provide, or the B information that need to revise in website changes, and need to continue to modify according to demand in the current logical code of the 3rd module.The service code of like this, directly revising in the service logic of the 3rd module will get more and more.And if the 3rd module is when providing the core business logic of original web page content to change and to upgrade, above-mentioned logic of modifying according to the demand of the 3rd server side also needs is synchronously upgraded.The increase of core business logic scale and the increasing of described modification logic of parent page content are provided when the 3rd module, this logic of revising according to demand can become one of factor that affects the 3rd business module business logic systems gradually, increase the risk of system stability, and increase upgrade cost.
3, the modification demand of website B or other parties in request different from the 3rd module is normally urgent, scattered, random, when receiving the modification demand of other websites, if revising the logic of the 3rd modular service logic issues again, the modification time cycle is long, increase time cost, thereby affect the efficiency for issuing of the 3rd modular service logic.
Summary of the invention
The application is to provide a kind of page processing method and device, can will revise in each the 3rd module provides the demand code of the core business logic of parent page content to peel off out from each the 3rd module, under the prerequisite of service application not being modified, difference demand for other modules of side under different from the 3rd module, generate fast the page that adapts with other module demands, the response effect of Modify rapidly is provided, and has guaranteed the stability of the 3rd original flogic system of module.
In order to address the above problem, the application discloses a kind of page processing method, comprising:
Resolve the parameter information in page request, described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence;
For the request that comprises the first sign, it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module;
The configuration information of corresponding described the first sign in the configuration file of loading configuration module, and according to described configuration information, described content of pages is processed;
Return to the content of pages after described processing.
Preferably, load as follows the configuration information of corresponding described the first sign in the configuration file of configuration module, and according to described configuration information, described content of pages processed:
Steps A 1, the configuration information of corresponding described the first sign in the configuration file of loading configuration module;
Steps A 2 is searched the node information corresponding with each node information in described configuration information from described content of pages;
Steps A 3 is modified to the node information in described content of pages according to the description to each node information in configuration information.
Preferably, search as follows the node information corresponding with each node information in described configuration information from described content of pages:
According to tag name and the character string corresponding to attribute information of node to be modified in configuration information, mate by the character string that described character string is corresponding with content of pages, search node information described in content of pages;
Or, according to tag name and the attribute information of node information to be modified in configuration information, by traveling through the dom tree of described content of pages, search node information described in content of pages.
Preferably, described each step is carried out in proxy module.
Preferably, described content of pages processed also comprised:
Steps A 4 replaces with agent address with the former Object linking address in content of pages.
Preferably, resolve the page request parameter information by following steps:
Step B1, analysis request URL obtains the domain name in request;
Step B2, whether verifying domain name is legal; If illegal, change step B3 over to, if legal, change B4 over to;
Step B3 refuses this request of access;
Step B4 extracts user side parameter information in request.
Preferably, described user side parameter information comprises the first sign, the IP of user side, and the type of user side.
Preferably, also comprise:
The URL treatment step reduces the link length of URL, and the statistical parameter that comprises in URL is added in each URL of back page content.
Preferably, described request for comprising the first sign, it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and the step of obtaining the content of pages of response from described the 3rd module comprises:
Step D1 sets up simulation HTTP request according to the identity letter of requesting party in request;
Step D2 carries out described simulation HTTP request, obtains the content of pages of response.
Preferably, carry out described simulation HTTP request, when obtaining the content of pages of response:
When the http response code is normal, directly obtain content of pages and the buffer memory of response;
When the http response code is that described page request need to be reorientated, allow first server access agent address again.
Accordingly, disclosed herein as well is a kind of page treating apparatus, comprising:
Module is accepted in request, is used for resolving the parameter information of page request, and described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence;
The request forwarding module is used for for the request that comprises the first sign, and it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module;
Content processing module is used for the configuration information of corresponding described first sign of configuration file of loading configuration module, and according to described configuration information, described content of pages is processed;
The page returns to module, is used for returning the content of pages after described processing.
Compared with prior art, the application comprises following advantage:
(1) Noninvasive.The application is according to configuring corresponding configuration information for different demands in the configuration module beyond the core logic that the parent page content is provided in the 3rd module, then revise content of pages beyond described core logic according to configuration information, need not revise each the 3rd module provides the core logic code of parent page content, so, revising can not affect the core logic that the 3rd module provides the parent page content, and the code of modification can not be coupled with core logic.
(2) ease for maintenance and stability.The application is configured each species diversity demand by configuration module, then modifies based on configuration, also need not to change core logic, all be convenient to safeguard for demand code and core logic code, and, because the core logic code does not change, so systematic comparison is stable; And for different demand the time, can only modify to web page contents based on the configuration information in configuration module, need not to pay close attention to the demand code when the core logic change of the 3rd module or upgrading, reduce upgrade cost.
(3) mode of dynamically issuing.The application can increase or revise configuration information at any time in configuration module, then content of pages is revised by system beyond described core logic according to configuration information, the logic that need not revise in a plurality of the 3rd modules is issued again, can respond fast the demand of other modules.
Description of drawings
Fig. 1 is the schematic flow sheet of a kind of page processing method of the application;
Fig. 2 is the schematic flow sheet of the preferred a kind of page treating apparatus of the application;
Fig. 3 is the structural representation of a kind of page processing method of the application;
Fig. 4 is the structural representation of the preferred a kind of page processing method of the application;
Fig. 5 is the structural representation of the preferred a kind of page processing method of the application.
Embodiment
For above-mentioned purpose, the feature and advantage that make the application can become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
One of core concept of the application is, based on the principle of reverse proxy, for the 3rd module that the parent page content is provided, the application is independent with it.The first module of the content of pages that provides for needs the 3rd module, the configuration information of configuration the first module demand in configuration module, then the web-page requests of being initiated for the user side of the first module by the second module of the application, obtain web page contents from the 3rd module, process according to the configuration information of the first module, then result is returned to user side.So, the core logic of parent page content is provided for the 3rd module, because it is used for providing the original web page content, revise logic for the demand of the first module demand and carry out in the second module of the application, need not to revise the described core logic in the 3rd module.Therefore, demand is revised logical code and the core logic code does not influence each other each other, carry out separately logical code maintenance separately, convenient and easy, the flogic system of the 3rd module is stable, and for the demand of the first module, issue after all logics of complete modification the 3rd module again, thereby can respond fast the cooperation demand.
With reference to Fig. 1, the schematic flow sheet that it shows a kind of page processing method of the application comprises:
Request receiving step 110 is resolved the parameter information in page request, and described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence;
In practice, usually can cooperate between website, to throw in the related pages content.Such as, the second website B and the first website A cooperate, and the user of access the first website A can or show the web page contents that the 3rd module corresponding to the second website B provides by corresponding the first module acquisition of the first website A.Usually in these cases, the relevant information of first server place side is provided to comprise in the content of pages of the 3rd module that provides the content of pages that the first website A corresponding to the first module needs the 3rd module of the second website B to provide; The additional informations such as LOGO picture that need to adopt in the footer of the page that the 3rd module provides and header the first website A such as the first website A.In addition, a plurality of the first modules may be arranged in practice, a plurality of websites and the 3rd module that web page contents is provided are namely arranged, and the processing demands of each the first module be usually all different, as the content of concrete loading, the mode of loading etc.Also may there be in addition a plurality of the 3rd modules.
For the first module, there is the user side of access the first module in it.Such as for website A, the addressable website A of user side, if be provided with the link of the web page contents that corresponding the 3rd module provides in the A of website, and the user has clicked this link, this web-page requests of Client-initiated namely is sent to the second module of the application.Generally, the first module of website A is that the link with the 3rd module web page contents hangs over the website, when clicking, the user directly jumps to the second module, the first module of website A also can be processed carry on the A of website with the link of corresponding the 3rd module web page contents again, when the user clicked, the first module was first processed link and is sent to the second module again.The page request that the second module receives comprises the first sign, target domain name and the user side parameter information that the first module is corresponding.The URL (Uniform/Universal Resource Locator, URL(uniform resource locator)) of the page request that receives such as the second module:
Http:// proxy.m.taobao.com/gate/sina/p.do p_url=wap.taobao.com%3Fttid%3D1, wherein, what first server was corresponding first is designated sina, the aiming field of corresponding the 3rd module wap.taobao.com by name in request.In addition, also comprise the user side parameter information of accessing first server in described page request, such as user side IP, the type of user side etc.
Preferably, the page request that the interface that provides by first server for the user side that receives sends is acted on behalf of the described page request of meeting pre-service, and checks the validity of described page request.
Preferably, by the described page request of following steps analyzing and processing:
Step B1, analysis request URL obtains the domain name in request.
Such as, for aforementioned request URL:
http://proxy.m.taobao.com/gate/sina/p.do p_url=wap.taobao.com%3Fttid%3 D1
According to the parameter value after p_url, carry out the url decoding, obtain the domain name wap.taobao.com of request.
Step B2, whether verifying domain name is legal; If illegal, change step B3 over to, if legal, change B4 over to.
According to specific strategy, the domain name of obtaining is verified in practice, what guarantee agent's access is legal website, avoids the case problems such as fishing.Such as if this wap website is wap.taobao.com, and the domain name in request is wap.taobao1.com, and wap.taobao1.com is a fishing website, and the true domain name according to our station can judge that wap.taobao1.com is illegal domain name, i.e. invalidation request.
B3 refuses this request of access.
If the address of request is not a legal address, request is accepted module and is just directly refused to process this request of access.
B4 extracts user side parameter information in request.
This step encapsulation user side parameter information, described parameter information comprises the first sign, the IP of user side, and the type of user side.As information such as the ip of first sign sina, user side, the user-agent of user side (such as the type (user-agent) of user side is iphone user).Above-mentioned information can be used by subsequent module.
In addition, also comprise the URL treatment step, reduce the link length of URL, and the statistical parameter that comprises in URL is added in each URL of back page content.
Reduce link length such as the url with http://wap.taobao.com ttid=1 replaces with wap.taobao.com ttid=1, reduce customer flow.The statistical parameter such as the ttid that comprise in URL with request add in all URL of back page, are used for data statistics.
In practice, the second module of the application is generally proxy module, may reside in server corresponding to each the 3rd module.Also can be set to separately an acting server, the 3rd module of various web page contents is provided by acting server reverse proxy rear end.
Request forwards step 120, and for the request that comprises the first sign, it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module.
In practice, this step can resubmit this request and correlation parameter information and corresponding the 3rd module of domain name with http protocol according to agency's request, accepts simultaneously long-range response contents.Namely at first by whether comprising in request the first sign judges whether this request is sent by the first server end, if according to the order domain name in request, this request is forwarded to corresponding the 3rd module again.In reality, the content of pages buffer memory that the 3rd module is returned is again in the second module.
Preferably, as follows described page request is forwarded to the 3rd module, and obtains the content of pages of response from the 3rd module:
Step D1 sets up simulation HTTP request according to the identity letter of requesting party in request.URL request with aforementioned acquisition:
" http://proxy.m.taobao.com/gate/sina/p.do p_url=wap.taobao.com%3Fttid%3D1 " is example, and http protocol resubmits target the 3rd module as follows in practice:
Step m1, the request to create object.
Be according to domain name wap.taobao.com, create the GetMethod object of the correspondence of a httpClient, be used for package request.
Step m2, the parametric t tid=1 with in access URL submits to the Method object, and simulation HTTP request, increases the information such as use-agent information, requesting party ip, for Reality simulation HTTP access application system.
Step D2 carries out described simulation HTTP request, obtains the content of pages of response.
Obtain simulating the HTTP request by abovementioned steps after, can following steps carry out:
Step m3 carries out request.
By the request of HttpClient component call.Obtain the content of response.
Step m4, the processing response content.
When wherein, obtaining the content of pages of response:
When http response is normal, such as the code that responds is 200, directly obtain content of pages and the buffer memory of response.Content in this buffer memory is used for follow-up processing.
When http response is that described page request need to be reorientated, such as the code of response is 302, allow user side access agent address again.If namely response code is 302, explanation is need to be redirected, and needs the overwrite request address, namely allows the new agent address of browser access of user side.
Said process can use httpClient (can be used to provide the client programming kit of support http protocol efficient, up-to-date, feature richness) assembly to carry out Forward-reques and obtain the content of pages of response, can use additive method carry out Forward-reques and obtain the content of pages of response, the application is not limited this yet.The process of simulation http request also can be used additive method, and the application is not limited this.
Contents processing step 130, the configuration information of corresponding described the first sign in the configuration file of loading configuration module, and according to described configuration information, described content of pages is processed.
In practice, the first module of other of the web page contents that provides for needs the 3rd module, if described the first module requires to revise the content of pages that returns, can will require so the configuration information revised pre-configured complete in configuration module, wherein configuration information with the first module corresponding first the sign as loading environment, load corresponding configuration information according to this first sign again when the agency needs to use, then utilize configuration information that the content of pages of aforementioned acquisition is processed.Wherein configuration information place configuration file can be in the agency.
In practice, but the configuration module individualism, also can exist with acting server in, concrete condition the application is not limited it.
This step mainly is responsible for content of pages is processed, and has comprised the processing modes such as deletion, interpolation and renewal content of pages.Generally xhtml and/or html document are processed in reality.
Preferably, load as follows the configuration information of corresponding described the first sign in the configuration file of configuration module, and according to described configuration information, described content of pages processed:
Steps A 1, the configuration information of corresponding described the first sign in the configuration file of loading configuration module.
Described the first sign indicates this page request by user's initiation of corresponding the first module, and the configuration information of described the first sign of described correspondence comprises the modification information to content of pages of the first module.
Such as first in aforementioned request URL is designated sina, the first sign configuration information corresponding to sina in the configuration file of system loads configuration module.Then utilize described configuration information that the response page content in the buffer memory of front is processed.Described configuration file may comprise the configuration information of a plurality of websites, corresponding configuration information in the first different sign loading configuration file that the application can be corresponding according to described different server.
Wherein, configuration information can utilize a series of processing rules of XML (Extensible Markup Language, extend markup language) definition to describe, and can conveniently revise, and is convenient to upgrade at any time the demand of first server end place website.
Steps A 2 is searched the node information corresponding with each node information in described configuration information from described content of pages.
Loaded in request after corresponding third-party configuration information in steps A 1, the node information that can revise according to needs in configuration information find node information corresponding with this node information in configuration information in described content of pages.
Preferably, search as follows the node information corresponding with each node information in described configuration information from described content of pages:
Step C1 according to tag name and the character string corresponding to attribute information of node to be modified in configuration information, mates by the character string that described character string is corresponding with content of pages, searches node information described in content of pages.
For the html element content of the page, this step is to resolve the html element content by the mode of character string, searches node according to the attribute of tag name (tag) and this label (such as the class value, or id value etc.) Rapid matching.
In practice, the property value that can be first corresponding according to node information in configuration information tag name is corresponding and the character string of html element content are mated, then after finding matching result, according to the scope of the whole node information of structural confirmation of tag label.
Such as the coupling element of node of coupling is:
<nodeMatcher name=" footer " type=" TAG "〉</nodeMatcher 〉, the html element tags of a footer by name of its expression coupling.
The lookup method of this step is quick, saves time.
Or step C2 according to tag name and the attribute information of node information to be modified in configuration information, by traveling through the dom tree of described content of pages, searches node information described in content of pages.
In order to find the corresponding node information of node information to be modified in content of pages and configuration information, the application also can adopt the form of dom tree corresponding to traversal full page content.A kind of lookup method relatively, speed is relatively slow.
In addition, the application is not limited for the method that finds the corresponding node of node to be modified in content of pages and configuration information, and any method that can find corresponding node information in described content of pages all can.
Steps A 3 is modified to described node information according to the description to each node information in configuration information.
After node information to be modified, according to the description to each node information in configuration information, described node information is modified when find content of pages in steps A 2 in.Revise action and comprise replacement (replace), insertion (insert), deletion (delete) etc.Such as correspondence is replaced, its execution action is " action=replace ".
Wherein, when " action=replace " or " action=insert ", be the content that configures in configuration information with the content modification of node information described in content of pages.
In practice, for each node information in configuration information, can search one by one and revise by the order of each node information, after namely searching and revised a node information, then carrying out the modification process of searching of next node information.
In addition, in step C1 and C2 line character string matched and searched content of pages in the process of node information, may match a plurality of node information of diverse location, at this moment, can configure in configuration information in advance the node information of which position is modified, such as the node information of only revising top margin and page footing, perhaps all node information of finding are all modified.
In reality, search and revise these processing procedures and can complete by the Handler interface that realization defines, described Handler interface is the core classes for the treatment of message content, and its class can be as follows:
Ihandler
+getName{}:String
+invoke{ProxyContext ProxyContext}:void
ReplaceHandler, DeleteHandler and InsertHander assembly have been realized in system, the Action that defines in the alteration ruler more than correspondence.Also can require to expand according to concrete modification at actual this Handler interface.
Also comprise during further, for each step of execution in the agency:
Steps A 4 replaces with agent address with the former Object linking address in content of pages.
In practice, the second module that the application adopts is the agency, such as the wap agency.Therefore can act on behalf of by wap and carry out above-mentioned each step.
All by the wap agent processes, need to be the Object linking address in former request for the follow-up request that guarantees user side with all effective url in the page, replace with agent address.Also access agent when guaranteeing that the user clicks in displayed page other relevant to aiming field name links.Such as the link that has comprised http://m.taobao.com/index.htm in the page, the requirement according to configuration information replaces with it :/proxy/ifeng/p.do p_url=m.taobao.com/index.htm.
With reference to Fig. 2, it is the comparison example figure before and after a content of pages is replaced.Wherein, at first carry out the Matcher operation, Matcher is for matching the operation of foot (page footing) node by the matching principle in the aforementioned processing rule, namely regional shown in thick frame 81 in Fig. 2; Carry out Action operation again, original page footing node content is replaced with the page footing content (Content) that the first module (partner that namely needs the web page contents that the 3rd module provides) requires, obtaining is zone shown in thick frame 82 in Fig. 2.In this example, the first module corresponds to the phoenix net.
The page returns to step 140, returns to the content of pages after described processing.
After by above-mentioned steps, content of pages being disposed, with the content of pages after described processing be back to user side.When returning, can directly the described content of pages that returns be back to user side by the agency; Also can first be sent to first server by the agency, then by being back to user side by first server.Concrete echo plex mode the application is not limited it.
Need to prove, for aforesaid each embodiment of the method, for simple description, therefore it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
With reference to Fig. 3, the structural representation that it shows a kind of page processing method of the application comprises:
Module 310 is accepted in request, is used for resolving the parameter information of page request, and described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence.
Request forwarding module 320 is used for the request that comprises the first sign, and it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module.
Content processing module 330 is used for the configuration information of corresponding described first sign of configuration file of loading configuration module, and according to described configuration information, described content of pages is processed.
The page returns to module 340, is used for returning the content of pages after described processing.
in practice, above-mentioned module generally comprises in the second module, described the second module is generally proxy module, in described proxy module or acting server packet scheduling center module also, with reference to Fig. 4, the dispatching center carries out system and controls, the dispatching center carries out 404/500 processing and Cache (cache memory) management etc., dispatching center's module is after the request that gets user side, according to configuration, Handler is combined into a calling logic flow process, call aforesaid request and accept module, request forwarding module and content processing module, the page with the agency returns to user side at last, complete the proxy requests processing procedure one time.Wherein, the page returns to module and is generally positioned in the dispatching center.The proxy call center also provides the infrastructure service that request is processed simultaneously, as processing such as mistakes; Transparent buffer memory serves to improve access efficiency.Wherein, forwarding module is forwarded in corresponding the 3rd module end according to using.
With reference to Fig. 5, it shows a kind of preferred a kind of page processing system of the application.
The application can comprise at least one first module, described the first module is generally first server, can distinguish corresponding different websites, and the application also can comprise at least one the 3rd module, described the 3rd module is application server, and each application server provides different web page contents.The user side of first server can obtain any one content of pages that provides in described at least one the 3rd module by acting server.The above-mentioned page request that each first server sends is all received by the acting server in figure, then its this request processing forward of aiming field star to corresponding the 3rd module that sends in request according to first server is obtained the corresponding web page contents of described web-page requests, then load the first configuration information corresponding to sign in described page request in acting server, described web page contents is processed, by acting server, the web page contents that is disposed is returned until user side receives described web-page requests more at last.
For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.
The application can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can put into practice the application in distributed computing environment, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
At last, also need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operational zone, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or operation.
Those of ordinary skills should further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or combination both, for the interchangeability of hardware and software clearly is described, composition and the step of each example described in general manner according to function in the above description.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.The professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought the scope that exceeds the application.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can use the software module of hardware, processor execution, and perhaps both combination is implemented.Software module can be placed in the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above a kind of page processing method and the device that the application is provided, be described in detail, used specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment just is used for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (11)

1. a page processing method, is characterized in that, comprising:
Resolve the parameter information in page request, described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence;
For the request that comprises the first sign, it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module;
The configuration information of corresponding described the first sign in the configuration file of loading configuration module, and according to described configuration information, described content of pages is processed;
Return to the content of pages after described processing.
2. method according to claim 1, is characterized in that, loads as follows the configuration information of corresponding described the first sign in the configuration file of configuration module, and according to described configuration information, described content of pages is processed:
Steps A 1, the configuration information of corresponding described the first sign in the configuration file of loading configuration module;
Steps A 2 is searched the node information corresponding with each node information in described configuration information from described content of pages;
Steps A 3 is modified to the node information in described content of pages according to the description to each node information in configuration information.
3. method according to claim 2, is characterized in that, searches as follows the node information corresponding with each node information in described configuration information from described content of pages:
According to tag name and the character string corresponding to attribute information of node to be modified in configuration information, mate by the character string that described character string is corresponding with content of pages, search node information described in content of pages;
Or, according to tag name and the attribute information of node information to be modified in configuration information, by traveling through the dom tree of described content of pages, search node information described in content of pages.
4. method according to claim 1 is characterized in that:
Described each step is carried out in proxy module.
5. method according to claim 4, is characterized in that, described content of pages processed also comprise:
Steps A 4 replaces with agent address with the former Object linking address in content of pages.
6. method according to claim 1, is characterized in that, resolves the page request parameter information by following steps:
Step B1, analysis request URL obtains the domain name in request;
Step B2, whether verifying domain name is legal; If illegal, change step B3 over to, if legal, change B4 over to;
Step B3 refuses this request of access;
Step B4 extracts user side parameter information in request.
7. method according to claim 6 is characterized in that:
Described user side parameter information comprises the first sign, the IP of user side, and the type of user side.
8. according to claim 6 or 7 described methods, is characterized in that, also comprises:
The URL treatment step reduces the link length of URL, and the statistical parameter that comprises in URL is added in each URL of back page content.
9. according to claim 5 or 6 described methods, it is characterized in that, described request for comprising the first sign, it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and the step of obtaining the content of pages of response from described the 3rd module comprises:
Step D1 sets up simulation HTTP request according to the identity letter of requesting party in request;
Step D2 carries out described simulation HTTP request, obtains the content of pages of response.
10. according to claim 1 or 9 described methods, is characterized in that, carries out described simulation HTTP request, when obtaining the content of pages of response:
When the http response code is normal, directly obtain content of pages and the buffer memory of response;
When the http response code is that described page request need to be reorientated, allow first server access agent address again.
11. a page treating apparatus is characterized in that, comprising:
Module is accepted in request, is used for resolving the parameter information of page request, and described parameter information comprises the target domain name and indicates the first sign that described page request belongs to the first module; Described page request is initiated by the user side of the first module, and content of pages corresponding to described page request provided by the 3rd module of correspondence;
The request forwarding module is used for for the request that comprises the first sign, and it is forwarded to corresponding the 3rd module according to the aiming field star in this request, and obtains the content of pages of response from described the 3rd module;
Content processing module is used for the configuration information of corresponding described first sign of configuration file of loading configuration module, and according to described configuration information, described content of pages is processed;
The page returns to module, is used for returning the content of pages after described processing.
CN201210134966.5A 2012-05-02 2012-05-02 A kind of page processing method and device Active CN103383687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210134966.5A CN103383687B (en) 2012-05-02 2012-05-02 A kind of page processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210134966.5A CN103383687B (en) 2012-05-02 2012-05-02 A kind of page processing method and device

Publications (2)

Publication Number Publication Date
CN103383687A true CN103383687A (en) 2013-11-06
CN103383687B CN103383687B (en) 2017-03-01

Family

ID=49491477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210134966.5A Active CN103383687B (en) 2012-05-02 2012-05-02 A kind of page processing method and device

Country Status (1)

Country Link
CN (1) CN103383687B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331217A (en) * 2014-10-24 2015-02-04 中国建设银行股份有限公司 Interface display method and device
CN104468785A (en) * 2014-12-08 2015-03-25 上海斐讯数据通信技术有限公司 Electronic device, server device, and data request submitting method and processing method
CN104598227A (en) * 2014-12-31 2015-05-06 国家电网公司 Method for modifying content of system presentation page
WO2015085456A1 (en) * 2013-12-09 2015-06-18 北京新媒传信科技有限公司 Log extraction method under server cluster and server cluster
CN104954363A (en) * 2015-04-30 2015-09-30 北京嘀嘀无限科技发展有限公司 Method and device for generating interface document
CN105100242A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Data processing method and system
CN105354269A (en) * 2015-10-27 2016-02-24 中通服公众信息产业股份有限公司 Reverse proxy and content filtering based Web application language localization method and system
CN106156172A (en) * 2015-04-16 2016-11-23 阿里巴巴集团控股有限公司 Embed the expired treating method and apparatus of session of the page
CN106856434A (en) * 2015-12-08 2017-06-16 阿里巴巴集团控股有限公司 The method and apparatus of access request conversion
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN108363749A (en) * 2018-01-29 2018-08-03 上海星佑网络科技有限公司 Method and apparatus for information processing
CN108600157A (en) * 2018-03-08 2018-09-28 阿里巴巴集团控股有限公司 page loading method and device
CN109960939A (en) * 2017-12-25 2019-07-02 航天信息股份有限公司 Long-range HTML5 page loading method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0810520B1 (en) * 1996-05-28 1998-12-23 Sun Microsystems, Inc. Dynamic linkable labels in a network browser page
CN1289093A (en) * 1999-09-20 2001-03-28 国际商业机器公司 Method and system for dynamically increasiing new functions for www. page
CN101902485A (en) * 2009-05-27 2010-12-01 北京启明星辰信息技术股份有限公司 Rewriting method of reversal Web agent link
CN101997854A (en) * 2009-08-31 2011-03-30 阿里巴巴集团控股有限公司 Processing system and method for providing data service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0810520B1 (en) * 1996-05-28 1998-12-23 Sun Microsystems, Inc. Dynamic linkable labels in a network browser page
CN1289093A (en) * 1999-09-20 2001-03-28 国际商业机器公司 Method and system for dynamically increasiing new functions for www. page
CN101902485A (en) * 2009-05-27 2010-12-01 北京启明星辰信息技术股份有限公司 Rewriting method of reversal Web agent link
CN101997854A (en) * 2009-08-31 2011-03-30 阿里巴巴集团控股有限公司 Processing system and method for providing data service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王虎,方建清,董永刚: "使用反向代理技术实现B_S系统应用整合", 《信息与电脑(理论版)》, 15 September 2011 (2011-09-15) *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015085456A1 (en) * 2013-12-09 2015-06-18 北京新媒传信科技有限公司 Log extraction method under server cluster and server cluster
CN104331217A (en) * 2014-10-24 2015-02-04 中国建设银行股份有限公司 Interface display method and device
CN104331217B (en) * 2014-10-24 2018-12-14 中国建设银行股份有限公司 A kind of method for showing interface and device
CN104468785A (en) * 2014-12-08 2015-03-25 上海斐讯数据通信技术有限公司 Electronic device, server device, and data request submitting method and processing method
CN104598227A (en) * 2014-12-31 2015-05-06 国家电网公司 Method for modifying content of system presentation page
CN106156172A (en) * 2015-04-16 2016-11-23 阿里巴巴集团控股有限公司 Embed the expired treating method and apparatus of session of the page
CN104954363B (en) * 2015-04-30 2018-05-22 北京嘀嘀无限科技发展有限公司 For generating the method and apparatus of interface document
CN104954363A (en) * 2015-04-30 2015-09-30 北京嘀嘀无限科技发展有限公司 Method and device for generating interface document
CN105100242A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Data processing method and system
CN105100242B (en) * 2015-07-24 2019-02-26 北京奇虎科技有限公司 A kind of data processing method and system
CN105354269A (en) * 2015-10-27 2016-02-24 中通服公众信息产业股份有限公司 Reverse proxy and content filtering based Web application language localization method and system
CN105354269B (en) * 2015-10-27 2019-07-12 中通服公众信息产业股份有限公司 Web applicational language Localization methodologies and system based on reverse proxy and information filtering
CN106856434A (en) * 2015-12-08 2017-06-16 阿里巴巴集团控股有限公司 The method and apparatus of access request conversion
CN106856434B (en) * 2015-12-08 2020-06-30 阿里巴巴集团控股有限公司 Method and device for converting access request
US11647009B2 (en) 2015-12-08 2023-05-09 Alibaba Group Holding Limited Access request conversion method and apparatus
CN109960939A (en) * 2017-12-25 2019-07-02 航天信息股份有限公司 Long-range HTML5 page loading method and system
CN109960939B (en) * 2017-12-25 2021-02-05 航天信息股份有限公司 Remote HTML5 page loading method and system
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN108363749A (en) * 2018-01-29 2018-08-03 上海星佑网络科技有限公司 Method and apparatus for information processing
CN108363749B (en) * 2018-01-29 2019-03-01 上海星佑网络科技有限公司 Method and apparatus for information processing
CN108600157A (en) * 2018-03-08 2018-09-28 阿里巴巴集团控股有限公司 page loading method and device

Also Published As

Publication number Publication date
CN103383687B (en) 2017-03-01

Similar Documents

Publication Publication Date Title
CN103383687A (en) Page processing method and device
US10817663B2 (en) Dynamic native content insertion
CN106575298B (en) Rapid presentation of web sites containing dynamic content and stale content
US8037084B2 (en) Method and system for transcoding web pages by limiting selection through direction
CN100353733C (en) RSS message interactive processing method based on XML file
US8560731B2 (en) Subscription-based dynamic content optimization
CN101997927B (en) A kind of method and system of WEB platform data caching
US20150058407A1 (en) Systems, methods, and apparatuses for implementing the simultaneous display of multiple browser client cursors at each browser client common to a shared browsing session
KR20190039230A (en) Method and system for server-side rendering of native content for presentations
US8966446B1 (en) Systems and methods of live experimentation on content provided by a web site
AU2016202333B2 (en) Historical browsing session management
CN101231636A (en) Convenient information search method, system and an input method system
CN109683998A (en) Internationalize implementation method, device and system
US10402464B2 (en) Methods and apparatuses for opening a webpage, invoking a client, and creating a light application
CN103744845A (en) Method and system for WEB platform data caching
CN110808868A (en) Test data acquisition method and device, computer equipment and storage medium
CN109829121B (en) Method and device for reporting click behavior data
CN108572817A (en) The method, apparatus and medium of dynamic resource allocation based on business model
CN114756228A (en) Page processing method, device, equipment and storage medium
CN112947900A (en) Web application development method and device, server and development terminal
CN106959975A (en) A kind of transcoding caching resource processing method, device and equipment
CN105338091A (en) High-transmission-efficiency personalized information interface display method and apparatus
CN105808628A (en) Webpage transcoding method, apparatus and system
CN113656737A (en) Webpage content display method and device, electronic equipment and storage medium
CN107807927B (en) Page analysis method, device, client equipment and system based on issuing rule

Legal Events

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

Ref country code: HK

Ref legal event code: DE

Ref document number: 1187122

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1187122

Country of ref document: HK