Summary of the invention
In order to address the above problem, the embodiment of the invention provides a kind of method and terminal of display page.Described technical scheme is as follows:
On the one hand, provide a kind of method of display page, described method comprises:
Determine the current time, and in a plurality of time intervals of dividing in advance, determine the time interval under the described current time;
Background color and the font color of the page are set according to the time interval of determining;
Show the described page according to the background color and the font color that arrange.
Preferably, the time interval that described basis is determined arranges background color and the font color of the page, comprising:
Obtain background color and the font color of definite time interval correspondence according to the corresponding relation of the time interval that sets in advance and background color and font color, and the background color that obtains and font color are set to background color and the font color of the page.
Preferably, the described demonstration according to the background color that arranges and font color also comprises after the described page:
Detect the ambient light line strength, and in a plurality of intensity interval of dividing in advance, determine the intensity interval under the detected ambient light line strength;
Reset background color and the font color of the described page according to the intensity interval of determining, and show the described page according to the background color of resetting and font color.
Preferably, the intensity interval that described basis is determined is reset background color and the font color of the described page, comprising:
Obtain background color and the font color of definite intensity interval correspondence according to the corresponding relation of the intensity interval that sets in advance and background color and font color, and background color and font color that the background color that obtains and font color are re-set as the described page.
Preferably, the described demonstration according to the background color that arranges and font color also comprises after the described page:
Adjust the screen intensity of described terminal according to detected ambient light line strength.
On the other hand, provide a kind of terminal, described device comprises:
First determination module is used for determining the current time;
Second determination module is used for the time interval under a plurality of time intervals of dividing are in advance determined definite current time of described first determination module;
First arranges module, is used for arranging according to the time interval that described second determination module is determined background color and the font color of the page;
First display module is used for showing the described page according to described first background color and the font color that the module setting is set.
Preferably, described first arranges module, comprising:
Acquiring unit is used for obtaining according to the corresponding relation of the time interval that sets in advance and background color and font color background color and the font color of definite time interval correspondence;
The unit is set, is used for background color and font color that background color that described acquiring unit obtains and font color are set to the page.
Preferably, described terminal also comprises:
Detection module is for detection of the ambient light line strength;
The 3rd determination module is used for the intensity interval under a plurality of intensity interval of dividing are in advance determined the detected ambient light line strength of described detection module;
Second arranges module, is used for redefining according to the intensity interval that described the 3rd determination module is determined background color and the font color of the described page;
Second display module is used for according to described second background color and the font color that module resets being set and shows the described page.
Preferably, described second arranges module, comprising:
Acquiring unit is used for obtaining according to the corresponding relation of the intensity interval that sets in advance and background color and font color background color and the font color of definite intensity interval correspondence;
The unit is set, is used for background color and font color that background color that described acquiring unit is obtained and font color are re-set as the described page.
Preferably, described terminal also comprises:
Adjusting module is for the screen intensity of adjusting described terminal according to detected ambient light line strength.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
By determining the time interval under the current time, and arrange after the background color and font color of the page according to the time interval of determining, according to the background color and the font color display page that arrange, expanded the mode that the page shows; Because background color and the font color of the page can be adjusted in real time according to the time interval under the current time, make that background color and the font color of page displayed are comparatively diversified, and can change automatically within a certain period of time, prevent user's visual fatigue.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment one
The embodiment of the invention provides a kind of method of display page, and referring to Fig. 1, method flow comprises:
101: determine the current time, and in a plurality of time intervals of dividing in advance, determine the time interval under the current time.
102: background color and font color that the page is set according to the time interval of determining.
Preferably, according to the time interval of determining background color and the font color of the page are set, comprise:
Obtain background color and the font color of definite time interval correspondence according to the corresponding relation of the time interval that sets in advance and background color and font color, and the background color that obtains and font color are set to background color and the font color of the page.
103: according to the background color and the font color display page that arrange.
Preferably, after the background color that arranges and font color display page, also comprise:
Detect the ambient light line strength, and in a plurality of intensity interval of dividing in advance, determine the intensity interval under the detected ambient light line strength;
Reset background color and the font color of the page according to the intensity interval of determining, and according to the background color of resetting and font color display page.
Preferably, reset background color and the font color of the page according to the intensity interval of determining, comprising:
Obtain background color and the font color of definite intensity interval correspondence according to the corresponding relation of the intensity interval that sets in advance and background color and font color, and background color and font color that the background color that obtains and font color are re-set as the page.
Preferably, after the background color that arranges and font color display page, also comprise:
Adjust the screen intensity of terminal according to detected ambient light line strength.
In sum, the method that the embodiment of the invention provides by determining the time interval under the current time, and arranges after the background color and font color of the page according to the time interval of determining, according to the background color and the font color display page that arrange, expanded the mode that the page shows; Because background color and the font color of the page can be adjusted in real time according to the time interval under the current time, make that background color and the font color of page displayed are comparatively diversified, and can change automatically within a certain period of time, prevent user's visual fatigue.
Embodiment two
In order to improve the effect that the page shows, the embodiment of the invention provides a kind of method of display page.The embodiment of the invention mainly is applied to illustrate in the terminal with the method with this display page, and this terminal can comprise smart mobile phone, panel computer, notebook computer, E-book reader, pocket computer on knee and desk-top computer etc.In conjunction with the content of above-described embodiment one, referring to Fig. 2, the method flow that the embodiment of the invention provides comprises:
201: determine the current time.
At this step, the embodiment of the invention is intended to adopt different background color and font color display page in the different time interval, thereby makes the comparatively variation of demonstration of the terminal page, therefore, at first needs to determine the current time.Current time can determine that can be obtained by terminal, the embodiment of the invention does not specifically limit this yet by the time that the built-in timer of terminal records from internet or other equipment.
In the specific implementation, because the current time is constantly to change, therefore, terminal can be determined the current time in real time.After determining the current time, continue to carry out subsequent step 202 to step 204 to carry out the demonstration of the page.
202: the time interval in a plurality of time intervals of dividing in advance under definite current time.
In this step, can divide a plurality of time intervals in advance.Wherein, can with one day be the cycle, one day 24 hours are divided into a plurality of time intervals, can also or 1 year be time division in cycle interval with a week; And when interval in the time division, the length of each time interval can be identical or different, and the embodiment of the invention does not all specifically limit the cycle in time division interval and the length of each time interval at this.
After in step 201, determining the current time, can in a plurality of time intervals of dividing in advance, determine the time interval under the current time.
For example, can be divided into 48 time intervals with one day 24 hours in advance, per half an hour is a time interval.After determining that in step 201 current time is 12:05, determine that in 24 time intervals that set in advance the time interval under the current time is [12:00-12:30].
203: background color and font color that the page is set according to the time interval of determining.
Preferably, according to the time interval of determining background color and the font color of the page are set, comprise:
Obtain background color and the font color of definite time interval correspondence according to the corresponding relation of the time interval that sets in advance and background color and font color, and the background color that obtains and font color are set to background color and the font color of the page.
When setting in advance the corresponding relation of each intensity interval and background color and font color, in order to make the comparatively variation of demonstration of the page, can different background colors and font color be set for each intensity interval; Simultaneously, for the user reads the literal of demonstration better, the setting of font color is normally relevant with background color, can be set to the color bigger with the contrast of background color by font color, and the embodiment of the invention limits at this.And the background color of each intensity interval correspondence and font color can be one or more, and the embodiment of the invention does not specifically limit the background color of setting and concrete color and the number of font color at this.
Behind the corresponding relation that pre-sets time interval and background color and font color, can obtain background color and the font color of definite time interval correspondence according to the corresponding relation of the time interval that sets in advance and background color and font color.If the corresponding multiple background color of the time interval of determining and font color then can therefrom be selected a kind of background color and font color arbitrarily, the embodiment of the invention does not specifically limit at this.
For instance, after time interval in step 202 under definite current time is [12:00-12:30], according to the faint yellow and font color dark-brown of the corresponding background color in the corresponding relation acquisition time interval [12:00-12:30] of the time interval that sets in advance and background color and font color, the background color that gets access to and font color are set to background color and the font color of the page.
Except the above-mentioned mode that the background color of the page and font color be set according to the ambient light line strength, can also adopt other according to the ambient light line strength mode of background color and the font color of the page to be set, the embodiment of the invention does not specifically limit this.
204: according to the background color and the font color display page that arrange.
At this step, behind setting completed background color and the font color, can be according to the background color and the font color display page that arrange.When concrete display page, because terminal normally adopts application program display page in the terminal, the mode difference of different application program display pages.Only describe in the mode of the browser display page below:
Browser in the terminal at first obtains network address corresponding page document according to network address, and resolves page documents, obtains corresponding DOM(Document Object Model, document dbject model) tree and Render(be painted) set.Wherein, comprise the information of the page in the dom tree, for example literal, image content etc.; The Render tree comprises the layout information of the page.Comprise a plurality of Render Object(colored object in the Render tree) node, the position of each Render Object node is determined by the size of terminal screen and the size of font, and the background color of Render Object node and font color need to arrange.When display page, the built-in render engine of browser need be drawn each Render Object node, when drawing each Render Object node, play up Render Object node position background and font according to the background color and the font color that arrange.When the background of each the Render Object node in the Render tree and font play up according to the background color that arranges and font color finish after, browser will be played up on the screen that the page that finishes is presented at terminal.
If browser has a plurality of pages, then can show each page according to background color and the font color of Set For Current.If when background color and font color were set, the corresponding multiple background color of definite time interval and font color can be each page setup different background color and font color in the step 203, the embodiment of the invention does not specifically limit this.
Preferably, because the display effect of the background color of the page and font color and extraneous light have bigger related, and at one time in the interval, the ambient light line strength is constantly to change, therefore, except arranging according to the time interval under the current time to step 204 background color and font color and display page of the page in above-mentioned steps 201, can also reset background color and font color and the display page of the page further according to the ambient light line strength.After according to the background color that arranges and font color display page, also comprise the steps:
Detect the ambient light line strength, and in a plurality of intensity interval of dividing in advance, determine the intensity interval under the detected ambient light line strength; Reset background color and the font color of the page according to the intensity interval of determining, and according to the background color of resetting and font color display page.
Wherein, the ambient light line strength is the light intensity in the residing environment of terminal.When definite ambient light line strength, present embodiment does not determine that to concrete mode limits.For example, can in terminal, dispose photoreceptor, detect the ambient light line strength by photoreceptor.In addition, can also adopt other modes to determine the ambient light line strength, the embodiment of the invention does not specifically limit this.
In the specific implementation, also need to divide in advance a plurality of intensity interval, the length of each intensity interval can be identical or different, and the embodiment of the invention does not specifically limit the number of the intensity interval of dividing and the length of each intensity interval at this.
After the intensity interval of having determined under the detected ambient light line strength, can reset background color and the font color of the page according to the intensity interval of determining.Preferably, reset the background color of the page and the mode of font color comprises according to the intensity interval of determining: obtain background color and the font color of definite intensity interval correspondence according to the corresponding relation of the intensity interval that sets in advance and background color and font color, and background color and font color that the background color that obtains and font color are re-set as the described page.
When setting in advance the corresponding relation of each intensity interval and background color and font color, read the literal of demonstration better for the user, when the indicated light intensity of intensity interval is strong, corresponding background color can be set for dark-coloured, corresponding font color is light tone, when the indicated light intensity of intensity interval was more weak, it was light tone that corresponding background color can be set, and corresponding font color is light tone; And the background color of each intensity interval correspondence and font color also can be for multiple, and the embodiment of the invention does not specifically limit the background color of setting and concrete color and the number of font color at this.
Behind the corresponding relation that sets in advance finish intensity interval and background color and font color, can obtain background color and the font color of definite intensity interval correspondence according to the corresponding relation of the intensity interval that sets in advance and background color and font color.If the corresponding multiple background color of the intensity interval of determining and font color then can therefrom be selected a kind of background color and font color arbitrarily, the embodiment of the invention does not specifically limit at this.
Except the above-mentioned mode of resetting the background color of the page and font color according to the ambient light line strength, can also adopt other to reset the mode of background color and the font color of the page according to the ambient light line strength, the embodiment of the invention does not specifically limit this.
After the background color of resetting the page that finishes and font color, can be according to the background color of resetting and font color display page.The mode of concrete display page is identical with the mode of above-mentioned steps 204, does not repeat them here.
In addition, after the background color and font color display page according to setting in step 204, except continuing to reset according to the ambient light line strength background color and font color and the display page of the page, can also adjust the screen intensity of terminal according to detected ambient light line strength.
Because the background color that arranges and font color are to arrange according to the time interval under the current time, though still can reset background color and the font color of the page at one time in the interval according to the intensity interval under the ambient light line strength, yet at one time in the interval, certain variation takes place the ambient light line strength but affiliated intensity interval is still constant, and the background color of setting and the display effect of font color also have certain difference.Therefore, change the influence that the display effect to the page causes in order to reduce extraneous light, can also adjust the screen intensity of terminal according to the ambient light line strength.When extraneous light is strong, can improve the screen intensity of terminal, and when extraneous light is more weak, can reduce the screen intensity of terminal, thereby make the user when extraneous light changes a lot, still can clearly watch background color and the font color page displayed according to Set For Current.Certainly, above-mentioned reset the background color and font color of the page according to the ambient light line strength after, also can continue to adjust according to the ambient light line strength screen intensity of terminal, the embodiment of the invention does not specifically limit at this.
Need to prove, in actual applications, continuous variation along with the time, can continue to carry out above-mentioned steps 201 to step 204, background color and font color with real-time adjustment page displayed, make the user when watching page displayed, the visual fatigue that the background color that changes according to time interval and font color can prevent the user.And, for better display effect, at one time in the interval, reset background color and the font color of the page or adjust the brightness of the screen of terminal according to the ambient light line strength according to the ambient light line strength.
In sum, the method that the embodiment of the invention provides by determining the time interval under the current time, and arranges after the background color and font color of the page according to the time interval of determining, according to the background color and the font color display page that arrange, expanded the mode that the page shows; Because background color and the font color of the page can be adjusted in real time according to the time interval under the current time, make that background color and the font color of page displayed are comparatively diversified, and can change automatically within a certain period of time, prevent user's visual fatigue.And at one time in the interval, can also reset the background color of the page and font color or adjust the brightness of the screen of terminal according to the ambient light line strength according to the ambient light line strength, thereby the visuality that has kept the page has improved the display effect of the page.
Embodiment three
The embodiment of the invention provides a kind of terminal, and this terminal be used for to be carried out the method for the display page that above-described embodiment one or embodiment two provide.Referring to Fig. 3, this terminal comprises:
First determination module 301 is used for determining the current time;
Second determination module 302 is used for the time interval under the current time that definite first determination module 301 of a plurality of time intervals of dividing is in advance determined;
First arranges module 303, is used for arranging according to the time interval that second determination module 302 is determined background color and the font color of the page;
First display module 304 is used for according to first background color and the font color display page that module 303 arranges being set.
Preferably, referring to Fig. 4, first arranges module 303, comprising:
Acquiring unit 3031 is used for obtaining according to the corresponding relation of the time interval that sets in advance and background color and font color background color and the font color of definite time interval correspondence;
Unit 3032 is set, is used for background color and font color that background color that acquiring unit 3031 obtains and font color are set to the page.
Preferably, referring to Fig. 5, this terminal also comprises:
Detection module 305 is for detection of the ambient light line strength;
The 3rd determination module 306 is used for the intensity interval under a plurality of intensity interval of dividing are in advance determined detection module 305 detected ambient light line strengths;
Second arranges module 307, is used for redefining according to the intensity interval that the 3rd determination module 306 is determined background color and the font color of the page;
Second display module 308 is used for according to second background color and the font color display page that module 307 is reset being set.
Preferably, referring to Fig. 6, second arranges module 307, comprising:
Acquiring unit 3071 is used for obtaining according to the corresponding relation of the intensity interval that sets in advance and background color and font color background color and the font color of definite intensity interval correspondence;
Unit 3072 is set, is used for background color and font color that background color that acquiring unit 3071 is obtained and font color are re-set as the page.
Preferably, referring to Fig. 7, this terminal also comprises:
Adjusting module 309 is used for the screen intensity according to detected ambient light line strength adjustment terminal.
In sum, the terminal that the embodiment of the invention provides by determining the time interval under the current time, and arranges after the background color and font color of the page according to the time interval of determining, according to the background color and the font color display page that arrange, expanded the mode that the page shows; Because background color and the font color of the page can be adjusted in real time according to the time interval under the current time, make that background color and the font color of page displayed are comparatively diversified, and can change automatically within a certain period of time, prevent user's visual fatigue.And at one time in the interval, can also reset the background color of the page and font color or adjust the brightness of the screen of terminal according to the ambient light line strength according to the ambient light line strength, thereby the visuality that has kept the page has improved the display effect of the page.
Embodiment four
The embodiment of the invention provides a kind of equipment of display page, and the equipment of the display page in the embodiment of the invention can comprise one or more following ingredients: be used for the processor that computer program instructs to finish various flow processs and method, be used for information and stored program instruction incoming memory (RAM) and ROM (read-only memory) (ROM) at random, the storer that is used for storage data and information, the database that is used for storage form, catalogue or other data structures, I/O equipment, the interface, antenna etc.
In the embodiment of the invention, computer program instructions is stored in the storer with the form of one or more modules and is configured to and carried out by processor, and above-mentioned one or more modules have following function:
Determine the current time, and in a plurality of time intervals of dividing in advance, determine the time interval under the described current time;
Background color and the font color of the page are set according to the time interval of determining;
Show the described page according to the background color and the font color that arrange.
The embodiment of above-mentioned functions describes in detail in method embodiment for example, repeats no more here.
In sum, the equipment that the embodiment of the invention provides by determining the time interval under the current time, and arranges after the background color and font color of the page according to the time interval of determining, according to the background color and the font color display page that arrange, expanded the mode that the page shows; Because background color and the font color of the page can be adjusted in real time according to the time interval under the current time, make that background color and the font color of page displayed are comparatively diversified, and can change automatically within a certain period of time, prevent user's visual fatigue.And at one time in the interval, can also reset the background color of the page and font color or adjust the brightness of the screen of terminal according to the ambient light line strength according to the ambient light line strength, thereby the visuality that has kept the page has improved the display effect of the page.
Need to prove: the terminal that above-described embodiment provides is when display page, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the inner structure that is about to terminal is divided into different functional modules, to finish all or part of function described above.In addition, the terminal that above-described embodiment provides and the method embodiment of display page belong to same design, and its specific implementation process sees method embodiment for details, repeats no more here.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can instruct relevant hardware to finish by program, 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 above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.