Summary of the invention
Fundamental purpose of the present invention is the loading method and the device that provide a kind of webpage thermodynamic, with solve prior art use access from different devices same web page time webpage thermodynamic load inaccurate problem.
To achieve these goals, according to an aspect of the present invention, a kind of loading method of webpage thermodynamic is provided.The loading method of this webpage thermodynamic comprises: determine webpage loading equipemtn and webpage to be loaded; Obtain the user agent that webpage loading equipemtn is corresponding; According to user agent, webpage to be loaded is redirected to target web; Obtain the click volume of target web; The thermodynamic chart of target web is obtained according to the click volume of target web; The thermodynamic chart of webpage to be loaded is loaded by the thermodynamic chart of loaded targets webpage.
Further, the user agent obtaining webpage loading equipemtn corresponding comprises: obtain the agent webpage that webpage to be loaded is corresponding, wherein, agent webpage is for loading the thermodynamic chart of target web corresponding to webpage to be loaded and target web; Obtain the query argument in agent webpage, wherein, the query argument of agent webpage comprises the network address of webpage to be loaded and the device identification of webpage loading equipemtn; Resolve the query argument in agent webpage, obtain the network address of webpage to be loaded and the device identification of webpage loading equipemtn; User agent corresponding to the device identification of webpage loading equipemtn is obtained according to the corresponding relation of the device identification prestored and user agent.
Further, the user agent obtaining the device identification of webpage loading equipemtn corresponding according to the corresponding relation of the device identification prestored and subscriber proxy server comprises: the device identification set obtaining webpage suitable device to be loaded; Traversal device identification set is the device identification distributing user agency in device identification set, wherein, and device identification and user agent's one_to_one corresponding; By device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification stores; The user agent corresponding according to the device identification of the corresponding relation acquisition webpage loading equipemtn of the device identification user agent corresponding with device identification stored.
Further, webpage to be loaded is redirected to target web and comprises by corresponding according to webpage loading equipemtn user agent: user agent corresponding for webpage loading equipemtn added in the header parameter of webpage to be loaded; The user agent that webpage to be loaded is corresponding according to the webpage loading equipemtn in header parameter determines the device identification of webpage loading equipemtn; According to the corresponding relation of the device identification prestored and webpage, webpage to be loaded is redirected to the webpage that the device identification of webpage loading equipemtn is corresponding.
Further, according to the corresponding relation of the device identification prestored and webpage, webpage webpage to be loaded being redirected to the device identification of webpage loading equipemtn corresponding comprises: the network address obtaining target web, wherein, the network address of target web is the network address of the webpage that webpage to be loaded is out of shape according to device identification; Obtain the device identification set of webpage suitable device to be loaded; Traversal device identification set, the corresponding relation of the device identification in the set of apparatus for establishing mark and the network address of target web; By device identification, the network address of target web, the corresponding relation of the network address of device identification and target web stores; The network address of target web corresponding to the device identification of webpage loading equipemtn is obtained according to the device identification stored and the corresponding relation of the network address of target web; The webpage that the network address of the target web that the device identification of Web page loading loading equipemtn is corresponding is corresponding.
To achieve these goals, according to a further aspect in the invention, a kind of charger of webpage thermodynamic is provided.The charger of this webpage thermodynamic comprises: the first determination module, for determining webpage loading equipemtn and webpage to be loaded; First acquisition module, for obtaining user agent corresponding to webpage loading equipemtn; Redirection module, for being redirected to target web according to user agent by webpage to be loaded; Second acquisition module, for obtaining the click volume of target web; 3rd acquisition module, for obtaining the thermodynamic chart of target web according to the click volume of target web; First load-on module, for loading the thermodynamic chart of webpage to be loaded by the thermodynamic chart of loaded targets webpage.
Further, the first acquisition module comprises: first obtains submodule, and for obtaining agent webpage corresponding to webpage to be loaded, wherein, agent webpage is for loading the thermodynamic chart of target web corresponding to webpage to be loaded and target web; Second obtains submodule, and for obtaining the query argument in agent webpage, wherein, the query argument of agent webpage comprises the network address of webpage to be loaded and the device identification of webpage loading equipemtn; Parsing module, for resolving the query argument in agent webpage, obtains the network address of webpage to be loaded and the device identification of webpage loading equipemtn; 3rd obtains submodule, the user agent that the device identification for obtaining webpage loading equipemtn according to the corresponding relation of the device identification prestored and user agent is corresponding.
Further, the 3rd obtains submodule comprises: the 4th acquisition submodule, for obtaining the device identification set of webpage suitable device to be loaded; Distribution module, for traveling through device identification set, is the device identification distributing user agency in device identification set, wherein, and device identification and user agent's one_to_one corresponding; First memory module, for by device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification stores; 5th obtains submodule, the user agent that the device identification for the corresponding relation acquisition webpage loading equipemtn according to the device identification user agent corresponding with device identification stored is corresponding.
Further, redirection module comprises: add module, for user agent corresponding for webpage loading equipemtn being added in the header parameter of webpage to be loaded; Second determination module, determines the device identification of webpage loading equipemtn for the user agent that webpage to be loaded is corresponding according to the webpage loading equipemtn in header parameter; First is redirected submodule, for the corresponding relation according to the device identification prestored and webpage, webpage to be loaded is redirected to the webpage that the device identification of webpage loading equipemtn is corresponding.
Further, first is redirected submodule comprises: the 6th acquisition submodule, and for obtaining the network address of target web, wherein, the network address of target web is the network address of the webpage that webpage to be loaded is out of shape according to device identification; 7th obtains submodule, for obtaining the device identification set of webpage suitable device to be loaded; Set up module, for traveling through device identification set, the corresponding relation of the device identification in the set of apparatus for establishing mark and the network address of target web; Second memory module, for by device identification, the network address of target web, the corresponding relation of the network address of device identification and target web stores; 8th obtains submodule, the network address of the target web that the device identification for obtaining webpage loading equipemtn according to the device identification stored and the corresponding relation of the network address of target web is corresponding; Second load-on module, the webpage that the network address of the target web that the device identification for Web page loading loading equipemtn is corresponding is corresponding.
By the present invention, adopt and determine webpage loading equipemtn and webpage to be loaded; Obtain the user agent that webpage loading equipemtn is corresponding; According to user agent, webpage to be loaded is redirected to target web; Obtain the click volume of target web; The thermodynamic chart of target web is obtained according to the click volume of target web; Loaded the thermodynamic chart of webpage to be loaded by the thermodynamic chart of loaded targets webpage, solve prior art use access from different devices same web page time webpage thermodynamic load inaccurate problem.Do not need to access the different network addresss when using different web pages loading equipemtn by the loading method visitor of the webpage thermodynamic of this invention, when Accessor Access's same network address, visitor is redirected to different webpages, for different webpage loading equipemtns provides different content displayings by the webpage loading equipemtn that can use according to visitor automatically.Simultaneously, this invention realizes treating the loading of Web page loading thermodynamic chart by the thermodynamic chart that the target web that automatic Web page loading loading equipemtn is corresponding loads this target web automatically, and then ensure that the accuracy that webpage thermodynamic loads when using access from different devices same web page.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The application's scheme is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the embodiment of the application's part, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
It should be noted that, term " first ", " second " etc. in the instructions of the application and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that the embodiment of the application described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
The present invention aims to provide a kind of loading method and device of webpage thermodynamic.
Fig. 1 is the process flow diagram of the loading method of webpage thermodynamic according to the embodiment of the present invention.As shown in Figure 1, the loading method of this webpage thermodynamic comprises following step S101 to step S106:
Step S101, determines webpage loading equipemtn and webpage to be loaded.
Webpage to be loaded can be any webpage in any one browser, the such as homepage of Sohu's browser, the search and webpage etc. in Baidu library.Webpage loading equipemtn can be computing machine, panel computer, i Phone, or Android mobile phone etc.The content that identical webpage shows on different webpage loading equipemtns is different, such as, the position at the content that shows on computers of the homepage of Baidu's browser and displaying contents place is different from the position at the content that the homepage of Baidu browser shows on i Phone and displaying contents place.The position of the content that identical webpage shows on the webpage loading equipemtn of one species different model or displaying contents is not identical yet, the content of the mobile phone display of such as identical webpage in different model is not identical yet, and the mobile phone of apple IOS system is different with the display mode of the mobile phone display Baidu homepage of Android system.When development and Design browsing device net page, be applicable to the webpage shown on different web pages loading equipemtn according to the different development and Design of webpage loading equipemtn.Such as, webpage loading equipemtn has type in 3, be respectively equipment 1, equipment 2 and equipment 3, website designer for the distortion webpage that 3 kinds of equipment de-sign webpage to be loaded of this type in 3 are different, is respectively webpage 1 respectively, webpage 2 and webpage 3, the i.e. display web page 1 when equipment 1 loads webpage to be loaded, the display web page 2 when equipment 2 loads webpage to be loaded, the display web page 3 when equipment 3 loads webpage to be loaded.
Step S102, obtains the user agent that webpage loading equipemtn is corresponding.
Web analytics platform provides loading often to plant the mode of the thermodynamic chart of webpage loading equipemtn for webpage to be loaded.Preferably, the loading method of the webpage thermodynamic of this embodiment is by when wherein any one load mode loads the thermodynamic chart of webpage to be loaded, the user agent obtaining webpage loading equipemtn corresponding specifically comprises: obtain the agent webpage that webpage to be loaded is corresponding, wherein, agent webpage is for loading the thermodynamic chart of target web corresponding to webpage to be loaded and target web; Obtain the query argument in agent webpage, wherein, the query argument of agent webpage comprises the network address of webpage to be loaded and the device identification of webpage loading equipemtn; Resolve the query argument in agent webpage, obtain the network address of webpage to be loaded and the device identification of webpage loading equipemtn; User agent corresponding to the device identification of webpage loading equipemtn is obtained according to the corresponding relation of the device identification prestored and user agent.
Preferably, the user agent obtaining the device identification of webpage loading equipemtn corresponding according to the corresponding relation of the device identification prestored and subscriber proxy server comprises: the device identification set obtaining webpage suitable device to be loaded; Traversal device identification set is the device identification distributing user agency in device identification set, wherein, and device identification and user agent's one_to_one corresponding; By device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification stores; The user agent corresponding according to the device identification of the corresponding relation acquisition webpage loading equipemtn of the device identification user agent corresponding with device identification stored.The loading method of the webpage thermodynamic of this embodiment can by device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification is stored in database, also can by device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification stores in other storage mediums.Such as, the device identification set of webpage suitable device to be loaded comprises equipment 1, equipment 2 and equipment 3, and the user agent of equipment 1 correspondence is agency 1, and the user agent of equipment 2 correspondence is agency 2, and the user agent of equipment 3 correspondence is agency 3.When equipment 1 loads webpage to be loaded, the user agent that directly can obtain this equipment 1 correspondence according to the corresponding relation of the device identification prestored and user agent is agency 1.
Step S103, is redirected to target web according to user agent by webpage to be loaded.
Webpage to be loaded is redirected to target web and comprises by the user agent corresponding according to webpage loading equipemtn: user agent corresponding for webpage loading equipemtn added in the header parameter of webpage to be loaded; The user agent that webpage to be loaded is corresponding according to the webpage loading equipemtn in header parameter determines the device identification of webpage loading equipemtn; According to the corresponding relation of the device identification prestored and webpage, webpage to be loaded is redirected to the webpage that the device identification of webpage loading equipemtn is corresponding.
According to the corresponding relation of the device identification prestored and webpage, webpage webpage to be loaded being redirected to the device identification of webpage loading equipemtn corresponding comprises: the network address obtaining target web, wherein, the network address of target web is the network address of the webpage that webpage to be loaded is out of shape according to device identification; Obtain the device identification set of webpage suitable device to be loaded; Traversal device identification set, the corresponding relation of the device identification in the set of apparatus for establishing mark and the network address of target web; By device identification, the network address of target web, the corresponding relation of the network address of device identification and target web stores; The network address of target web corresponding to the device identification of webpage loading equipemtn is obtained according to the device identification stored and the corresponding relation of the network address of target web; The webpage that the network address of the target web that the device identification of Web page loading loading equipemtn is corresponding is corresponding.The loading method of the webpage thermodynamic of this embodiment can by device identification, the network address of target web, the corresponding relation of the network address of device identification and target web is stored in database, also can by device identification, the network address of target web, the corresponding relation of the network address of device identification and target web stores in other storage mediums.Such as, the device identification set of webpage suitable device to be loaded comprises equipment 1, equipment 2 and equipment 3, the device identification prestored and the corresponding relation of webpage are equipment 1 display web page 1 when loading webpage to be loaded, display web page 2 when equipment 2 loads webpage to be loaded, display web page 3 when equipment 3 loads webpage to be loaded.The device identification that can obtain the webpage loading equipemtn that user agent is agency 1 correspondence according to the corresponding relation of the device identification prestored and user agent is equipment 1, and the device identification obtaining webpage loading equipemtn according to the device identification prestored and the corresponding relation of webpage is the target web that equipment 1 is corresponding is webpage 1.
Step S104, obtains the click volume of target web.
When user accesses webpage to be loaded by webpage loading equipemtn, target web is redirected to according to the webpage to be loaded that webpage loading equipemtn is accessed by the corresponding relation of the device identification prestored and webpage, the behavioral data of this user access can be recorded in database, wherein, the behavioral data that this user accesses is as the data foundation of web analytics, specifically can comprise the access duration of user, number of clicks and click location etc.Preferably, target web is divided into the region of multiple 10*10 pixel size by the loading method of the webpage thermodynamic of this embodiment, and the click data of optional position is all using the click data as this region top left co-ordinate point in this region.Such as, the click data at coordinate position to be the click data at (11,15) place using the coordinate position in the region as this coordinate points place be (10,10) place.The user being accessed webpage to be loaded by same webpage loading equipemtn can have one, also can have multiple.The click volume of same user on the target web that webpage to be loaded is corresponding comprises the click volume of this user in this target web zones of different.All click datas of all users collected by front end script, comprise the number of clicks and click location etc. of user, and will be stored in database by these click datas.
Step S105, obtains the thermodynamic chart of target web according to the click volume of target web.
Preferably, the loading method of the webpage thermodynamic of this embodiment click volume in each region in query aim webpage from the database storing click data, the click volume according to target web draws gray-scale map.This target web is divided into the region of multiple 10*10 pixel size, coordinate points place in the arbitrary region of target web, centered by this coordinate points, draw a round region, ash color depth has 255 grades, in this circle region, the degree of depth of the point that click volume is the highest is 255, and click volume is the degree of depth of the point of 0 is 0, and the click volume of other points is scaled any depth value between 0-255 in proportion.It is the transfer color to grayscale images of this target web after gray-scale map is drawn to target web, first the grey color depth of each pixel is obtained, its scope is 0-255, this scope is divided into 5 grades, the color that each grade is corresponding different, along with grade from low to high, color constantly deepens, and just obtains the thermodynamic chart of target web thus.Thermodynamic chart reflects the click volume of target web arbitrary region, and the click volume of the target web that the region that in thermodynamic chart, color is darker is corresponding is more, and the click volume of the target web that the region that in thermodynamic chart, color is more shallow is corresponding is less.
Step S106, loads the thermodynamic chart of webpage to be loaded by the thermodynamic chart of loaded targets webpage.
After obtaining the thermodynamic chart of target web according to the click volume of target web, the target web that agent webpage is first corresponding with the corresponding relation Web page loading loading equipemtn of webpage according to device identification, then loads the thermodynamic chart of this target web on target web.The loading method of the webpage thermodynamic of this embodiment is according to the corresponding relation of device identification and webpage, and the webpage to be loaded that will be loaded by webpage loading equipemtn is redirected to target web.By agent webpage loaded targets webpage, the thermodynamic chart of target web is obtained according to the click volume of target web, then on this target web, the thermodynamic chart of loaded targets webpage realizes the thermodynamic chart that webpage loading equipemtn loads webpage to be loaded, thus improves the accuracy that webpage loading equipemtn loads webpage thermodynamic to be loaded.
The loading method of the webpage thermodynamic of this embodiment adopts determines webpage loading equipemtn and webpage to be loaded; Obtain the user agent that webpage loading equipemtn is corresponding; According to user agent, webpage to be loaded is redirected to target web; Obtain the click volume of target web; The thermodynamic chart of target web is obtained according to the click volume of target web; The thermodynamic chart of webpage to be loaded is loaded by the thermodynamic chart of loaded targets webpage, solve webpage thermodynamic when prior art uses access from different devices same web page and load inaccurate problem, reach and improve the effect that webpage loading equipemtn loads the accuracy of the thermodynamic chart of webpage to be loaded.
From above description, can find out, the loading method of the webpage thermodynamic of the embodiment of the present invention is redirected to target web according to the corresponding relation of the device identification prestored and webpage to the webpage to be loaded that webpage loading equipemtn will load, the thermodynamic chart of target web is obtained after obtaining the click volume of target web, act on behalf of the page by utilization and load target pages corresponding to webpage to be loaded, then on target pages, the thermodynamic chart of the loaded targets page realizes the thermodynamic chart that webpage loading equipemtn loads webpage to be loaded, solve prior art use access from different devices same web page time webpage thermodynamic load inaccurate problem.The thermodynamic chart of the webpage to be loaded that different webpage loading equipemtns obtains when loading the thermodynamic chart of webpage to be loaded is different, reaches and improves the effect that webpage loading equipemtn loads the accuracy of webpage thermodynamic to be loaded.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
The embodiment of the present invention additionally provides a kind of charger of webpage thermodynamic.It should be noted that, the charger of this webpage thermodynamic may be used for the loading method of the webpage thermodynamic performing the embodiment of the present invention.
Fig. 2 is the schematic diagram of the charger of webpage thermodynamic according to the embodiment of the present invention.As shown in Figure 2, the charger of this webpage thermodynamic comprises: the first determination module 10, first acquisition module 20, redirection module 30, the second acquisition module the 40, three acquisition module 50 and the first load-on module 60.
First determination module 10, for determining webpage loading equipemtn and webpage to be loaded.
First acquisition module 20, for obtaining user agent corresponding to webpage loading equipemtn.
Preferably, the first acquisition module 20 comprises: first obtains submodule, and for obtaining agent webpage corresponding to webpage to be loaded, wherein, agent webpage is for loading the thermodynamic chart of target web corresponding to webpage to be loaded and target web; Second obtains submodule, and for obtaining the query argument in agent webpage, wherein, the query argument of agent webpage comprises the network address of webpage to be loaded and the device identification of webpage loading equipemtn; Parsing module, for resolving the query argument in agent webpage, obtains the network address of webpage to be loaded and the device identification of webpage loading equipemtn; 3rd obtains submodule, the user agent that the device identification for obtaining webpage loading equipemtn according to the corresponding relation of the device identification prestored and user agent is corresponding.Preferably, the 3rd obtains submodule comprises: the 4th acquisition submodule, for obtaining the device identification set of webpage suitable device to be loaded; Distribution module, for traveling through device identification set, is the device identification distributing user agency in device identification set, wherein, and device identification and user agent's one_to_one corresponding; First memory module, for by device identification, the user agent that device identification is corresponding, the corresponding relation of the user agent that device identification is corresponding with device identification stores; 5th obtains submodule, the user agent that the device identification for the corresponding relation acquisition webpage loading equipemtn according to the device identification user agent corresponding with device identification stored is corresponding.
Redirection module 30, for being redirected to target web according to user agent by webpage to be loaded.
Preferably, redirection module 30 comprises: add module, for user agent corresponding for webpage loading equipemtn being added in the header parameter of webpage to be loaded; Second determination module, determines the device identification of webpage loading equipemtn for the user agent that webpage to be loaded is corresponding according to the webpage loading equipemtn in header parameter; First is redirected submodule, for the corresponding relation according to the device identification prestored and webpage, webpage to be loaded is redirected to the webpage that the device identification of webpage loading equipemtn is corresponding.Preferably, first is redirected submodule comprises: the 6th acquisition submodule, and for obtaining the network address of target web, wherein, the network address of target web is the network address of the webpage that webpage to be loaded is out of shape according to device identification; 7th obtains submodule, for obtaining the device identification set of webpage suitable device to be loaded; Set up module, for traveling through device identification set, the corresponding relation of the device identification in the set of apparatus for establishing mark and the network address of target web; Second memory module, for by device identification, the network address of target web, the corresponding relation of the network address of device identification and target web stores; 8th obtains submodule, the network address of the target web that the device identification for obtaining webpage loading equipemtn according to the device identification stored and the corresponding relation of the network address of target web is corresponding; Second load-on module, the webpage that the network address of the target web that the device identification for Web page loading loading equipemtn is corresponding is corresponding.
Second acquisition module 40, for obtaining the click volume of target web.
3rd acquisition module 50, for obtaining the thermodynamic chart of target web according to the click volume of target web.
First load-on module 60, for loading the thermodynamic chart of webpage to be loaded by the thermodynamic chart of loaded targets webpage.
The charger of the webpage thermodynamic of this embodiment comprises the first determination module 10, first acquisition module 20, redirection module 30, the second acquisition module the 40, three acquisition module 50 and the first load-on module 60.By the charger of the webpage thermodynamic of this embodiment solve prior art use access from different devices same web page time webpage thermodynamic load inaccurate problem.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.