WO2015149664A1 - Web page access method and apparatus - Google Patents
Web page access method and apparatus Download PDFInfo
- Publication number
- WO2015149664A1 WO2015149664A1 PCT/CN2015/075373 CN2015075373W WO2015149664A1 WO 2015149664 A1 WO2015149664 A1 WO 2015149664A1 CN 2015075373 W CN2015075373 W CN 2015075373W WO 2015149664 A1 WO2015149664 A1 WO 2015149664A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- web page
- browser
- kernel
- self
- application program
- Prior art date
Links
Images
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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9558—Details of hyperlinks; Management of linked annotations
Definitions
- the present disclosure relates to the field of computer technologies, and in particular, to a web page access method and apparatus.
- a system WebView control may be embedded in the third-party application program, and the third-party application program may implement web browsing and accessing according to the system WebView control. For example, when a user taps a link of a web page address in the third-party application program, the system WebView control invokes a kernel that can load a web page in the system, to load a web page corresponding to the web page address, and web page content obtained after the loading is displayed on the WebView control.
- the inventors find that the existing technology at least has the following problems: because the kernel used by the system WebView control has many defects, for example, the kernel does not take function optimization into consideration and the update of a version is slow, problems such as low browsing speed and poor performance of loading web page content easily emerge when the system WebView control embedded in the third-party application program is used to browse a web page.
- a web page access method which is applied to a mobile terminal, where the method includes:
- a web page access apparatus which is applied to a mobile terminal, where the apparatus includes:
- a receiving module configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program
- a loading module configured to load a kernel of a browser by using a self-defined WebView control
- a display module configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed, poor performance of loading web page content, low security of a low-version system WebView control, and inconvenient upgrading of a version of the system WebView control that easily emerge when the system WebView control embedded in the third-party application program is used to browse a web page.
- a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
- FIG. 1 is a method flowchart of a web page access method according to an embodiment of the present invention
- FIG. 2A is a method flowchart of a web page access method according to another embodiment of the present invention.
- FIG. 2B is a schematic diagram of an interface, presented in a third-party application program, in which several web page link addresses are displayed according to an embodiment of the present invention
- FIG. 2C is a schematic diagram of a relationship between a third-party application program and a browser according to some embodiments of the present invention.
- FIG. 2D is a schematic diagram of a relationship between a third-party application program and a browser according to some other embodiments of the present invention.
- FIG. 2E is a schematic diagram showing that web page content is displayed on a self-defined WebView control in a third-party application program according to some embodiments of the present invention
- FIG. 3 is a schematic structural diagram of a web page access apparatus according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a web page access apparatus according to another embodiment of the present invention.
- FIG. 1 is a method flowchart of a web page access method according to an embodiment of the present invention.
- the web page access method may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, a desk computer, or the like.
- the web page access method may include:
- a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page.
- a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
- FIG. 2A is a method flowchart of a web page access method according to another embodiment of the present invention.
- the web page access method may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like.
- the web page access method may include:
- the third-party application program may provided a function of browsing a web page, and in this way, a user may select to tap a certain web page link address in the third-party application program, for example, recommendation of friends of the user or a shared web page link address; correspondingly, the third-party application program may receive a browsing instruction generated after an action is performed on the web page link address in the third-party application program.
- FIG. 2B is a schematic diagram of an interface, presented in a third-party application program, in which several web page link addresses are displayed according to some embodiments of the present invention.
- Web page link addresses shared by several friends are displayed in interface b1 and a user may select whether to view web page content of these web page link addresses; when the user selects to view a certain web page link address b2, the user taps the web page link address b2, and then the third-party application program receives a browsing instruction generated after an action is performed on the web page link address.
- these web page link addresses may be displayed as a character string for indicating a link address, for example, b3, or may also be displayed as text information, for example, b2.
- the WebView control is a control used for loading and displaying web page content.
- the self-defined WebView control set in the third-party application program is different from a system WebView set in an existing application program.
- the system WebView in the Android system originates from com. android. webkit. WebView
- the self-defined WebView control originates from a self-defined WebView type in a software development kit (SDK) loaded when the third-party application program is developed.
- SDK software development kit
- the third-party application program and a browser are separately installed under different installation directories in the mobile terminal.
- a kernel of a browser occupies a large capacity, and the browser is installed in all common mobile terminals, in order to reduce a capacity of the third-party application program, increase the web page access speed of the third-party application program, and improve its performance of loading a web page, the kernel of the browser is generally not directly set in code of the third-party application program, but it is considered whether to directly load a kernel of a browser independent of the third-party application program.
- the browser and the third-party application program are two independent application programs in the mobile terminal, generally, in order to ensure security of application programs, one application program cannot access a program library and a resource file under an installation directory of another application program. Therefore, in order that the self-defined WebView control of the third-party application program can directly load the kernel of the browser, reading permission of the kernel of the browser may be set to be readable during installation of the browser; in this way, the third-party application program can directly load the kernel of the browser.
- FIG. 2C is a schematic diagram of a relationship between a third-party application program and a browser according to some embodiments of the present invention.
- the third-party application program further includes a self-defined WebView control in addition to another user interface (UI)
- the browser further includes a kernel of the browser in addition to a UI of the browser.
- the third-party application program and the browser are two independently installed application programs, that is, the third-party application program and the browser are separately installed under different installation directories in the mobile terminal.
- one application program cannot directly read a program library and a resource file under an installation directory of another application program.
- the self-defined WebView of the third-party application program can directly load the kernel of the browser.
- the kernel of the browser may include the so local program library, the java jar packet library, and a resource file, where reading permission of the so local program library is generally readable by default, the java jar packet library and the resource file are only readable to the browser by default, and other application programs that are installed independently of the browser cannot directly read the java jar packet library and the resource file in the kernel of the browser. Therefore, in order to make the reading permission of the kernel of the browser open so that other application programs can read or load the kernel, reading permission of the java jar packet library and that of the resource file in the kernel of the browser may also be set to be readable during installation of the browser.
- a developer may integrate a self-defined SDK in code of the third-party application program, where the self-defined SDK may package a self-defined WebView control.
- FIG. 2D is a schematic diagram of a relationship between a third-party application program and a browser according to some other embodiments of the present invention.
- the third-party application program further includes a self-defined SDK integrated therein in addition to regular content (third-party application software) of the third-party application program, and the browser further includes a kernel of the browser in addition to a UI of the browser.
- the kernel of the browser occupies a large capacity, for example, several megabytes; and the self-defined SDK generally occupies a small capacity, which is only dozens of kilobytes. Therefore, the third-party application program can save more capacity when the kernel of the browser is not installed.
- the self-defined SDK may be integrated in code of the new third-party application program.
- the SDK may be integrated in code of the third-party application program when the code of the third-party application program is upgraded.
- an original third-party application program has carried a system WebView control of a kernel in a loading system, it may be set that the self-defined WebView control is interface-compatible with the system WebView control. In this way, when it is required to invoke the WebView control to display a web page, the self-defined WebView control may be directly invoked, so that a code library and a resource file in the kernel of the browser are directly read by using the self-defined WebView control.
- the kernel of the browser When the self-defined WebView control loads the kernel of the browser, that is, when the self-defined WebView control reads a code library (including the so local program library and the java jar packet library) and a resource file in the kernel of the browser, the kernel of the browser can load a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- a code library including the so local program library and the java jar packet library
- FIG. 2E is a schematic diagram showing that web page content is displayed on a self-defined WebView control in a third-party application program according to some embodiments of the present invention.
- a user taps the web page link address b2
- web page e2 corresponding to the web page link address is displayed on the self-defined WebView control e1.
- the third-party application program does not need to integrate the kernel of the browser in its own program, but may browse a web page by using the kernel of the browser;
- the self-defined SDK integrated in the third-party application program may access the code library and the resource file in the kernel of the browser, to provide a WebView control interface-compatible with the system WebView control for the third-party application program;
- a self-defined WebView control may be embedded in the third-party application program by using the self-defined SDK, and then the third-party application program opens, by using the kernel of the browser, a web page to be browsed.
- the self-defined WebView control can invoke the kernel of the browser, and the browser is more easily upgraded frequently than a terminal system, the self-defined WebView control has higher efficiency, performance, compatibility, and security than the system WebView control.
- a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page.
- a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
- FIG. 3 is a schematic structural diagram of a web page access apparatus according to an embodiment of the present invention.
- the web page access apparatus may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like.
- the web page access apparatus may include: a receiving module 302, a loading module 304, and a display module 306.
- the receiving module 302 can be configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
- the loading module 304 can be configured to load a kernel of a browser by using a self-defined WebView control.
- the display module 306 can be configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page.
- a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
- FIG. 4 is a schematic structural diagram of a web page access apparatus according to another embodiment of the present invention.
- the web page access apparatus may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like.
- the web page access apparatus may include: a receiving module 402, a loading module 404, and a display module 406.
- the receiving module 402 can be configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
- the loading module 404 can be configured to load a kernel of a browser by using a self-defined WebView control.
- the display module 406 can be configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- the loading module 404 can be further configured to:
- the kernel of the browser may include the so local program library, the java jar packet library, and a resource file, where reading permission of the so local program library in the kernel is readable, the java jar packet library and the resource file are only readable to the browser by default, and other application programs that are installed independently of the browser cannot read the java jar packet library and the resource file in the kernel of the browser. Therefore, in order to make the reading permission of the kernel of the browser open so that other application programs can read the kernel, reading permission of the java jar packet library and that of the resource file in the kernel of the browser may also be set to be readable during installation of the browser.
- the display module 406 can be further configured to:
- the self-define WebView control is packaged by a self-defined SDK that is integrated in a third-party application program.
- the self-defined WebView control is interface-compatible with a system WebView control.
- the third-party application program and the browser are separately installed under different installation directories in the terminal.
- a kernel of a browser occupies a large capacity, and the browser is installed in all common mobile terminals, in order to reduce a capacity of the third-party application program, the kernel of the browser is generally not set in the third-party application program; and in order to increase the web page access speed of the third-party application program and improve its performance of loading a web page, it is considered whether to directly read a kernel of a browser independent of the third-party application program.
- the browser and the third-party application program are generally two independent application programs in the mobile terminal, that is, the browser and the third-party application program are separately installed under different installation directories of the mobile terminal, further because one application program cannot access a program library and a resource file under an installation directory of another application program in order to ensure security of application programs, herein, in order that the self-defined WebView control of the third-party application program can directly read the kernel of the browser, reading permission of the kernel of the browser may be set to be readable during installation of the browser; in this way, the third-party application program can directly read the kernel of the browser.
- the third-party application program does not need to integrate the kernel of the browser in its own program, but may browse a web page by using the kernel of the browser;
- the self-defined SDK integrated in the third-party application program may access the code library and the resource file in the kernel of the browser, to provide a WebView control interface-compatible with the system WebView control for the third-party application program;
- a self-defined WebView control may be embedded in the third-party application program by using the self-defined SDK, and then the third-party application program opens, by using the kernel of the browser, a web page to be browsed.
- the self-defined WebView control can invoke the kernel of the browser, and the browser is more easily upgraded frequently than a terminal system, the self-defined WebView control has higher efficiency, performance, compatibility, and security than the system WebView control.
- a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page.
- a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
- the above functional modules are only described for exemplary purposes when the web page access apparatus provided in the foregoing embodiment accesses a web page.
- the functions may be allocated to different functional modules according to specific needs, which means that the internal structure of the mobile terminal is divided to different functional modules to complete all or some of the above described functions.
- the web page access apparatus provided by the foregoing embodiment is based on the same concept as the web page access method in the foregoing embodiment. For the specific implementation process, refer to the method embodiments, and the details are not described herein again.
- the program may be stored in a computer readable storage medium.
- the storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.
Abstract
The present disclosure relates to the field of computer technologies, and discloses a web page access method and apparatus. The method includes : receiving a browsing instruction generated after an action is performed on a web page link address in a third-party application program; loading a kernel of a browser by using a self-defined WebView control; and loading, by using the kerne, web page corresponding to the web page link address to the self-defined WebView control for displaying. In the present disclosure, a kernel of a browser is loaded by using a self-define WebView control, thereby implementing loading and displaying of a web page link address in a third-party application program, and solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page; in this way, the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
Description
The present disclosure relates to the field of computer technologies, and in particular, to a web page access method and apparatus.
With application popularity of an intelligent terminal, more application programs, in addition to a browser in the intelligent terminal, are also required to be set to have a web page browsing function.
When a web page access function is set for a third-party application program, a system WebView control may be embedded in the third-party application program, and the third-party application program may implement web browsing and accessing according to the system WebView control. For example, when a user taps a link of a web page address in the third-party application program, the system WebView control invokes a kernel that can load a web page in the system, to load a web page corresponding to the web page address, and web page content obtained after the loading is displayed on the WebView control.
During implementation of the present disclosure, the inventors find that the existing technology at least has the following problems: because the kernel used by the system WebView control has many defects, for example, the kernel does not take function optimization into consideration and the update of a version is slow, problems such as low browsing speed and poor performance of loading web page content easily emerge when the system WebView control embedded in the third-party application program is used to browse a web page.
SUMMARY
To solve the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when the system WebView control embedded in the third-party application program is used to browse a web page, embodiments of the present invention provide a web page access method and apparatus. The technical solutions are as follows:
According to a first aspect, a web page access method is provided, which is applied to a mobile terminal, where the method includes:
receiving a browsing instruction generated after an action is performed on a web page link address in a third-party application program;
loading a kernel of a browser by using a self-defined WebView control; and
loading, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
According to a second aspect, a web page access apparatus is provided, which is applied to a mobile terminal, where the apparatus includes:
a receiving module, configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program;
a loading module, configured to load a kernel of a browser by using a self-defined WebView control; and
a display module, configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
The beneficial effects of the technical solutions provided by the embodiments of the present invention are as follows:
When a browsing instruction generated after an action is performed on a web page link address in a third-party application program is received, a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed, poor performance of loading web page content, low security of a low-version system WebView control, and inconvenient upgrading of a version of the system WebView control that easily emerge when the system WebView control embedded in the third-party application program is used to browse a web page. In a case in which a browser kernel is not installed in the third-party application program, a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
To illustrate the technical solutions according to the embodiments of the present invention more clearly, the accompanying drawings for describing the embodiments are
introduced briefly in the following. Apparently, the accompanying drawings in the following description are only some embodiments of the present invention, and persons of ordinary skill in the art can derive other drawings from the accompanying drawings without creative efforts.
FIG. 1 is a method flowchart of a web page access method according to an embodiment of the present invention;
FIG. 2A is a method flowchart of a web page access method according to another embodiment of the present invention;
FIG. 2B is a schematic diagram of an interface, presented in a third-party application program, in which several web page link addresses are displayed according to an embodiment of the present invention;
FIG. 2C is a schematic diagram of a relationship between a third-party application program and a browser according to some embodiments of the present invention;
FIG. 2D is a schematic diagram of a relationship between a third-party application program and a browser according to some other embodiments of the present invention;
FIG. 2E is a schematic diagram showing that web page content is displayed on a self-defined WebView control in a third-party application program according to some embodiments of the present invention;
FIG. 3 is a schematic structural diagram of a web page access apparatus according to an embodiment of the present invention; and
FIG. 4 is a schematic structural diagram of a web page access apparatus according to another embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
To make the objectives, technical solutions, and advantages of the present disclosure clearer, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to FIG. 1, FIG. 1 is a method flowchart of a web page access method according to an embodiment of the present invention. The web page access method may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, a desk computer, or the like. The web page access method may include:
101. Receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
102. Load a kernel of a browser by using a self-defined WebView control.
103. Load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
To sum up, in the web page access method provided by the embodiment of the present invention, when a browsing instruction generated after an action is performed on a web page link address in a third-party application program is received, a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page. In a case in which a browser kernel is not installed in the third-party application program, a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
Referring to FIG. 2A, FIG. 2A is a method flowchart of a web page access method according to another embodiment of the present invention. The web page access method may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like. The web page access method may include:
201. Receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
The third-party application program may provided a function of browsing a web page, and in this way, a user may select to tap a certain web page link address in the third-party application program, for example, recommendation of friends of the user or a shared web page link address; correspondingly, the third-party application program may receive a browsing instruction generated after an action is performed on the web page link address in the third-party application program.
Referring to FIG. 2B, FIG. 2B is a schematic diagram of an interface, presented in a third-party application program, in which several web page link addresses are displayed
according to some embodiments of the present invention. Web page link addresses shared by several friends are displayed in interface b1 and a user may select whether to view web page content of these web page link addresses; when the user selects to view a certain web page link address b2, the user taps the web page link address b2, and then the third-party application program receives a browsing instruction generated after an action is performed on the web page link address. Obviously, to diversify interface presentation and ensure friendliness between users during use, these web page link addresses may be displayed as a character string for indicating a link address, for example, b3, or may also be displayed as text information, for example, b2.
202. Read, by using the self-defined WebView control, a code library and a resource file in the kernel of the browser, where reading permission of the code library and that of the resource file in the kernel of the browser are both set to be readable during installation of the browser.
The WebView control is a control used for loading and displaying web page content.
The self-defined WebView control set in the third-party application program is different from a system WebView set in an existing application program. For example, the system WebView in the Android system originates from com. android. webkit. WebView, while the self-defined WebView control originates from a self-defined WebView type in a software development kit (SDK) loaded when the third-party application program is developed.
It should be noted that, the third-party application program and a browser are separately installed under different installation directories in the mobile terminal. Generally speaking, because a kernel of a browser occupies a large capacity, and the browser is installed in all common mobile terminals, in order to reduce a capacity of the third-party application program, increase the web page access speed of the third-party application program, and improve its performance of loading a web page, the kernel of the browser is generally not directly set in code of the third-party application program, but it is considered whether to directly load a kernel of a browser independent of the third-party application program. In addition, because the browser and the third-party application program are two independent application programs in the mobile terminal, generally, in order to ensure security of application programs, one application program cannot access a program library and a resource file under an installation directory of another application program. Therefore, in order that the self-defined WebView control of the third-party application program can directly load the kernel of the browser, reading permission of
the kernel of the browser may be set to be readable during installation of the browser; in this way, the third-party application program can directly load the kernel of the browser.
Referring to FIG. 2C, FIG. 2C is a schematic diagram of a relationship between a third-party application program and a browser according to some embodiments of the present invention. The third-party application program further includes a self-defined WebView control in addition to another user interface (UI) , and the browser further includes a kernel of the browser in addition to a UI of the browser. As can be seen, the third-party application program and the browser are two independently installed application programs, that is, the third-party application program and the browser are separately installed under different installation directories in the mobile terminal. By default, one application program cannot directly read a program library and a resource file under an installation directory of another application program. However, when reading permission of a code library and that of a resource file in a kernel of a browser are both set to be readable during installation of the browser, the self-defined WebView of the third-party application program can directly load the kernel of the browser.
During actual application, the kernel of the browser may include the so local program library, the java jar packet library, and a resource file, where reading permission of the so local program library is generally readable by default, the java jar packet library and the resource file are only readable to the browser by default, and other application programs that are installed independently of the browser cannot directly read the java jar packet library and the resource file in the kernel of the browser. Therefore, in order to make the reading permission of the kernel of the browser open so that other application programs can read or load the kernel, reading permission of the java jar packet library and that of the resource file in the kernel of the browser may also be set to be readable during installation of the browser.
During research on the third-party application program, or during upgrading of the third-party application program, a developer may integrate a self-defined SDK in code of the third-party application program, where the self-defined SDK may package a self-defined WebView control.
Referring to FIG. 2D, FIG. 2D is a schematic diagram of a relationship between a third-party application program and a browser according to some other embodiments of the present invention. The third-party application program further includes a self-defined SDK integrated therein in addition to regular content (third-party application software) of the third-party application program, and the browser further includes a kernel of the browser in addition to a UI of the browser.
Generally, the kernel of the browser occupies a large capacity, for example, several megabytes; and the self-defined SDK generally occupies a small capacity, which is only dozens of kilobytes. Therefore, the third-party application program can save more capacity when the kernel of the browser is not installed.
In a possible application scenario, when a new third-party application program is developed, the self-defined SDK may be integrated in code of the new third-party application program.
In another possible application scenario, when a certain third-party application program needs to be upgraded, in order that the third-party application program can use a directly loaded kernel of the browser, the SDK may be integrated in code of the third-party application program when the code of the third-party application program is upgraded. Generally, if an original third-party application program has carried a system WebView control of a kernel in a loading system, it may be set that the self-defined WebView control is interface-compatible with the system WebView control. In this way, when it is required to invoke the WebView control to display a web page, the self-defined WebView control may be directly invoked, so that a code library and a resource file in the kernel of the browser are directly read by using the self-defined WebView control.
203: Load, by using the code library and the resource file in the kernel of the browser, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
When the self-defined WebView control loads the kernel of the browser, that is, when the self-defined WebView control reads a code library (including the so local program library and the java jar packet library) and a resource file in the kernel of the browser, the kernel of the browser can load a web page corresponding to the web page link address to the self-defined WebView control for displaying.
Referring to FIG. 2E, FIG. 2E is a schematic diagram showing that web page content is displayed on a self-defined WebView control in a third-party application program according to some embodiments of the present invention. When a user taps the web page link address b2, after step 201 to step 203 are performed, web page e2 corresponding to the web page link address is displayed on the self-defined WebView control e1.
As can be seen from the above, the third-party application program does not need to integrate the kernel of the browser in its own program, but may browse a web page by using
the kernel of the browser; the self-defined SDK integrated in the third-party application program may access the code library and the resource file in the kernel of the browser, to provide a WebView control interface-compatible with the system WebView control for the third-party application program; a self-defined WebView control may be embedded in the third-party application program by using the self-defined SDK, and then the third-party application program opens, by using the kernel of the browser, a web page to be browsed.
It should be noted that, because the self-defined WebView control can invoke the kernel of the browser, and the browser is more easily upgraded frequently than a terminal system, the self-defined WebView control has higher efficiency, performance, compatibility, and security than the system WebView control.
To sum up, in the web page access method provided by the embodiment of the present invention, when a browsing instruction generated after an action is performed on a web page link address in a third-party application program is received, a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page. In a case in which a browser kernel is not installed in the third-party application program, a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
Referring to FIG. 3, FIG. 3 is a schematic structural diagram of a web page access apparatus according to an embodiment of the present invention. The web page access apparatus may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like. The web page access apparatus may include: a receiving module 302, a loading module 304, and a display module 306.
The receiving module 302 can be configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
The loading module 304 can be configured to load a kernel of a browser by using a self-defined WebView control.
The display module 306 can be configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
To sum up, in the web page access apparatus provided by the embodiment of the present invention, when a browsing instruction generated after an action is performed on a web page link address in a third-party application program is received, a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page. In a case in which a browser kernel is not installed in the third-party application program, a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
Referring to FIG. 4, FIG. 4 is a schematic structural diagram of a web page access apparatus according to another embodiment of the present invention. The web page access apparatus may be applied to a mobile terminal, where the mobile terminal herein may be a smart phone, a tablet computer, a smart TV, an E-book reader, an MP3 player, an MP4 player, a laptop computer, a desk computer, or the like. The web page access apparatus may include: a receiving module 402, a loading module 404, and a display module 406.
The receiving module 402 can be configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program.
The loading module 404 can be configured to load a kernel of a browser by using a self-defined WebView control.
The display module 406 can be configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
In a first possible implementation manner in the embodiment shown in FIG. 4, the loading module 404 can be further configured to:
read, by using the self-defined WebView control, a code library and a resource file in the kernel of the browser, where reading permission of the code library and that of the resource file in the kernel of the browser are both set to be readable during installation of the browser.
The kernel of the browser may include the so local program library, the java jar packet library, and a resource file, where reading permission of the so local program library in the kernel is readable, the java jar packet library and the resource file are only readable to the browser by default, and other application programs that are installed independently of the browser cannot read the java jar packet library and the resource file in the kernel of the browser. Therefore, in order to make the reading permission of the kernel of the browser open so that other application programs can read the kernel, reading permission of the java jar packet library and that of the resource file in the kernel of the browser may also be set to be readable during installation of the browser.
The display module 406 can be further configured to:
load, by using the code library and the resource file in the kernel of the browser, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
In a second possible implementation manner in the embodiment shown in FIG. 4, the self-define WebView control is packaged by a self-defined SDK that is integrated in a third-party application program.
In a third possible implementation manner in the embodiment shown in FIG. 4, the self-defined WebView control is interface-compatible with a system WebView control.
In a fourth possible implementation manner in the embodiment shown in FIG. 4, the third-party application program and the browser are separately installed under different installation directories in the terminal.
Because a kernel of a browser occupies a large capacity, and the browser is installed in all common mobile terminals, in order to reduce a capacity of the third-party application program, the kernel of the browser is generally not set in the third-party application program; and in order to increase the web page access speed of the third-party application program and improve its performance of loading a web page, it is considered whether to directly read a kernel of a browser independent of the third-party application program. Because the browser and the third-party application program are generally two independent application
programs in the mobile terminal, that is, the browser and the third-party application program are separately installed under different installation directories of the mobile terminal, further because one application program cannot access a program library and a resource file under an installation directory of another application program in order to ensure security of application programs, herein, in order that the self-defined WebView control of the third-party application program can directly read the kernel of the browser, reading permission of the kernel of the browser may be set to be readable during installation of the browser; in this way, the third-party application program can directly read the kernel of the browser.
As can be seen from the above, the third-party application program does not need to integrate the kernel of the browser in its own program, but may browse a web page by using the kernel of the browser; the self-defined SDK integrated in the third-party application program may access the code library and the resource file in the kernel of the browser, to provide a WebView control interface-compatible with the system WebView control for the third-party application program; a self-defined WebView control may be embedded in the third-party application program by using the self-defined SDK, and then the third-party application program opens, by using the kernel of the browser, a web page to be browsed.
It should be noted that, because the self-defined WebView control can invoke the kernel of the browser, and the browser is more easily upgraded frequently than a terminal system, the self-defined WebView control has higher efficiency, performance, compatibility, and security than the system WebView control.
To sum up, in the web page access apparatus provided by the embodiment of the present invention, when a browsing instruction generated after an action is performed on a web page link address in a third-party application program is received, a kernel of a browser is loaded by using a self-defined WebView control, and a web page corresponding to the web page link address is loaded by using the kernel of the browser to the self-defined WebView control for displaying, thereby solving the problems, in the existing technology, of low browsing speed and poor performance of loading web page content that easily emerge when a system WebView control embedded in the third-party application program is used to browse a web page. In a case in which a browser kernel is not installed in the third-party application program, a requested web page can still be loaded in the third-party application program by using a high-performance browser kernel, so that the web page can be quickly browsed in the third-party application program and the performance of loading web page content can be improved.
It should be noted that, the above functional modules are only described for exemplary purposes when the web page access apparatus provided in the foregoing embodiment accesses a web page. In actual applications, the functions may be allocated to different functional modules according to specific needs, which means that the internal structure of the mobile terminal is divided to different functional modules to complete all or some of the above described functions. In addition, the web page access apparatus provided by the foregoing embodiment is based on the same concept as the web page access method in the foregoing embodiment. For the specific implementation process, refer to the method embodiments, and the details are not described herein again.
The sequence numbers of the preceding embodiments of the present invention are merely for description purpose but do not indicate the preference of the embodiments.
A person of ordinary skill in the art may understand that all or some of the steps of the foregoing embodiments may be implemented by using hardware, or may be implemented by a program instructing relevant hardware. The program may be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.
The foregoing descriptions are merely preferred embodiments of the present invention, but are not intended to limit the present disclosure. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure shall fall within the protection scope of the present disclosure.
Claims (10)
- A web page access method, applied to a mobile terminal, the method comprising:receiving a browsing instruction generated after an action is performed on a web page link address in a third-party application program;loading a kernel of a browser by using a self-defined WebView control; andloading, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- The method according to claim 1, wherein the loading a kernel of a browser by using a self-defined WebView control comprises:reading, by using the self-defined WebView control, a code library and a resource file in the kernel of the browser, wherein reading permission of the code library and that of the resource file in the kernel of the browser are both set to be readable during installation of the browser; andthe loading, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying comprises:loading, by using the code library and the resource file in the kernel of the browser, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- The method according to claim 1, wherein the self-defined WebView control is packaged by a software development kit (SDK) that is integrated in the third-party application program.
- The method according to claim 1, wherein the self-defined WebView control is interface-compatible with a system WebView control.
- The method according to any one of claims 1 to 4, wherein the third-party application program and the browser are separately installed under different installation directories in the mobile terminal.
- A web page access apparatus, applied to a mobile terminal, the apparatus comprising:a receiving module, configured to receive a browsing instruction generated after an action is performed on a web page link address in a third-party application program;a loading module, configured to load a kernel of a browser by using a self-defined WebView control; anda display module, configured to load, by using the kernel, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- The apparatus according to claim 6, wherein the loading module is further configured to:read, by using the self-defined WebView control, a code library and a resource file in the kernel of the browser, wherein reading permission of the code library and that of the resource file in the kernel of the browser are both set to be readable during installation of the browser; andthe display module is further configured to:load, by using the code library and the resource file in the kernel of the browser, a web page corresponding to the web page link address to the self-defined WebView control for displaying.
- The apparatus according to claim 6, wherein the self-defined WebView control is packaged by an SDK that is integrated in the third-party application program.
- The apparatus according to claim 6, wherein the self-defined WebView control is interface-compatible with a system WebView control.
- The apparatus according to any one of claims 6 to 9, wherein the third-party application program and the browser are separately installed under different installation directories in the mobile terminal.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410125524.3 | 2014-03-31 | ||
CN201410125524.3A CN104951326B (en) | 2014-03-31 | 2014-03-31 | Webpage access method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015149664A1 true WO2015149664A1 (en) | 2015-10-08 |
Family
ID=54165997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/075373 WO2015149664A1 (en) | 2014-03-31 | 2015-03-30 | Web page access method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104951326B (en) |
WO (1) | WO2015149664A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11403364B2 (en) | 2017-10-13 | 2022-08-02 | Huawei Technologies Co., Ltd. | Method and terminal device for extracting web page content |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107092468B (en) * | 2016-02-17 | 2021-08-06 | 腾讯科技(深圳)有限公司 | Message display method and device |
CN106250434B (en) * | 2016-07-26 | 2019-09-13 | 东软集团股份有限公司 | Load the method and device of webpage |
CN107807828B (en) * | 2016-09-05 | 2020-03-17 | 腾讯科技(深圳)有限公司 | Control method and device for browsing service kernel loading |
CN107979573B (en) * | 2016-10-25 | 2021-02-05 | 腾讯科技(深圳)有限公司 | Risk information detection method, system and server |
CN107015801B (en) * | 2017-03-15 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Webpage display method and application terminal |
CN107329997A (en) * | 2017-06-08 | 2017-11-07 | 腾讯科技(深圳)有限公司 | Page display method and device, client, storage medium |
CN107729452B (en) * | 2017-10-09 | 2020-07-10 | 武汉斗鱼网络科技有限公司 | Webpage loading method and device, electronic equipment and computer readable storage medium |
CN107992301B (en) * | 2017-11-27 | 2020-02-21 | 腾讯科技(上海)有限公司 | User interface implementation method, client and storage medium |
CN110489679B (en) * | 2018-05-10 | 2023-04-07 | 腾讯科技(深圳)有限公司 | Browser kernel processing method and device and storage medium |
CN108776601B (en) * | 2018-06-05 | 2024-04-05 | 平安壹钱包电子商务有限公司 | Android H5 page loading method, device, equipment and storage medium |
CN109634549A (en) * | 2018-10-23 | 2019-04-16 | 中国平安人寿保险股份有限公司 | Audio frequency playing method, audio player, computer installation and readable storage medium storing program for executing |
CN110740126A (en) * | 2019-09-23 | 2020-01-31 | 紫光云(南京)数字技术有限公司 | Method, device and system for accessing smart city application program and computer storage medium |
CN110717128B (en) * | 2019-10-18 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Method, device, terminal and storage medium for processing in-application webpage |
CN110806905B (en) * | 2019-10-30 | 2022-09-30 | 网易(杭州)网络有限公司 | User page processing method and device, electronic equipment and storage medium |
CN110825365B (en) * | 2019-11-14 | 2022-08-23 | 福州汇思博信息技术有限公司 | Method, device, equipment and medium for customizing webview characteristics |
CN113934482A (en) * | 2020-07-14 | 2022-01-14 | 北京奇虎科技有限公司 | Page display method, equipment, storage medium and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541852A (en) * | 2010-12-07 | 2012-07-04 | 奇智软件(北京)有限公司 | Client software achieving method for web page application |
CN102843394A (en) * | 2011-06-22 | 2012-12-26 | 腾讯科技(深圳)有限公司 | Frame device of network application and operation method |
CN103150312A (en) * | 2011-12-23 | 2013-06-12 | 腾讯科技(深圳)有限公司 | Method and terminal for opening external link in network application |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8341268B2 (en) * | 2009-08-28 | 2012-12-25 | Microsoft Corporation | Resource sharing in multi-principal browser |
US8458765B2 (en) * | 2009-12-07 | 2013-06-04 | Samsung Electronics Co., Ltd. | Browser security standards via access control |
CN103179166A (en) * | 2011-12-23 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method of providing service in client and the client |
CN102915366B (en) * | 2012-10-25 | 2016-10-05 | 北京奇虎科技有限公司 | A kind of browser loads the method and apparatus of webpage |
CN103500194A (en) * | 2013-09-17 | 2014-01-08 | 北京奇虎科技有限公司 | Method, device and browser for loading webpage |
-
2014
- 2014-03-31 CN CN201410125524.3A patent/CN104951326B/en active Active
-
2015
- 2015-03-30 WO PCT/CN2015/075373 patent/WO2015149664A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541852A (en) * | 2010-12-07 | 2012-07-04 | 奇智软件(北京)有限公司 | Client software achieving method for web page application |
CN102843394A (en) * | 2011-06-22 | 2012-12-26 | 腾讯科技(深圳)有限公司 | Frame device of network application and operation method |
CN103150312A (en) * | 2011-12-23 | 2013-06-12 | 腾讯科技(深圳)有限公司 | Method and terminal for opening external link in network application |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11403364B2 (en) | 2017-10-13 | 2022-08-02 | Huawei Technologies Co., Ltd. | Method and terminal device for extracting web page content |
Also Published As
Publication number | Publication date |
---|---|
CN104951326A (en) | 2015-09-30 |
CN104951326B (en) | 2020-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015149664A1 (en) | Web page access method and apparatus | |
US11803451B2 (en) | Application exception recovery | |
US9858052B2 (en) | Decentralized operating system | |
CN109074286B (en) | Control of applications using system resources | |
CN102238265B (en) | Mobile phone and method for realizing double-system mobile phone | |
JP6992012B2 (en) | Data processing method and device | |
US10048986B2 (en) | Method and device for allocating browser processes according to a selected browser process mode | |
US9262042B2 (en) | File transfer applications | |
US20220253207A1 (en) | Display method and electronic device | |
CN108549562A (en) | A kind of method and device of image load | |
CN110780930A (en) | Method and device for starting Android system, electronic equipment and storage medium | |
CN103984781A (en) | Webpage loading method and device | |
US20180165133A1 (en) | Shared Memory Using Memory Mapped Files Between Host And Guest On A Computing Device | |
TW201826102A (en) | Execution of multiple applications on a device | |
US20180285148A1 (en) | Automate control of media playback based on visibility | |
TWI521431B (en) | Full screen processing in multi-application environments | |
TW201411382A (en) | Operating method and apparatus of browser engine, browser and terminal using the same | |
WO2024078348A1 (en) | Method and apparatus for processing registry operation in application porting environment, and medium | |
CN107087231B (en) | Video data playing method and device | |
KR102312672B1 (en) | Method and Electronic Device for operating screen | |
EP3683692A1 (en) | Cloud streaming service system, and method and apparatus for providing cloud streaming service | |
US20170187777A1 (en) | Method for providing cloud streaming service, device and system for same, and computer-readable recording medium having, recorded thereon, cloud streaming script code for same | |
CN112182446B (en) | Page display method and device, terminal equipment and computer readable storage medium | |
WO2016169426A1 (en) | Video playing method and device | |
CN103823679B (en) | A kind of information processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15773444 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.03.2017) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15773444 Country of ref document: EP Kind code of ref document: A1 |