CN106126685B - Page loading method and device - Google Patents
Page loading method and device Download PDFInfo
- Publication number
- CN106126685B CN106126685B CN201610499045.7A CN201610499045A CN106126685B CN 106126685 B CN106126685 B CN 106126685B CN 201610499045 A CN201610499045 A CN 201610499045A CN 106126685 B CN106126685 B CN 106126685B
- Authority
- CN
- China
- Prior art keywords
- page
- loaded
- specified
- application
- list
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/972—Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Present disclose provides a kind of page loading method and devices, belong to network technique field.Method includes: in starting in application, obtaining the specified page list of the page address using specified page from server, and the page code of specified page is stored in using local;When receiving the page load request for carrying the page address of the page to be loaded, judge in specified page list whether include the page to be loaded page address;If not including, the page to be loaded is loaded from server;If including from the local page code for calling the page to be loaded of application to load the page to be loaded.The specified page list that the disclosure passes through application, it clearly can be from page application local load and can loaded from server, so that in application and development, the more demanding function of timeliness can be realized using local code, the lower code using server end is required to realize timeliness, it ensure that page loading efficiency, shorten the development cycle.
Description
Technical field
This disclosure relates to network technique field more particularly to a kind of page loading method and device.
Background technique
With the development of network technology, many applications all have page load function and allow the user to carry out in the application
Page browsing.The realization code of the commonly used page is stored in server end, loads using by built-in browser from server
The corresponding page.However, the loading velocity of this kind of page loading method is slower, it is unable to satisfy the higher and higher page load of user
The demand of speed.
In the related technology, in order to meet requirement of the user to page loading velocity, in development and application, using local code
Included each page is applied to realize, that is to say, the realization code wrap of included each page will be applied to application
Installation kit in so that using in the process of running, local code can be called directly with loading page, without from server
The corresponding page is loaded, ensure that the speed of page load.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of page loading method and device, the technology
Scheme is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of page loading method is provided, which comprises
In starting in application, obtaining the specified page list of the application from server, wrapped in the specified page list
The page address of the specified page of the application is included, it is local that the page code of the specified page is stored in the application;
When receiving page load request, judge in the specified page list whether include the page to be loaded the page
Address carries the page address of the page to be loaded in the page load request;
If not including the page address of the page to be loaded in the specified page list, added according to the page
Request is carried, loads the page to be loaded from server;
If in the specified page list including the page address of the page to be loaded, locally adjusted from the application
With the page code of the page to be loaded to load the page to be loaded.
It in one possible implementation, further include the page mark of the specified page in the specified page list
To know, the page address of the page iden-tity of the specified page and the specified page corresponds,
Correspondingly, it if including the page address of the page to be loaded in the specified page list, is answered from described
Include: to load the page to be loaded with the local page code for calling the page to be loaded
According to the page address of the page to be loaded, from the specified page list, obtain and the page to be loaded
The page iden-tity of the corresponding page to be loaded in the page address in face;
According to the page iden-tity of the page to be loaded, from the page code being locally stored, the page to be loaded is obtained
Page code and corresponding page iden-tity has been locally stored in the page code in face, the application;
Load the page code of the page to be loaded.
In one possible implementation, described according to the page load request, it is loaded from server described to be added
Carrying the page includes:
By the built-in browser of the application, Xiang Suoshu server sends the page load request, by the service
The page address for the page to be loaded that device is carried according to the page load request returns to the page to be loaded;
Receive the page to be loaded that the server returns;
The page to be loaded is loaded.
In one possible implementation, the specified page list further includes the version letter of the specified page list
Breath, the method also includes:
If in the specified page list including the page address of the page to be loaded, the specified page column are judged
Whether the version information of table is consistent with the version information of the application;
If the version information of the specified page list is consistent with the version information of the application, execution is answered from described
The step of with the local page code for calling the page to be loaded to load the page to be loaded;
If the version information of the specified page list and the version information of the application are inconsistent, execute according to institute
The step of stating page load request, loading the page to be loaded from server.
In one possible implementation, described from the local page code for calling the page to be loaded of the application
After loading the page to be loaded, the method also includes:
In the operational process of the page code of the page to be loaded, if detecting the local of the page to be loaded
The step of error information of code then executes according to the page load request, loads the page to be loaded from server.
According to the second aspect of an embodiment of the present disclosure, a kind of page loading device is provided, described device includes:
Obtain module, in starting in application, obtain the specified page list of the application from server, it is described specified
The page address of specified page in page listings including the application, the page code of the specified page are stored in described answer
With local;
Judgment module, for when receiving page load request, judge in the specified page list whether include to
The page address of loading page carries the page address of the page to be loaded in the page load request;
Loading module, if for do not include in the specified page list page to be loaded page address,
According to the page load request, the page to be loaded is loaded from server;
If the loading module is used for the page address in the specified page list including the page to be loaded,
From the local page code for calling the page to be loaded of the application to load the page to be loaded.
It in one possible implementation, further include the page mark of the specified page in the specified page list
To know, the page address of the page iden-tity of the specified page and the specified page corresponds,
Correspondingly, the loading module is used for the page address according to the page to be loaded, arranges from the specified page
In table, the page iden-tity of the page to be loaded corresponding with the page address of the page to be loaded is obtained;According to it is described to
The page iden-tity of loading page obtains the page code of the page to be loaded from the page code being locally stored, described to answer
With page code and corresponding page iden-tity has been locally stored;Load the page code of the page to be loaded.
In one possible implementation, the loading module is used for the built-in browser by the application, to institute
It states server and sends the page load request, carried by the server according to the page load request described to be loaded
The page address of the page returns to the page to be loaded;Receive the page to be loaded that the server returns;To it is described to
Loading page is loaded.
In one possible implementation, the specified page list further includes the version letter of the specified page list
Breath,
If the judgment module is also used to the page address in the specified page list including the page to be loaded,
Whether the version information for judging the specified page list is consistent with the version information of the application;
If the loading module is also used to the version information of the specified page list and the version information of the application
Unanimously, then the step that the page to be loaded is loaded from the local page code for calling the page to be loaded of the application is executed
Suddenly;
If the loading module is also used to the version information of the specified page list and the version information of the application
It is inconsistent, then the step of executing according to the page load request, load the page to be loaded from server.
In one possible implementation, the loading module is also used to the page code in the page to be loaded
In operational process, if detecting the error information of the local code of the page to be loaded, execution adds according to the page
The step of carrying request, loading the page to be loaded from server.
According to the third aspect of an embodiment of the present disclosure, a kind of page loading device is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: starting in application, from server obtain the application specified page column
Table includes the page address of the specified page of the application, the page code of the specified page in the specified page list
It is local to be stored in the application;When receiving page load request, judge in the specified page list whether to include to be added
The page address of the page is carried, the page address of the page to be loaded is carried in the page load request;If described specified
Do not include the page address of the page to be loaded in page listings, then according to the page load request, is loaded from server
The page to be loaded;If including the page address of the page to be loaded in the specified page list, answered from described
With the local page code for calling the page to be loaded to load the page to be loaded.
The technical scheme provided by this disclosed embodiment can include the following benefits:
By obtaining the specified page list of application from server, it can clearly know which page of application can be from answering
With local load, which page needs to load from server, so that during application and development, it can be more demanding by timeliness
Function using local code realize, by timeliness require lower function using server end code realize, it is not necessary to all pages
Face code is all made of local code realization, while ensure that page loading efficiency, shortens the development cycle.Further, when
When business demand changes, respective page code first can be realized in server end, so that application can timely update to meet
The variation demand of business.After the completion of the exploitation of the local code of respective page, then the update of local code is carried out, so that using energy
Enough iteratively fasters are online, improve update efficiency.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of page loading method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of page loading method shown according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of page loading device shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of page loading device shown according to an exemplary embodiment.
Specific embodiment
To keep the purposes, technical schemes and advantages of the disclosure clearer, below in conjunction with attached drawing to disclosure embodiment party
Formula is described in further detail.
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of page loading method shown according to an exemplary embodiment, as shown in Figure 1, the party
Method is in mobile terminal, comprising the following steps:
In a step 101, in starting in application, obtaining the specified page list of application, specified page list from server
In include application specified page page address, the page code of specified page is stored in using local.
In a step 102, when receiving page load request, judge in specified page list whether to include page to be loaded
The page address in face carries the page address of the page to be loaded in the page load request.If not including, then follow the steps
103;If including thening follow the steps 104.
In step 103, if not including the page address of the page to be loaded in specified page list, added according to the page
Request is carried, loads the page to be loaded from server.
At step 104, it if in specified page list including the page address of the page to be loaded, is adjusted from application is local
With the page code of the page to be loaded to load the page to be loaded.
The method that the embodiment of the present disclosure provides can be obtained clearly by obtaining the specified page list of application from server
Know which page of application can be from the local load of application, which page needs to load from server, so that in application and development
In the process, the more demanding function of timeliness can be realized using local code, requires lower function using service timeliness
The code at device end is realized, it is not necessary to all page codes are all made of local code realization, while ensure that page loading efficiency,
Shorten the development cycle.Further, when business demand changes, respective page code first can be realized in server end, with
Just application can timely update to meet the variation demand of business.After the completion of the exploitation of the local code of respective page, then carry out
The update of local code so that using can iteratively faster it is online, improve update efficiency.
It in one possible implementation, further include the page iden-tity of specified page, specific page in specified page list
The page iden-tity in face and the page address of specified page correspond,
Correspondingly, if in specified page list including the page address of the page to be loaded, from application it is local call to
The page code of loading page includes: to load the page to be loaded
According to the page address of the page to be loaded, from specified page list, the page address with the page to be loaded is obtained
The page iden-tity of the corresponding page to be loaded;
According to the page iden-tity of the page to be loaded, from the page code being locally stored, the page of the page to be loaded is obtained
Code, using page code and corresponding page iden-tity has been locally stored;
Load the page code of the page to be loaded.
In one possible implementation, according to page load request, loading the page to be loaded from server includes:
By the built-in browser of application, page load request is sent to server, is asked by server according to page load
The page address of the page to be loaded of carrying is asked to return to the page to be loaded;
Receive the page to be loaded that server returns;
Loading page is treated to be loaded.
In one possible implementation, specified page list further includes the version information of specified page list, method
Further include:
If including the page address of the page to be loaded in specified page list, the version information of specified page list is judged
It is whether consistent with the version information of application;
If the version information of specified page list is consistent with the version information of application, execute from application it is local call to
The step of page code of loading page is to load the page to be loaded;
If the version information of specified page list and the version information of application are inconsistent, execute and asked according to page load
The step of asking, loading the page to be loaded from server.
In one possible implementation, to be loaded to load from the local page code for calling the page to be loaded of application
After the page, method further include:
In the operational process of the page code of the page to be loaded, if detecting the report of the local code of the page to be loaded
The step of wrong information then executes according to page load request, loads the page to be loaded from server.
All the above alternatives can form the alternative embodiment of the disclosure, herein no longer using any combination
It repeats one by one.
Fig. 2 is a kind of flow chart of page loading method shown according to an exemplary embodiment, as shown in Fig. 2, the party
Method is in terminal, comprising the following steps:
In step 201, in starting in application, obtaining the specified page list of application from server, which is arranged
It include the page address of the specified page of application in table, the page code of specified page is stored in using local.
In the embodiments of the present disclosure, application is installed, which can apply (such as instant messaging for social category on mobile terminal
Class application etc.), e-commerce application etc., it is not limited in this embodiment of the present disclosure.It include more for any application
A function, the corresponding one or more pages of each function.For example, the payment function counterpart expenditure page and payment success page
Deng.
During application and development, the function of application can be accomplished in the following manner:
The first implementation, is realized by the way of local code, that is to say, by the page code of function corresponding page
In the installation kit of application, so that the page code of function corresponding page is stored in using local.
It, can be by way of calling local code come loading page for the first implementation.Specifically, mobile terminal
Can page directly be carried out using local Native by calling local code to carry out page load, and during page load
Face rendering, page loading velocity are fast.
Second of implementation is realized using the page code of server end, be that is to say, by the page of function corresponding page
Code is stored in server end, and the page code of server storage is accessed by the built-in browser of application, corresponding to realize
Function.This kind of mode is accomplished that the web edition of function.
It, can be by the built-in browser of application from server loading page for second of implementation.Specifically, mobile
The page address that terminal is obtained according to built-in browser obtains corresponding page code from server, and then realizes page load.
Also, page rendering is carried out using built-in browser during page load, compared to the side for calling local code load
Loading velocity is slower for formula.
Due to the first above-mentioned implementation compared to above-mentioned second of implementation for, development difficulty is big, the period is long.
Therefore, in order to shorten the development cycle, while meeting demand of the user to the page loading velocity of application, can will apply in load
The higher page of rate request is realized by the way of local code, such as payment page etc.;Loading velocity will be required be not
The very high page is realized using the page code of server end.
It should be noted that server can record it for the page realized using local code, record it is interior
Appearance includes: the page address of the page and the one-to-one relationship of page iden-tity.Wherein, page address refers to for accession page
Web page interlinkage.Page iden-tity can be the filename of page file, such as " abc.html ";The page iden-tity can also be the page
Store path etc. of the file relative to application installation package, for example, the entitled app1 of application installation package, then the page iden-tity of the page can
For " app1 abc.html ", the embodiment of the present disclosure is not especially limited the specific representation of page iden-tity.
According to the one-to-one relationship of the page address of above-mentioned record and page iden-tity, server produces the specified of application
Page listings, the specified page list are used to indicate mobile terminal and are stored in this using the page code of which corresponding page
Ground, so that mobile terminal directly can call the page code of the application from local to carry out page load.
Wherein, server can carry out flexible configuration to the corresponding relationship for including in specified page list, for example, according to reality
Demand is added corresponding relationship included in specified page list, deletes, modifies.It uses in the embodiments of the present disclosure
The page that local code is realized can also store corresponding page code in server end, that is to say, can be added by local code
The page is carried, the page can also be loaded from server.In the specific implementation, which kind of mode the page is loaded using actually, it can be by
Server is configured according to practical business demand, wherein, can by the page of the page when needing using local code load
Location and page iden-tity corresponding relationship are added in specified page list, can not will be corresponding when needing to load the page from server
Corresponding relationship be added in specified page list.For example, page A is to the more demanding of loading velocity, and local code is it
When latest edition, just its page address and page iden-tity are added in specified page list, if the local code of page A is
Legacy version, and server end has the version of update, can delete its page address and page iden-tity from specified page list.
It that is to say, may include the correspondence of its page address and page iden-tity for the page that local code is realized, in specified page list
Relationship can also not include the corresponding relationship, improve the flexibility of page load.
In the embodiments of the present disclosure, mobile terminal can be from opportunity of specified page list that server obtains application,
The acquisition when detecting using starting perhaps obtains from server according to predetermined period or is updating specific page by server
After the list of face, directly updated specified page list is occurred to terminal, it is not limited in this embodiment of the present disclosure.Its
In, predetermined period can be preset or be modified by server, and it is not limited in this embodiment of the present disclosure.
Wherein, mobile terminal can obtain specified page list from server by preset interface, which can be by
Server is preset or is modified, or is set etc. by developer in application and development, and the embodiment of the present disclosure is to this
It is not especially limited.
In step 202, when receiving page load request, judge in specified page list whether to include page to be loaded
The page address in face carries the page address of the page to be loaded in the page load request.If not including, then follow the steps
203;If including thening follow the steps 204.
When application detects the trigger action of page load, page load request is generated, is taken in the page load request
The page load request is sent to mobile terminal later by the page address with the page to be loaded.Mobile terminal receives the page
After load request, according to the specified page list of acquisition, judge in the specified page list whether include the page to be loaded page
Face address, to determine the loading method of the page to be loaded.
When it is implemented, can increase page interception unit in the built-in browser of application, which is used for
Judge in specified page list whether include the page to be loaded page address.Specifically, mobile terminal is got from server
After specified page list, specified page list can be stored into page interception unit;Alternatively, mobile terminal arranges specified page
Table is stored into preset path, and the preset path is configured in page interception unit, so that page interception unit can obtain
Get the specified page list.When mobile terminal receives page load request, which is transferred to the page
Interception unit, by page interception unit complete judge in specified page list whether the step of the page address including the page to be loaded
Suddenly.It that is to say, for any page to be loaded, be required to the pre- interception unit for first passing through built-in browser and detected, according to
In specified page list whether include the page to be loaded page address testing result, to determine page loading method.
It should be noted that when storing specified page list, can be used the mode of caching to the specified page list into
Row storage.After mobile terminal gets new specified page list from server, the specified page just stored before covering is arranged
Table.Since the function that application includes is being constantly updated, so that the content in specified page list can also be constantly updated, therefore mobile
The specified page list of terminal buffers is likely in a short time will be expired, in order to avoid the wave of mobile terminal storage resource
Take, mobile terminal detects the specified page list that storage is removed when this applies out of service;Or removing is shown to user
Reminder message carries out removing etc. manually by user, and it is not limited in this embodiment of the present disclosure.
In step 203, if not including the page address of the page to be loaded in specified page list, added according to the page
Request is carried, loads the page to be loaded from server.
When it does not include the page address of the page to be loaded in specified page list that mobile terminal, which determines, determine that this is to be loaded
The page needs to load by the built-in browser of application from server.It that is to say, the page code of the page to be loaded is stored in
Server end, mobile terminal from server obtain corresponding page code to load the page to be loaded, and loading procedure can be with are as follows:
Mobile terminal sends page load request to server by the built-in browser of application, is asked by server according to page load
The page address of the page to be loaded of carrying is asked to return to the page to be loaded.Mobile terminal receives the page to be loaded that server returns
Face, and the page to be loaded is loaded.
In step 204, if in specified page list including the page address of the page to be loaded, judge that specified page arranges
Whether the version information of table and the version information of application are consistent.Wherein, specified page list further includes the version of specified page list
This information.If consistent, 205 are thened follow the steps;If it is inconsistent, executing step 206.
Wherein, version information is carried in specified page list, which is used to indicate the specified page list and is wrapped
The version of the corresponding application containing the page.If for example, the version information of specified page list be version1, then instruction it includes
The corresponding application version of the page is version1.
In one embodiment, mobile terminal can be in determining specified page list including the page of the page to be loaded
Behind location, directly from the local page code for calling the page to be loaded of application to load the page to be loaded, to guarantee page load speed
Degree.Wherein, the process and following step 205 of the page to be loaded are loaded from the local page code for calling the page to be loaded of application
Similarly, details are not described herein.
For example, it is assumed that include the page address of tri- pages of A, B, C in specified page list, if the page to be loaded is D,
Then mobile terminal can determine do not include in specified page list page D to be loaded page address, therefore, mobile terminal need to pass through
The built-in browser of application is from server loading page D.If the page to be loaded is page A or B or C, mobile terminal can be from
Call corresponding page code to carry out page load using local.
In one possible implementation, in another embodiment, any for being realized using local code
For function, when the function needs to update, server end can first issue the web edition of the function, so that server end is stored with
The page code of the function renewal version.In this way, being just no longer the latest edition page of the function using the page code being locally stored
Face.In order to guarantee that mobile terminal can load the corresponding page of latest edition function, so as to mobile terminal can will apply it is newest
Content show user, mobile terminal before carrying out page load from the local page code for calling the page to be loaded,
Whether the version information of the version information and application that can determine whether specified page list is consistent, if unanimously, thening follow the steps 205;
If it is inconsistent, determining that the page being locally stored is not the latest edition page, and execute step 206.
In step 205, if the version information of specified page list is consistent with the version information of application, originally from application
The page code of the page to be loaded is called to load the page to be loaded in ground.
Mobile terminal is consistent with the version information of application in the version information for determining specified page list, and determination is locally stored
Page code be latest edition, then directly carry out page load from the local page code for calling the page to be loaded of application, add
Load process can be with are as follows: mobile terminal obtains and page to be loaded from specified page list according to the page address of the page to be loaded
The page iden-tity of the corresponding page to be loaded in the page address in face.Later, it according to the page iden-tity of the page to be loaded, is deposited from local
In the page code of storage, the page code of the page to be loaded is obtained.Load the page code of the page to be loaded.Wherein, it applies
When page code is locally stored, the page iden-tity for storing the page code can be corresponded to.
In step 206, if the version information of specified page list and the version information of application are inconsistent, according to page
Face load request loads the page to be loaded from server.
According to page load request in the step 206, the process and above-mentioned steps 203 of the page to be loaded are loaded from server
Similarly, details are not described herein.
Still in specified page list including the page address of tri- pages of A, B, C, wherein specified page list
Version information is version2, mobile when the page to be loaded is page A if the version information of application is also version2
Terminal can determine the latest edition page code that page A is locally stored, and directly from the page code of the local invoking page A of application
With loading page A.If the version information of application is version3, when the page to be loaded is page A, mobile terminal be can determine
Server is stored with the new edition page code of page A, and by the built-in browser of application, loads page A from server.
In another embodiment, since the corresponding file of the local code of mobile terminal may be damaged, or it is local
The version of code is too old, the incompatible version with application, will lead to mobile terminal and mistake occurs when calling local page code,
At this point, mobile terminal can generate error information, so that mobile terminal loads the corresponding page from server.It that is to say, it is mobile whole
End can also obtain the page to be loaded from server by the built-in browser of application, process can after detecting error information
With are as follows: in the operational process of the page code of the page to be loaded, if detecting reporting an error for the local code of the page to be loaded
The step of information then executes according to page load request, loads the page to be loaded from server.That is to say, when mobile terminal plus
When carrying local code generation mistake, directly page loading method is switched to from server and is loaded, so that mobile terminal can not
It is interrupted the page for showing load to user, improves user's viscosity.By local code when the error occurs, in time from server
The corresponding page is obtained, ensure that the validity of page load.
It should be noted that the application that terminal is installed can have independent built-in browser, it can also shared terminal offer
Built-in browser, it is not limited in this embodiment of the present disclosure.When the built-in browser that Application share terminal provides, on
The step of realizing in step by the built-in browser of application is stated, can be realized by the built-in browser of terminal, the disclosure is real
Example is applied to be not especially limited the specific existence form of built-in browser.
The method that the embodiment of the present disclosure provides can be obtained clearly by obtaining the specified page list of application from server
Know which page of application can be from the local load of application, which page needs to load from server, so that in application and development
In the process, the more demanding function of timeliness can be realized using local code, requires lower function using service timeliness
The code at device end is realized, it is not necessary to all page codes are all made of local code realization, while ensure that page loading efficiency,
Shorten the development cycle.
Further, when business demand changes, respective page code first can be realized in server end, to apply energy
It enough timely updates to meet the variation demand of business.After the completion of the exploitation of the local code of respective page, then carry out local code
Update so that using can iteratively faster it is online, improve update efficiency.
Fig. 3 is a kind of block diagram of page loading device shown according to an exemplary embodiment.Referring to Fig. 3, the device packet
It includes: obtaining module 301, judgment module 302 and loading module 303.
Wherein, it obtains module 301 to connect with judgment module 302, for starting in application, obtaining application from server
Specified page list, includes the page address of the specified page of application in specified page list, and the page code of specified page is deposited
It is stored in using local;Judgment module 302 is connect with loading module 303, for when receiving page load request, judgement to be specified
In page listings whether include the page to be loaded page address, the page of the page to be loaded is carried in page load request
Location;Loading module 303, if for do not include in specified page list the page to be loaded page address, added according to the page
Request is carried, loads the page to be loaded from server;If in specified page list including the page address of the page to be loaded, from
Using the local page code for calling the page to be loaded to load the page to be loaded.
It in one possible implementation, further include the page iden-tity of specified page, specific page in specified page list
The page iden-tity in face and the page address of specified page correspond,
Correspondingly, loading module 303 is used for the page address according to the page to be loaded, from specified page list, obtains
The page iden-tity of the page to be loaded corresponding with the page address of the page to be loaded;According to the page iden-tity of the page to be loaded, from
In the page code being locally stored, the page code of the page to be loaded is obtained, using page code and correspondence has been locally stored
Page iden-tity;Load the page code of the page to be loaded.
In one possible implementation, loading module 303 is used for the built-in browser by application, sends out to server
Page load request is sent, the page address of the page to be loaded carried by server according to page load request returns to page to be loaded
Face;Receive the page to be loaded that server returns;Loading page is treated to be loaded.
In one possible implementation, specified page list further includes the version information of specified page list,
If judgment module 303 is also used to the page address in specified page list including the page to be loaded, judgement is specified
Whether the version information of page listings and the version information of application are consistent;
If the version information that loading module 303 is also used to specified page list is consistent with the version information of application, hold
Row locally calls the step of page code of the page to be loaded is to load the page to be loaded from application;
If loading module 303 be also used to specified page list version information and application version information it is inconsistent,
The step of executing according to page load request, loading the page to be loaded from server.
In one possible implementation, loading module 303 is also used to the operation in the page code of the page to be loaded
In the process, it if detecting the error information of the local code of the page to be loaded, executes according to page load request, from service
Device loads the step of page to be loaded.
The device that the embodiment of the present disclosure provides can be obtained clearly by obtaining the specified page list of application from server
Know which page of application can be from the local load of application, which page needs to load from server, so that in application and development
In the process, the more demanding function of timeliness can be realized using local code, requires lower function using service timeliness
The code at device end is realized, it is not necessary to all page codes are all made of local code realization, while ensure that page loading efficiency,
Shorten the development cycle.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 4 is a kind of block diagram of page loading device shown according to an exemplary embodiment.For example, device 400 can be with
It is mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building
Equipment, personal digital assistant etc..
Referring to Fig. 4, device 400 may include following one or more components: processing component 402, memory 404, power supply
Component 406, multimedia component 404, audio component 410, input/output (I/O) interface 412, sensor module 414, Yi Jitong
Believe component 416.
The integrated operation of the usual control device 400 of processing component 402, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 402 may include that one or more processors 420 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more modules, just
Interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, it is more to facilitate
Interaction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shown
Example includes the instruction of any application or method for operating on device 400, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 406 provides electric power for the various assemblies of device 400.Power supply module 406 may include power management system
System, one or more power supplys and other with for device 400 generate, manage, and distribute the associated component of electric power.
Multimedia component 408 includes the screen of one output interface of offer between described device 400 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 408 includes a front camera and/or rear camera.When device 400 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a Mike
Wind (MIC), when device 400 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 404 or via communication set
Part 416 is sent.In some embodiments, audio component 410 further includes a loudspeaker, is used for output audio signal.
I/O interface 412 provides interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented
Estimate.For example, sensor module 414 can detecte the state that opens/closes of device 400, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 400, and sensor module 414 can be with 400 1 components of detection device 400 or device
Position change, the existence or non-existence that user contacts with device 400,400 orientation of device or acceleration/deceleration and device 400
Temperature change.Sensor module 414 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 414 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device
400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 416 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 400 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned page loading method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of device 400 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium is additionally provided, when the storage is situated between
When instruction in matter is executed by the processor of mobile terminal, so that mobile terminal is able to carry out above-mentioned page loading method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (11)
1. a kind of page loading method, which is characterized in that the described method includes:
It include institute in the specified page list in starting in application, obtaining the specified page list of the application from server
The page address of the specified page of application is stated, it is local that the page code of the specified page is stored in the application;
When receiving page load request, judge in the specified page list whether include the page to be loaded the page
Location carries the page address of the page to be loaded in the page load request;
If in the specified page list not including the page address of the page to be loaded, asked according to page load
It asks, loads the page to be loaded from server;
If in the specified page list including the page address of the page to be loaded, institute is locally called from the application
The page code of the page to be loaded is stated to load the page to be loaded;
The method also includes:
When the application is out of service, the specified page list of the application is removed.
2. the method according to claim 1, wherein further including the specified page in the specified page list
Page iden-tity, the page address of the page iden-tity of the specified page and the specified page corresponds,
Correspondingly, if in the specified page list including the page address of the page to be loaded, originally from the application
Ground calls the page code of the page to be loaded to include: to load the page to be loaded
According to the page address of the page to be loaded, from the specified page list, obtain and the page to be loaded
The page iden-tity of the corresponding page to be loaded in page address;
According to the page iden-tity of the page to be loaded, from the page code being locally stored, the page to be loaded is obtained
Page code and corresponding page iden-tity has been locally stored in page code, the application;
Load the page code of the page to be loaded.
3. the method according to claim 1, wherein described according to the page load request, from server plus
Carrying the page to be loaded includes:
By the built-in browser of the application, Xiang Suoshu server sends the page load request, by the server root
The page address of the page to be loaded carried according to the page load request returns to the page to be loaded;
Receive the page to be loaded that the server returns;
The page to be loaded is loaded.
4. the method according to claim 1, wherein the specified page list further includes the specified page column
The version information of table, the method also includes:
If including the page address of the page to be loaded in the specified page list, the specified page list is judged
Whether version information is consistent with the version information of the application;
If the version information of the specified page list is consistent with the version information of the application, execute from the application originally
Call the step of page code of the page to be loaded is to load the page to be loaded in ground;
If the version information of the specified page list and the version information of the application are inconsistent, execute according to the page
Face load request, from server load the page to be loaded the step of.
5. the method according to claim 1, wherein described locally call the page to be loaded from the application
Page code to load the page to be loaded after, the method also includes:
In the operational process of the page code of the page to be loaded, if detecting the local code of the page to be loaded
Error information, then the step of executing according to the page load request, load the page to be loaded from server.
6. a kind of page loading device, which is characterized in that described device includes:
Module is obtained, for starting in application, obtaining the specified page list of the application, the specified page from server
The page address of specified page in list including the application, the page code of the specified page are stored in the application originally
Ground;
Judgment module, for when receiving page load request, judging in the specified page list whether to include to be loaded
The page address of the page carries the page address of the page to be loaded in the page load request;
Loading module, if for do not include in the specified page list page to be loaded page address, basis
The page load request loads the page to be loaded from server;
If the loading module is used for the page address in the specified page list including the page to be loaded, from institute
It states using the local page code for calling the page to be loaded to load the page to be loaded;
Described device is also used to:
When the application is out of service, the specified page list of the application is removed.
7. device according to claim 6, which is characterized in that further include the specified page in the specified page list
Page iden-tity, the page address of the page iden-tity of the specified page and the specified page corresponds,
Correspondingly, the loading module is used for the page address according to the page to be loaded, from the specified page list,
Obtain the page iden-tity of the page to be loaded corresponding with the page address of the page to be loaded;According to the page to be loaded
The page iden-tity in face obtains the page code of the page to be loaded from the page code being locally stored, and the application is local
It is stored with page code and corresponding page iden-tity;Load the page code of the page to be loaded.
8. device according to claim 6, which is characterized in that the loading module is for passing through the built-in clear of the application
Look at device, Xiang Suoshu server sends the page load request, is carried by the server according to the page load request
The page address of the page to be loaded returns to the page to be loaded;Receive the page to be loaded that the server returns
Face;The page to be loaded is loaded.
9. device according to claim 6, which is characterized in that the specified page list further includes the specified page column
The version information of table, if the judgment module is also used to the page in the specified page list including the page to be loaded
Whether address, the version information for judging the specified page list are consistent with the version information of the application;
If the version information that the loading module is also used to the specified page list is consistent with the version information of the application,
The step of then executing from the local page code for calling the page to be loaded of the application to load the page to be loaded;
If the loading module is also used to the version information of the specified page list and the version information of the application is different
The step of causing, then executing according to the page load request, load the page to be loaded from server.
10. device according to claim 6, which is characterized in that the loading module is also used in the page to be loaded
Page code operational process in, if detecting the error information of the local code of the page to be loaded, execute root
According to the page load request, the step of loading the page to be loaded from server.
11. a kind of page loading device characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: in starting in application, obtain the specified page list of the application from server,
The page address of specified page in the specified page list including the application, the page code storage of the specified page
It is local in the application;When receiving page load request, judge in the specified page list whether to include page to be loaded
The page address in face carries the page address of the page to be loaded in the page load request;If the specified page
It does not include the page address of the page to be loaded in list, then according to the page load request, described in server load
The page to be loaded;If in the specified page list including the page address of the page to be loaded, originally from the application
The page code of the page to be loaded is called to load the page to be loaded in ground;
The processor is also configured to
When the application is out of service, the specified page list of the application is removed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610499045.7A CN106126685B (en) | 2016-06-29 | 2016-06-29 | Page loading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610499045.7A CN106126685B (en) | 2016-06-29 | 2016-06-29 | Page loading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106126685A CN106126685A (en) | 2016-11-16 |
CN106126685B true CN106126685B (en) | 2019-08-30 |
Family
ID=57286070
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610499045.7A Active CN106126685B (en) | 2016-06-29 | 2016-06-29 | Page loading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106126685B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106372267A (en) * | 2016-11-30 | 2017-02-01 | 北京奇虎科技有限公司 | Page loading method and page loading device based on browser |
CN107070973B (en) * | 2017-01-05 | 2020-12-18 | 创新先进技术有限公司 | Mobile terminal resource loading method and device |
WO2018161294A1 (en) * | 2017-03-09 | 2018-09-13 | 深圳峰创智诚科技有限公司 | Local caching method and apparatus for application program |
CN107423367B (en) * | 2017-06-29 | 2020-11-10 | 北京五八信息技术有限公司 | Web page loading method and device |
CN107577712B (en) * | 2017-08-01 | 2019-03-15 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and computer equipment of loading page |
CN107644075B (en) * | 2017-09-19 | 2020-11-20 | 北京京东尚科信息技术有限公司 | Method and device for collecting page information |
CN108121761A (en) * | 2017-11-24 | 2018-06-05 | 海尔优家智能科技(北京)有限公司 | A kind of Webpage loading method and device |
CN108228717A (en) * | 2017-12-06 | 2018-06-29 | 五八有限公司 | The loading method and device of the page |
CN111506644B (en) * | 2019-01-31 | 2024-01-23 | 北京神州泰岳软件股份有限公司 | Application data processing method and device and electronic equipment |
CN111695060A (en) * | 2019-03-15 | 2020-09-22 | 天津五八到家科技有限公司 | Page switching method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461632A (en) * | 2014-12-09 | 2015-03-25 | 东软集团股份有限公司 | Web App loading method and device |
CN104731589A (en) * | 2015-03-12 | 2015-06-24 | 用友网络科技股份有限公司 | Automatic generation method and device of user interface (UI) |
-
2016
- 2016-06-29 CN CN201610499045.7A patent/CN106126685B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104461632A (en) * | 2014-12-09 | 2015-03-25 | 东软集团股份有限公司 | Web App loading method and device |
CN104731589A (en) * | 2015-03-12 | 2015-06-24 | 用友网络科技股份有限公司 | Automatic generation method and device of user interface (UI) |
Also Published As
Publication number | Publication date |
---|---|
CN106126685A (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106126685B (en) | Page loading method and device | |
JP2022163060A (en) | Notification processing method, electronic device, and program | |
CN105847430B (en) | Mix application page data access method and device | |
CN105553963B (en) | The control method and device of positioning service | |
KR20120118819A (en) | Mobile terminal and system for managing applications using the same | |
CN106201610A (en) | Web application accesses the method and device of the primary function of terminal | |
CN105100074A (en) | Data operation processing method, device and terminal equipment | |
CN109358933A (en) | The creation method and device applied fastly | |
CN106792442B (en) | Data migration method and device | |
KR102052699B1 (en) | Method for displaying contact information in electronic device | |
CN107147815A (en) | Based on the call handling method and device called a taxi | |
CN105094830A (en) | Method and device for executing target functions | |
CN107395624B (en) | Information processing method and device | |
CN107463372B (en) | Data-driven page updating method and device | |
CN107632835A (en) | Using installation method and device | |
CN107943370A (en) | Advertisement display method, device and storage medium | |
CN105808767A (en) | Data updating method and apparatus | |
CN109257731A (en) | Emergency call realization method, electronic device and computer readable storage medium | |
CN104158851B (en) | A kind of dissemination system of Network, method and apparatus | |
CN105956489B (en) | Long-range control method and device | |
EP3185515B1 (en) | Method and device for inputting information | |
CN109885360A (en) | A kind of data processing method, device and storage medium | |
CN109491655A (en) | A kind of incoming event processing method and processing device | |
CN107395724A (en) | Network request method and device | |
CN111221512B (en) | Function module mixed use method, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |