Summary of the invention
The system and method that the object of the present invention is to provide a kind of http of customization to act on behalf of content can be reset to customization http the returned content of URL of request and act on behalf of content, one or one group of URL to be replaced are replaced into target URL, and mode that can the be regular configuration information that need to upgrade to server lookup, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
For addressing the above problem, the invention provides the system that a customization http acts on behalf of content, comprising:
Router, for the URL of the request of obtaining;
Be built in the proxy server on described router, for store customized http, act on behalf of the configuration information of content, and act on behalf of content according to URL and the described configuration information generating custom http of request.
Further, in said system, described configuration information comprises:
URL to be replaced and/or URL regular expression to be replaced;
Target URL, when the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, replaces with target URL by the URL of described request;
The customization http corresponding with described target URL acts on behalf of content.
Further, in said system, also comprise a configuration information server, for store customized http, act on behalf of the configuration information of content, and the request of Receiving Agent server update configuration information, according to the request of described Reconfigurations information, to described proxy server, send the feedback of Reconfigurations information.
Further, in said system, described proxy server is also for sending the request of Reconfigurations information to described configuration information server.
Further, in said system, described proxy server sends the request of Reconfigurations information to described configuration information server according to Fixed Time Interval.
According to another side of the present invention, provide a kind of customization http that adopts above-mentioned customization http to act on behalf of the system of content to act on behalf of the method for content, comprising:
The proxy server stores being built on described router customizes the configuration information that http acts on behalf of content;
Router obtains the URL of request;
Described proxy server is acted on behalf of content according to URL and the described configuration information generating custom http of request.
Further, in said method, described configuration information comprises that URL to be replaced and/or URL regular expression to be replaced, target URL and the customization http corresponding with described target URL act on behalf of content.
Further, in said method, described proxy server comprises according to the URL of request and the described configuration information generating custom http step of acting on behalf of content:
When the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, the URL of described request is replaced with to target URL;
According to described target URL, generate corresponding customization http and act on behalf of content.
Further, in said method, be built in the step that proxy server stores on described router customization http acts on behalf of the configuration information of content and comprise:
One configuration information server store customized http acts on behalf of the configuration information of content;
Described proxy server sends the request of Reconfigurations information to described configuration information server;
Described configuration information server sends the feedback of Reconfigurations information to described proxy server according to the request of described Reconfigurations information.
Further, in said method, described proxy server sends the request of Reconfigurations information to described configuration information server according to Fixed Time Interval.
Compared with prior art, the present invention obtains the URL of request by router, the proxy server being built on described router is acted on behalf of content according to URL and the described configuration information generating custom http of request, and realization is reset to customization http a returned content of the URL of request and acts on behalf of content.
In addition, during by the URL when described request and described URL to be replaced and/or URL matching regular expressions to be replaced, the URL of described request is replaced with to target URL, support the displacement of URL content, one or one group of URL to be replaced can be replaced into target URL.
In addition, by proxy server, according to Fixed Time Interval, to described configuration information server, send the request of Reconfigurations information, configuration information server sends the feedback of Reconfigurations information to described proxy server according to the request of described Reconfigurations information, proxy server can be regular mode to server, inquire about the configuration information need upgrading, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Embodiment mono-
As shown in Figure 1, the system that the present invention also provides a kind of http of customization to act on behalf of content, comprises router one and is built in the proxy server 2 on described router.
Router one is for obtaining the URL of request.
Proxy server 2 is acted on behalf of the configuration information of content for store customized http, and acts on behalf of content according to URL and the described configuration information generating custom http of request.
Preferably, described configuration information comprises:
URL to be replaced and/or URL regular expression to be replaced;
Target URL, when the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, replaces with target URL by the URL of described request;
The customization http corresponding with described target URL acts on behalf of content.
The present embodiment is based on http agent skill group, matching regular expressions technology, at the built-in proxy server of router interior (http proxy server), proxy server can be consulted the configuration information of storage, the URL of described request is replaced into target URL, realization is reset to customization http a returned content of the URL of request and acts on behalf of content, as the advertising business based on URL displacement realization.
Embodiment bis-
As shown in Figure 2, the present invention also provides a kind of http of customization to act on behalf of the system of content, comprise router one, be built in proxy server 2 and configuration information server 3 on described router, the difference of the present embodiment and embodiment mono-is to have increased a configuration information server 3, proxy server can be regular mode to server, inquire about the configuration information need upgrading, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
Router one is for obtaining the URL of request.
Proxy server 2 is acted on behalf of the configuration information of content for store customized http, and acts on behalf of content according to URL and the described configuration information generating custom http of request.
Configuration information server 3 is acted on behalf of the configuration information of content for store customized http, and the request of Receiving Agent server update configuration information, sends the feedback of Reconfigurations information according to the request of described Reconfigurations information to described proxy server.
Described proxy server 2 is also for sending the request of Reconfigurations information and the feedback of reception Reconfigurations information to described configuration information server 3, wherein, described proxy server sends the request of Reconfigurations information and the feedback of reception Reconfigurations information according to Fixed Time Interval to described configuration information server, be proxy server 2 according to Fixed Time Interval as 30 minutes query configuration information servers once, upgrade if necessary configuration information time, configuration information server 3 sends all feedbacks that need the configuration information of renewal to described proxy server 2, proxy server 2 is received after the feedback of the configuration information that configuration information server 3 need to be upgraded, according to feedback, the configuration information in internal memory is upgraded in indication, configuration information is come into force.
Preferably, described configuration information comprises:
URL to be replaced and/or URL regular expression to be replaced;
Target URL, when the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, replaces with target URL by the URL of described request;
The customization http corresponding with described target URL acts on behalf of content.
The present embodiment is based on http agent skill group, matching regular expressions technology and configuration information server configuration dynamically issue characteristic, at the built-in proxy server of router interior (http proxy server), the storable configuration information of consulting of proxy server, the URL of described request is replaced into target URL, realization is reset to customization http a returned content of the URL of request and acts on behalf of content, as the advertising business that displacement realizes based on URL, proxy server can be regular mode to server, inquire about the configuration information need upgrading, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
Embodiment tri-
As shown in Figure 3, the invention provides the method that customization http that a kind of customization http that adopts above-described embodiment one acts on behalf of the system of content acts on behalf of content, comprising:
Step S11, the proxy server stores being built on described router customizes the configuration information that http acts on behalf of content;
Preferably, described configuration information comprises that URL to be replaced and/or URL regular expression to be replaced, target URL and the customization http corresponding with described target URL act on behalf of content.
Step S12, router obtains the URL of request;
Step S13, described proxy server is acted on behalf of content according to URL and the described configuration information generating custom http of request.
Preferably, step S13 comprises:
Step S131, when the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, replaces with target URL by the URL of described request;
Step S132, generates corresponding customization http according to described target URL and acts on behalf of content.
The present embodiment is based on http agent skill group, matching regular expressions technology, at the built-in proxy server of router interior (http proxy server), proxy server can be consulted the configuration information of storage, the URL of described request is replaced into target URL, realization is reset to customization http a returned content of the URL of request and acts on behalf of content, as the advertising business based on URL displacement realization.
Embodiment tetra-
As shown in Figure 4, the invention provides the method that customization http that a kind of customization http that adopts above-described embodiment two acts on behalf of the system of content acts on behalf of content, the difference of the present embodiment and embodiment tetra-is that mode that proxy server can be regular inquires about and need the configuration information that upgrades to server, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server, described method comprises:
Step S21, configuration information server store customized http acts on behalf of the configuration information of content;
Step S22, described proxy server sends the request of Reconfigurations information to described configuration information server, wherein, described proxy server sends the request of Reconfigurations information and the feedback of reception Reconfigurations information according to Fixed Time Interval to described configuration information server, be proxy server according to Fixed Time Interval as 30 minutes query configuration information servers once, upgrade if necessary configuration information time, configuration information server sends all feedbacks that need the configuration information of renewal to described proxy server, proxy server is received after the feedback of the configuration information that configuration information server need to be upgraded, according to feedback, the configuration information in internal memory is upgraded in indication, configuration information is come into force,
Step S23, the request of Reconfigurations information described in described configuration information server Receiving Agent server, sends the feedback of Reconfigurations information to described proxy server according to the request of described Reconfigurations information;
Preferably, described configuration information comprises that URL to be replaced and/or URL regular expression to be replaced, target URL and the customization http corresponding with described target URL act on behalf of content.
Step S24, router obtains the URL of request;
Step S25, described proxy server is acted on behalf of content according to URL and the described configuration information generating custom http of request.
Preferably, step S25 comprises:
Step S251, when the URL of described request and described URL to be replaced and/or URL matching regular expressions to be replaced, replaces with target URL by the URL of described request;
Step S252, generates corresponding customization http according to described target URL and acts on behalf of content.
The present embodiment is based on http agent skill group, matching regular expressions technology, at the built-in proxy server of router interior (http proxy server), proxy server can be consulted the configuration information of storage, the URL of described request is replaced into target URL, realization is reset to customization http a returned content of the URL of request and acts on behalf of content, as the advertising business based on URL displacement realization.
The present embodiment is based on http agent skill group, matching regular expressions technology and configuration information server configuration dynamically issue characteristic, at the built-in proxy server of router interior (http proxy server), the storable configuration information of consulting of proxy server, the URL of described request is replaced into target URL, realization is reset to customization http a returned content of the URL of request and acts on behalf of content, as the advertising business that displacement realizes based on URL, proxy server can be regular mode to server, inquire about the configuration information need upgrading, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
In sum, the present invention obtains the URL of request by router, the proxy server being built on described router is acted on behalf of content according to URL and the described configuration information generating custom http of request, and realization is reset to customization http a returned content of the URL of request and acts on behalf of content.In addition, during by the URL when described request and described URL to be replaced and/or URL matching regular expressions to be replaced, the URL of described request is replaced with to target URL, support the displacement of URL content, one or one group of URL to be replaced can be replaced into target URL.In addition, by proxy server, according to Fixed Time Interval, to described configuration information server, send the request of Reconfigurations information, configuration information server sends the feedback of Reconfigurations information to described proxy server according to the request of described Reconfigurations information, proxy server can be regular mode to server, inquire about the configuration information need upgrading, and dynamically update configuration information according to the feedback of the Reconfigurations information of configuration information server.
In this specification, each embodiment adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.For the disclosed system of embodiment, owing to corresponding to the method disclosed in Example, so description is fairly simple, relevant part partly illustrates referring to method.
Professional can also 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 the combination of the two, for the interchangeability of hardware and software is clearly described, composition and the step of each example described according to function in the above description in general manner.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these change and modification.