Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Introduce the software interface implementation method that the embodiment of the invention provides earlier, Fig. 1 has described the flow process of the software interface implementation method embodiment one that the embodiment of the invention provides, comprising:
101, intercept and capture the navigation event of embedded display unit, navigation event comprises the URL(uniform resource locator) (URL:Universal Resource Locator) of display unit default treatment;
Wherein, the display unit in the embodiment of the invention can be the device that browser kernel or other can the display page files; Because general browser kernel all provides the interface to outer package, can pass through these interfaces embedded browser kernel in terminal software, therefore the browser kernel in the embodiment of the invention can be any browser kernel that provides the interface of outer package, embedded browser kernel can be the Internet detector (Internet Explorer) of company of Microsoft (Microsoft), perhaps red fox (Firefox) of Netscape (Mozilla) company etc.
The default action of navigation event is to show the corresponding page according to URL, because can giving tacit consent to when opening, display unit opens a page, and the embodiment of the invention uses the display unit page displayed as software interface, therefore in order to make directly software for display interface corresponding page file of display unit, need to intercept and capture the navigation event of display unit, thereby the URL that navigation event comprises is upgraded.Particularly, can intercept and capture navigation event by the package interface that display unit provides.
102, use embedded script interpretation unit calls script file to generate pagefile;
The script Interpretation unit can be carried out script, therefore can use script pagination face file, and then uses display unit to show that this pagefile is as software interface.Script file comprises the code of writing with script, just can carry out the code in the script file behind the script interpretation unit calls script file, thereby generates pagefile.
Wherein, when just opening a terminal software, can show the software interface of acquiescence, therefore this moment, the script Interpretation unit should be called the script file generation pagefile of acquiescence, thereby showed the software interface of acquiescence at display unit.Wherein, need to prove, because when opening a terminal software for the first time, it can all be the software interface that shows acquiescence at every turn, then the script file that this moment, the script Interpretation unit can be called acquiescence in the navigation event of intercepting and capturing display unit generates pagefile, thus this moment 101 and 102 sequencings in the execution not.
Certainly, the software interface that need show when opening a terminal software is also uncertain or when needing the update software interface in the use of software, then 102 should after 101, carry out, because after only in 101, having intercepted and captured the navigation event of display unit and having known the URL of default treatment, can determine corresponding script file according to the URL of default treatment, and then generate pagefile according to this script file by the script Interpretation unit.
103, use pagefile to upgrade the URL of default treatment;
The form of URL is " an agreement name: // page address ", and the agreement name of acquiescence has http, https, ftp etc., and display unit just can show corresponding page according to agreement name and page address after having obtained URL; Because being the code according to script, the pagefile in the embodiment of the invention generates, therefore in order to make display unit display page file correctly, need the URL in the navigation event be upgraded, the URL after the renewal can comprise the filename and the store path of the pagefile that the script Interpretation unit generates; A kind of concrete renewal process that the embodiment of the invention provides can be as follows:
Suppose that the script agreement is called tcl, corresponding script file is " d: default.tcl ", then the URL of display unit default treatment be " tcl: //d: default.tcl "; After terminal software has been intercepted and captured the navigation event of display unit, just can use built-in script Interpretation unit carry out the URL of display unit default treatment " tcl: //d: default.tcl ", suppose that the pagefile that generates is " d: default.html ", URL after then upgrading be " file: //d: default.html ", the URL corresponding page file of display unit after just can display update promptly directly shows default.html.
Wherein the script agreement name of script file correspondence is different and different according to the script that uses, and script agreement name commonly used has tcl, python, ruby, lua etc.
104, use the navigation event of the URL heavy duty display unit after upgrading;
Owing to intercepted and captured the navigation event of display unit, therefore in order to make the pagefile of display unit display script Interpretation unit generation correctly, need to use the navigation event of the URL heavy duty display unit after upgrading, particularly, the package interface that can provide by display unit uses the URL heavy duty navigation event after upgrading.
105, use display unit according to the URL display page file after upgrading.
In heavy duty after the navigation event of display unit, display unit just can be according to the URL display page file after upgrading, i.e. software for display interface.
From the above, the embodiment of the invention is embedded display unit and script Interpretation unit in terminal software, therefore can generate pagefile according to script file by the script Interpretation unit, and then pass through display unit display page file as software interface, therefore only need write corresponding script file, just can realize a plurality of software interfaces of terminal software for each software interface.And, because the embodiment of the invention uses script file to generate pagefile, software interface at different terminal softwares has not simultaneously, can be with the difference of software interface as variable, and do not need to revise the code of other positions, therefore the code of software interface can just can be reused without excessive modification, thereby has improved the reusability of the code of software interface; Secondly,, carry out interface development with use MFC and compare, can reduce the size of code that to write owing to used the script development interface; Simultaneously, when made amendment in the interface, do not need just to compile and to see effect; Once more, owing to used pagefile as software interface, the interface of making can better appearance.
Fig. 2 has described the flow process of the software interface implementation method embodiment two that the embodiment of the invention provides, comprising:
201, intercept and capture the navigation event of embedded display unit, navigation event comprises the URL of display unit default treatment;
This step is carried out with reference to 101.
If the agreement name of the URL of display unit default treatment is a script agreement name; Enter 202; If the agreement name of the URL of display unit default treatment is not a script agreement name, enter 206.
The display speed of software interface when opening in order to accelerate terminal software can generate and preserve some pagefiles in advance, thereby does not need the script Interpretation unit to generate when needs show these pagefiles; For example, can in advance the software interface of giving tacit consent to be generated pagefile, and the default page that display unit is opened is revised as this pagefile; The software interface corresponding page file of assumed by default is " d: default.html ", then can be provided with default page that display unit opens for " file: //d: default.html ";
When the URL of display unit default treatment directly is exactly the manageable URL of display unit, do not need to generate pagefile by the script Interpretation unit, can improve the display speed of software interface, improve the user's of terminal software user experience.
202, use embedded script interpretation unit calls script file to generate pagefile;
This step is when carrying out, if display unit does not obtain user's operation information, be that the user has just opened a terminal software need show the software interface of acquiescence the time, the script interpretation unit calls be the script file of acquiescence, use this moment embedded script interpretation unit calls script file to generate pagefile and specifically comprise: the script file generation pagefile that uses embedded script interpretation unit calls acquiescence;
This step is when carrying out, if display unit has obtained user's operation information, be that the user has selected some when operation on the interface, the user's who is with obtains of script interpretation unit calls the corresponding script file of operation information uses embedded script interpretation unit calls script file to generate pagefile and specifically comprises: use the embedded script interpretation unit calls script file corresponding with operation information to generate pagefile this moment.Further, if user's operation information has comprised business operation, the script Interpretation unit also needs to carry out business operation according to the script file corresponding with operation information; For example, the operation information that the user selects is certain user's of deletion a information, then the script Interpretation unit need be carried out this business operation of information of deletion user, also to generate new pagefile simultaneously according to script, new pagefile can show this user's information deleted information.Be understandable that, when having obtained user's operation information, might not have the corresponding service operation, because if user's operation information only is to enter another interface, then only need to carry out the script file corresponding, generate pagefile with this another interface.
Wherein, need to prove that 201 and 202 do not have sequencing on carrying out.
203, use pagefile to upgrade the URL of default treatment;
This step is carried out with reference to 103.
204, use the navigation event of the URL heavy duty display unit after upgrading;
This step is carried out with reference to 104.
205, use display unit according to the URL display page file after upgrading; Enter 207;
This step is carried out with reference to 105.
206, display unit is according to the URL display page file of display unit default treatment;
Because the URL of display unit default treatment is exactly the URL that display unit can directly be handled, thus display unit can be directly according to the URL display page file of display unit default treatment.
207, display unit obtains the operation information of user on the page, enters step 201.
The user is when the enterprising line operate of the page, and operation information all can be shown the unit and obtain, and has clicked certain connection as the user, has selected certain option etc.Because after the user has carried out certain operation, general all can be corresponding the variation of software interface, therefore having obtained the user enters the step that step 201 can repeat present embodiment behind the operation information on the page, allow display unit show the different pages, thereby the result who can the instant playback user operates satisfies user's needs.
More than software interface implementation method that the embodiment of the invention is provided introduce, the following software interface implement device that the embodiment of the invention is provided is introduced, the software interface implement device that the embodiment of the invention provides can use script to realize software interface, Fig. 3 has described the structure of the software interface implement device embodiment one that the embodiment of the invention provides, comprising:
Intercept and capture unit 301, be used to intercept and capture the navigation event of display unit, navigation event comprises the URL of display unit default treatment;
Script Interpretation unit 302 is used for the invoke script file and generates pagefile, this script file for the script file of acquiescence or with the corresponding script file of URL of intercepting and capturing the display unit default treatment that the navigation event intercepted and captured unit 301 comprises;
Wherein, the script Interpretation unit specifically can be a script interpreter.
Updating block 303, the page literary composition that is used to use script Interpretation unit 302 to generate upgrades URL;
Heavy duty unit 304, the navigation event of the URL heavy duty display unit after being used to use updating block 303 to upgrade;
Display unit 305 is used for the navigation event display page file according to 304 heavy duties of heavily loaded unit.
Wherein, display unit specifically can be the browser kernel.
From the above, the embodiment of the invention of software interface implement device is embedded display unit and script Interpretation unit, therefore can generate pagefile according to script file by the script Interpretation unit, and then pass through display unit display page file as software interface, therefore only need write corresponding script file, just can realize a plurality of software interfaces of terminal software for each software interface.And, because the embodiment of the invention uses script file to generate pagefile, software interface at different terminal softwares has not simultaneously, can be with the difference of software interface as variable, and do not need to revise the code of other positions, therefore the code of software interface can just can be reused without excessive modification, thereby has improved the reusability of the code of software interface; Secondly,, carry out interface development with use MFC and compare, can reduce the size of code that to write owing to used the script development interface; Simultaneously, when made amendment in the interface, do not need just to compile and to see effect; Once more, owing to used pagefile as software interface, the interface of making can better appearance.
The structure of the embodiment two of the software interface implement device that the embodiment of the invention provides comprises also as shown in Figure 3:
Intercept and capture unit 301, be used to intercept and capture the navigation event of display unit, navigation event comprises the URL of display unit default treatment;
Script Interpretation unit 302 is used for when the agreement name of the URL of display unit default treatment is script agreement name, and the invoke script file generates pagefile;
Updating block 303, the pagefile that is used to use script Interpretation unit 302 to generate upgrades URL;
Heavy duty unit 304, the navigation event of the URL heavy duty display unit after being used to use updating block 303 to upgrade;
Display unit 305 is used for the navigation event display page file according to 304 heavy duties of heavily loaded unit; When the agreement name of the URL of display unit default treatment is not script agreement name, according to the URL display page file of display unit default treatment.
From the above, when present embodiment directly is exactly the manageable URL of display unit at the URL of display unit default treatment, do not need to generate pagefile, can improve the display speed of software interface, improve the user's of terminal software user experience by the script Interpretation unit.
Further, the included display unit of software interface implement device that provides of the embodiment of the invention can also be used to obtain the operation information of user on the page; At this moment, intercept and capture the unit, be used for after display unit has obtained described operation information, intercept and capture the navigation event of display unit; The new software interface that should show after thereby explicit user is operated.Wherein, if the operation information of user on the page comprised business operation, the script Interpretation unit generates the pagefile according to user's operation information invoke script except being used for, also be used for carrying out business operation, and the result of business operation can be embodied directly on the software interface according to the script file corresponding with operation information.Therefore can allow display unit show the different pages, thereby the result that the instant playback user operates satisfy user's needs.
When on terminal software, using the software interface implement device that the embodiment of the invention provides, the different software interface of software interface implement device demonstration that can provide by the embodiment of the invention just.
The embodiment of the invention also provides a kind of terminal, and this terminal comprises the above-mentioned software interface implement device that the embodiment of the invention provides.
The terminal that the embodiment of the invention provides can be PC (PC), mobile phone, palm PC (PPC), notebook (Notebook), net book (Netbook) etc.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-OnlyMemory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
More than software interface implementation method, device and terminal that the embodiment of the invention provided are described in detail, the explanation of above embodiment just is used for help understanding method of the present invention and thought thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.