Summary of the invention
The invention provides a kind of method, device and browser that shows focus keyword.Described technical scheme is as follows:
First aspect, the invention provides a kind of method that shows focus keyword, comprising:
Obtain focus keyword;
Generate and show body; Wherein, described demonstration body is used for showing described focus keyword;
Described focus keyword is implanted to described demonstration body;
When after the web page rotation at described demonstration body place of implanting keyword, the described demonstration body of controlling implantation keyword moves to postrotational described web page bottom in the mode of gravity fall.
Wherein, described in obtain focus keyword, comprising:
From default server, read the current focus keyword obtaining of its search engine;
The quantity of the focus keyword that calculating reads, and the focus keyword reading is stored in to default memory block with the form of array.
Wherein, described generation shows body, comprising:
The described demonstration body of the quantity respective numbers of generation and described focus keyword, wherein, a corresponding described demonstration body of described focus keyword;
For each described demonstration body arranges color.
Wherein, described described focus keyword is implanted to described demonstration body, comprising:
From default memory block, read described focus keyword, described focus keyword is implanted to corresponding described demonstration body.
Wherein, show the described demonstration body of implanting focus keyword in web page before, also comprise:
Create described web page;
The moving boundaries of the described demonstration body of implanting focus keyword is set in described web page.
Wherein, implant after the web page rotation at described demonstration body place of keyword, the described demonstration body of implanting keyword moves to postrotational described web page bottom in the mode of gravity fall, comprising:
In described web page, show the described demonstration body of implanting focus keyword, and start timer;
According to initial position, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter and the default gravity fall displacement formula of the described demonstration body of implantation focus keyword, the described demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the described demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall;
Obtain the rotation information of described web page;
According to the rotation information of described web page, obtain the bottom information of postrotational described web page;
Obtain the current location of the described demonstration body of implanting focus keyword;
According to current location, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter, the bottom information of postrotational described web page and the default gravity fall displacement formula of the described demonstration body of implantation focus keyword, the described demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the described demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall.
Wherein, described demonstration body is: bead, cube box, animal pattern, personage's head portrait or scenery picture.
Second aspect, the invention provides a kind of device that shows focus keyword, comprising:
Acquisition module, for obtaining focus keyword;
Generation module, for generating demonstration body; Wherein, described demonstration body is used for showing described focus keyword;
Implant module, for implanting described demonstration body by described focus keyword;
Processing module, after the web page rotation at described demonstration body place when implanting keyword, the described demonstration body of controlling implantation keyword moves to postrotational described web page bottom in the mode of gravity fall.
Wherein, described acquisition module comprises:
Reading unit, for reading the current focus keyword obtaining of its search engine from default server;
Processing unit, for calculating the quantity of the focus keyword reading, and is stored in default memory block by the focus keyword reading with the form of array.
Wherein, described generation module comprises:
Generation unit, for generating and the described demonstration body of the quantity respective numbers of described focus keyword, wherein, a corresponding described demonstration body of described focus keyword;
Setting unit, is used to each described demonstration body that color is set.
Wherein, described implant module comprises:
Implant unit, for read described focus keyword from default memory block, described focus keyword is implanted to corresponding described demonstration body.
Wherein, described device also comprises:
Creation module, for creating described web page;
Module is set, for the moving boundaries of the described demonstration body of implanting focus keyword is set at described web page.
Wherein, described processing module comprises:
Start unit, for show the described demonstration body of implanting focus keyword at described web page, and starts timer;
The first acquiring unit, be used for according to initial position, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter and the default gravity fall displacement formula of the described demonstration body of implantation focus keyword, the described demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the described demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall;
Second acquisition unit, for obtaining the rotation information of described web page;
The 3rd acquiring unit, for according to the rotation information of described web page, obtains the bottom information of postrotational described web page;
The 4th acquiring unit, for obtaining the current location of the described demonstration body of implanting focus keyword;
Control module, be used for according to current location, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter, the bottom information of postrotational described web page and the default gravity fall displacement formula of the described demonstration body of implantation focus keyword, the described demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the described demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall.
Wherein, described demonstration body is: bead, cube box, animal pattern, personage's head portrait or scenery picture.
The third aspect, the invention provides a kind of browser, comprises as above-mentioned device as described in arbitrary.
The beneficial effect that technical scheme provided by the invention is brought is: by obtaining focus keyword, generate and show body, focus keyword is implanted and shown body, implant after the web page rotation at demonstration body place of keyword, the demonstration body of implanting keyword moves to postrotational web page bottom in the mode of gravity fall, thereby the dynamic solid of realizing focus keyword shows, has strengthened display effect, make that vision is abundant, interactivity is strong.Generate and the demonstration body of the quantity respective numbers of focus keyword, for each demonstration body arranges color, further improved display effect, make that vision is abundanter, interactivity is stronger.Show that body can be: bead, cube box, animal pattern, personage's head portrait or scenery picture, make different demonstration bodies to be set according to different customer groups, be convenient to user's use.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
Referring to Fig. 1, the embodiment of the present invention provides a kind of method that shows focus keyword, comprises the following steps:
S101: obtain focus keyword.
Wherein, obtain focus keyword, comprising:
From default server, read the current focus keyword obtaining of its search engine;
The quantity of the focus keyword that calculating reads, and focus keyword is stored in to default memory block with the form of array.
Particularly, can from default server, read the current focus keyword obtaining of its search engine by ajax technology etc.
S102: generate and show body; Wherein, show that body is used for showing focus keyword.
Wherein, generate and show body, comprising:
The demonstration body of the quantity respective numbers of generation and focus keyword, wherein, corresponding one of a focus keyword shows body;
For each demonstration body arranges color.
Particularly, can for each demonstration body, different colors be set at random.
Wherein, show that body can be: bead, cube box, animal pattern, personage's head portrait or scenery picture etc.
S103: focus keyword is implanted and shown body.
Wherein, focus keyword is implanted and is shown body, comprising:
From default memory block, read focus keyword, focus keyword is implanted to the corresponding body that shows.
S104: when after the web page rotation at demonstration body place of implanting keyword, the demonstration body of controlling implantation keyword moves to postrotational web page bottom in the mode of gravity fall.
Wherein, when after the web page rotation at demonstration body place of implanting keyword, the demonstration body of implanting keyword moves to postrotational web page bottom in the mode of gravity fall, comprising:
In web page, show the demonstration body of implanting focus keyword, and start timer;
According to initial position, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter and the default gravity fall displacement formula of the demonstration body of implantation focus keyword, the demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the demonstration body of implanting focus keyword and according to moving displacement, carries out the motion of gravity fall;
Obtain the rotation information of web page;
According to the rotation information of web page, obtain the bottom information of postrotational web page;
Obtain the current location of the demonstration body of implanting focus keyword;
According to current location, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter, the bottom information of postrotational web page and the default gravity fall displacement formula of the demonstration body of implantation focus keyword, the demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the demonstration body of implanting focus keyword and according to moving displacement, carries out the motion of gravity fall.
Wherein, the Web page of browser is that the content of a two-dimensional space, the Web page can be search, news, video, music etc., and this is not specifically limited.
Wherein, the initial position of implanting the demonstration body of focus keyword can arrange corresponding value according to practical application situation, and as being set to (0,0) etc., default gravity fall acceleration can be acceleration of gravity etc.Value to them is not specifically limited, and can arrange according to practical application situation.
Wherein, the value of current direction parameter is 1 or-1.When judging that the position of the demonstration body of implanting focus keyword is less than the moving boundaries of demonstration body of default implantation focus keyword, the value that current direction parameter is set is 1; When judging that the position of the demonstration body of implanting focus keyword is more than or equal to the moving boundaries of demonstration body of default implantation focus keyword, the value that current direction parameter is set is-1.
Wherein, default gravity fall displacement formula S can be: S=S.+ g*t*d, wherein, S.The initial position or the current location that represent the demonstration body of implanting focus keyword, g represents default gravity fall acceleration, and t represents the time that timer obtains, and d represents the value of current direction parameter.
When after web page rotation, need to, according to the bottom information of postrotational web page, to the adjustment on default gravity fall displacement formula S travel direction, make the direction of the moving displacement obtaining after adjusting point to the bottom of postrotational web page.
Preferably, show the demonstration body of implanting focus keyword in web page before, also comprise:
Create web page;
The moving boundaries of the demonstration body of implanting focus keyword is set in web page.
Wherein, the moving boundaries of the demonstration body of implantation focus keyword comprises coboundary, lower boundary, left margin and right margin.The moving boundaries that can implant the demonstration body of focus keyword is set to be less than or equal to the regional edge dividing value of web page.
The method that the present embodiment provides can be applied in the browser of client, and this client can be computing machine, notebook computer, mobile phone or panel computer etc.
The said method that the present embodiment provides, by obtaining focus keyword, generate and show body, focus keyword is implanted and shown body, implant after the web page rotation at demonstration body place of keyword, the demonstration body of implanting keyword moves to postrotational web page bottom in the mode of gravity fall, thereby realizes the dynamic solid demonstration of focus keyword, strengthened display effect, made that vision is abundant, interactivity is strong.Generate and the demonstration body of the quantity respective numbers of focus keyword, for each demonstration body arranges color, further improved display effect, make that vision is abundanter, interactivity is stronger.Show that body can be: bead, cube box, animal pattern, personage's head portrait or scenery picture, make different demonstration bodies to be set according to different customer groups, be convenient to user's use.
Another embodiment of the present invention provides a kind of device that shows focus keyword, referring to Fig. 2, comprising:
Acquisition module 201, for obtaining focus keyword;
Generation module 202, for generating demonstration body; Wherein, show that body is used for showing described focus keyword;
Implant module 203, for implanting focus keyword to show body;
Processing module 204, after the web page rotation at demonstration body place when implanting keyword, the demonstration body of controlling implantation keyword moves to postrotational web page bottom in the mode of gravity fall.
Preferably,acquisition module 201 comprises:
Reading unit, for reading the current focus keyword obtaining of its search engine from default server;
Processing unit, for calculating the quantity of the focus keyword reading, and is stored in default memory block by the focus keyword reading with the form of array.
Preferably,generation module 202 comprises:
Generation unit, for generating and the demonstration body of the quantity respective numbers of focus keyword, wherein, corresponding one of a focus keyword shows body;
Setting unit, is used to each demonstration body that color is set.
Preferably,implant module 203 comprises:
Implant unit, for reading focus keyword from default memory block, focus keyword is implanted to the corresponding body that shows.
Preferably, referring to Fig. 3, this device also comprises:
Creation module 205, for creating web page;
Module 206 is set, for the moving boundaries of the demonstration body of implanting focus keyword is set at web page.
Preferably,processing module 204 comprises:
Start unit, for show the demonstration body of implanting focus keyword at web page, and starts timer;
The first acquiring unit, be used for according to initial position, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter and the default gravity fall displacement formula of the demonstration body of implantation focus keyword, the demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall;
Second acquisition unit, for obtaining the rotation information of web page;
The 3rd acquiring unit, for according to the rotation information of web page, obtains the bottom information of postrotational web page;
The 4th acquiring unit, for obtaining the current location of the demonstration body of implanting focus keyword;
Control module, be used for according to current location, default gravity fall acceleration, the time that timer obtains, the value of current direction parameter, the bottom information of postrotational web page and the default gravity fall displacement formula of the demonstration body of implantation focus keyword, the demonstration body that obtains implanting focus keyword carries out the moving displacement of gravity fall, controls the demonstration body of implanting focus keyword and according to described moving displacement, carries out the motion of gravity fall.
Preferably, show that body is: bead, cube box, animal pattern, personage's head portrait or scenery picture.
The said apparatus that the present embodiment provides can be provided by the method providing in said method embodiment, and detailed process is shown in the description in embodiment of the method, does not repeat herein.
The said apparatus that the present embodiment provides can be provided by the method providing in said method embodiment, and detailed process is shown in the description in embodiment of the method, does not repeat herein.
The said apparatus that the present embodiment provides, by obtaining focus keyword, generate and show body, focus keyword is implanted and shown body, implant after the web page rotation at demonstration body place of keyword, the demonstration body of implanting keyword moves to postrotational web page bottom in the mode of gravity fall, thereby realizes the dynamic solid demonstration of focus keyword, strengthened display effect, made that vision is abundant, interactivity is strong.Generate and the demonstration body of the quantity respective numbers of focus keyword, for each demonstration body arranges color, further improved display effect, make that vision is abundanter, interactivity is stronger.Show that body can be: bead, cube box, animal pattern, personage's head portrait or scenery picture, make different demonstration bodies to be set according to different customer groups, be convenient to user's use.Another embodiment of the present invention also provides a kind of browser, comprises the device of the demonstration focus keyword described in above-described embodiment, and the function of this device refers to the description in said apparatus embodiment, does not repeat herein.
The described browser that the present embodiment provides can be provided by the method providing in said method embodiment, and detailed process is shown in the description in embodiment of the method, does not repeat herein.
The above-mentioned browser that the present embodiment provides, by obtaining focus keyword, generate and show body, focus keyword is implanted and shown body, implant after the web page rotation at demonstration body place of keyword, the demonstration body of implanting keyword moves to postrotational web page bottom in the mode of gravity fall, thereby realizes the dynamic solid demonstration of focus keyword, strengthened display effect, made that vision is abundant, interactivity is strong.Generate and the demonstration body of the quantity respective numbers of focus keyword, for each demonstration body arranges color, further improved display effect, make that vision is abundanter, interactivity is stronger.Show that body can be: bead, cube box, animal pattern, personage's head portrait or scenery picture, make different demonstration bodies to be set according to different customer groups, be convenient to user's use.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.