Page switching method, electronic device and storage medium

By closing the embedded browser in the native application and displaying the relay page, receiving and handling the closing event of the embedded browser, the problem of restricted communication between the native application and the embedded browser is solved, and timely response to user content page switching operations and a better browsing experience is achieved.

CN114282131BActive Publication Date: 2025-06-06ZHANGYUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111613017.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-06-06
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

At this stage, the communication between some native applications and embedded browsers is restricted, resulting in the inability to trigger the communication between embedded browsers and native applications when users need to switch content pages, affecting the user's content page browsing experience.

Method used

By displaying the first content page in the embedded browser of the native application, when the operation of switching from the first content page to the second content page is detected, the embedded browser is closed and the relay page is displayed, the closed event of the embedded browser is received and the page request is sent, the page address is obtained through the relay page and the embedded browser is started to display the corresponding page.

Benefits of technology

It realizes timely response to user's content page switching operations, improves user's content page browsing experience, and avoids switching failures caused by communication restrictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114282131B_ABST
    Figure CN114282131B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a page switching method, an electronic device and a storage medium. The page switching method includes: displaying a first content page in an embedded browser of a native application; in response to detecting a first switching operation of switching from the first content page to the second content page, closing the embedded browser and displaying a transfer page in the native application, the transfer page being a native page of the native application; in response to a closing event of the embedded browser, receiving a first page request sent by the embedded browser through the native application, the first page request being used to request a second content page; after obtaining a page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page; and displaying a page corresponding to the page address in the embedded browser. According to an embodiment of the present disclosure, the user's content page browsing experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page switching method, an electronic device, and a storage medium. Background Art

[0002] With the gradual development of native applications, a technology has emerged that allows users to browse external content of native applications within native applications by setting an embedded browser within the native application.

[0003] However, at present, the communication between some native applications and embedded browsers is often restricted. For example, the communication between the embedded browser and the native application is often triggered only when the native application rewinds, the component is destroyed, or the application is shared.

[0004] When a user needs to switch content pages, the embedded browser cannot be triggered to communicate with the native application, which often results in the inability to switch content pages, affecting the user's content page browsing experience. Summary of the invention

[0005] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a page switching method, an electronic device and a storage medium.

[0006] In a first aspect, the present disclosure provides a page switching method, comprising:

[0007] Displaying the first content page in the embedded browser of the native application;

[0008] In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser in the native application and displaying a transition page, where the transition page is a native page of the native application;

[0009] In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, where the first page request is used to request a second content page;

[0010] After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page;

[0011] Display the page corresponding to the page address in the embedded browser.

[0012] In a second aspect, the present disclosure provides an electronic device, including a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0013] Displaying the first content page in the embedded browser of the native application;

[0014] In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser in the native application and displaying a transition page, where the transition page is a native page of the native application;

[0015] In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, where the first page request is used to request a second content page;

[0016] After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page;

[0017] Display the page corresponding to the page address in the embedded browser.

[0018] In a third aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the page switching method of the first aspect.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] The page switching method, electronic device, and storage medium of the disclosed embodiment can trigger the sending of the first page request by closing the embedded browser and jumping to the transfer page after detecting the switching from the first content page to the second content page, and then start the embedded browser and display the page corresponding to the page address after obtaining the page address corresponding to the first page request based on the transfer page. Thus, the user's first switching operation can be responded to in a timely manner, improving the user's content page browsing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 A schematic diagram of a process flow of a page switching method provided by an embodiment of the present disclosure is shown;

[0023] Figure 2 A schematic diagram showing a flow chart of another page switching method provided by an embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram showing a flow chart of another page switching method provided by an embodiment of the present disclosure;

[0025] Figure 4A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] The embodiments of the present disclosure provide a page switching method, electronic device and storage medium that can trigger the sending of a page request to achieve timely response to content page switching by closing an embedded browser and displaying a transition page after a user triggers a content page switching operation.

[0033] Let's first combine Figure 1-3 The page switching method provided by the embodiment of the present disclosure is described.

[0034] The page switching method provided in the embodiment of the present disclosure can be implemented by an electronic device capable of providing an e-book reading function. The electronic device may include, but is not limited to, mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), wearable devices, and fixed terminals such as digital TVs, desktop computers, smart home devices, etc., without limitation.

[0035] Figure 1 A flow chart of a page switching method provided by an embodiment of the present disclosure is shown.

[0036] like Figure 1 As shown, the page switching method may include the following steps.

[0037] S110: Display the first content page in the embedded browser of the native application.

[0038] In the disclosed embodiment, when the user wants to browse the content page, the content page can be displayed in the embedded browser of the native application. Optionally, when the user wants to read the e-book on the native application, the content page corresponding to the e-book can be displayed.

[0039] First, for native applications, they are applications that can be installed in electronic devices and used by users. Optionally, native applications can be mini-program applications, that is, applications that can be sent from a server and executed in a specific container without installation. For example, a certain audio mini-program or a certain letter mini-program, which is not specifically limited.

[0040] Secondly, for an embedded browser, that is, a browser that can be embedded in a native application to carry and display a web page. Optionally, the embedded browser can be implemented as a WebView component, that is, a page control that can display a fifth-generation HyperText Markup Language 5 (H5) page.

[0041] Next, for the content page. That is, a web page displayed in a native application through an embedded browser. The content page can display the content provided by the target application platform. Optionally, the content page can be part of the content in an e-book provided by an e-book reading platform. For example, a content page can display the book content in a chapter of the target e-book. It should be noted that an e-book can also be divided into different content parts according to the situation and specific scenarios, such as the first volume, the second volume, etc., and this is not limited.

[0042] The first content page may be the current content page that the user is browsing. For example, when the user is reading the thirteenth chapter of an e-book, the web page that displays the e-book content of the thirteenth chapter is the first content page.

[0043] S120: In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser in the native application and displaying a transfer page, wherein the transfer page is a native page of the native application.

[0044] In an embodiment of the present disclosure, after detecting the first switching operation, the embedded browser may be closed and a transfer page may be displayed, so as to trigger communication from the embedded browser to the native application by closing the embedded browser.

[0045] First, a native page, that is, a local page of a native application, may be in the form of a page in the native application, and is used to carry or implement one or more functions of the native application.

[0046] Secondly, the transfer page can be a native page that serves as a transfer between the content page and the subsequent page to be displayed. In some embodiments, the transfer page can be a blank page, or can be set to other pages according to actual conditions and specific needs, such as a catalog page, an advertisement page, etc., without limitation.

[0047] Secondly, the first switching operation may include gesture control operations such as click, double-click, long press, slide, etc., for content switching on the electronic device, voice control operations or expression control operations, etc., which are not limited here.

[0048] In some embodiments, the first switching operation may be a triggering operation for a content page switching control on the embedded browser. Exemplarily, for a content page displaying the content of an e-book, the content page switching control may be a chapter switching control, i.e., a chapter turning control. Alternatively, the content page switching control may be a chapter control corresponding to each of the multiple chapters of the user. Accordingly, the current user may trigger any control in the multiple chapter controls to switch to the chapter content page corresponding to the arbitrary control.

[0049] In addition, for the specific content of the second content page, please refer to the specific description of the first content page, which will not be repeated here. The second content page can be the content page that the user wants to read. Exemplarily, the first content page and the second content page can be different contents of the same e-book, such as different chapters of the same e-book. For example, the second content page can be the previous chapter or the next chapter of the first content page, or it can be any chapter selected by the user, which is not limited to this.

[0050] S130 , in response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser.

[0051] In the embodiment of the present disclosure, a closing event of the embedded browser, that is, a component destruction event, can trigger the communication of the embedded browser to the native application, so that the first page request can be sent to the native application.

[0052] First, for the first page request, the first page request is used to request the second content page. It should be noted that by setting the main function of the embedded browser to display the content page, and through the communication between the embedded browser and the native application, the native application determines which content page to display and starts / closes the embedded browser, etc., thereby achieving the lightweight of the embedded browser and reducing the processing logic of the embedded browser.

[0053] In some embodiments, the first page request may be generated by the embedded browser based on the first switching operation, and sent to the native application based on a close event of the embedded browser.

[0054] Accordingly, before S130, the page switching method may further include step A1.

[0055] Step A1: In response to a first switching operation, a first page request is generated by an embedded browser.

[0056] Optionally, the embedded browser may generate a message sending function, wherein the message sending function may carry relevant information of the first switching operation, and the relevant information may represent information of the second content page to which the user targets to switch.

[0057] For example, it may include information that the current user has flipped up (i.e., switched to the previous chapter of the e-book content displayed on the first content page) or flipped down, etc. For another example, it may include address information of the second content page to be switched.

[0058] Accordingly, S130 may specifically include the following step A2.

[0059] Step A2: when a close event is detected, a first page request is obtained through the native application.

[0060] Optionally, if a closing event is monitored, the component destruction event may be used to trigger the embedded browser to communicate with the native application, thereby obtaining the first page request through the native application.

[0061] S140, after obtaining the page address corresponding to the first page request through the transfer page, start the embedded browser through the transfer page.

[0062] First, the page address may be the address of the web page displayed in the newly started embedded browser. Optionally, the page address may be the URL (Uniform Resource Locator) address of the web page. It should be noted that it may also be other addresses of the web page, which is not specifically limited.

[0063] In some embodiments, after the user performs the first switching operation, the second content page or the permission page can be displayed in the embedded browser. Accordingly, the page address can be the address of the second content page, or the address of the permission page for obtaining user permissions. For example, the address of the second content page can be the URL address of the second content page, and the address of the permission page can be the URL address of the permission page.

[0064] Among them, the corresponding permission page can be a page that allows the user to obtain the browsing permission of the second content page. Exemplarily, if the browsing permission of the second content page is for user membership, the permission page can be a member recharge page. In another exemplary embodiment, if the browsing permission of the second content page is to purchase the second content page, the permission page can be a purchase page of the second content page. In another exemplary embodiment, if the browsing permission of the second content page is to redeem the second content page by using the user's browsing behavior on the target page, the permission page can be the target page, or the redemption page. Exemplarily, the target page can be an advertising page. Browsing behavior can be browsing time or click frequency, etc. It should be noted that other permission pages and browsing permissions can also be set according to other scenarios and specific needs, and this is not limited.

[0065] In one example, in order to improve the security of the e-book reading platform, when the user has the browsing authority for the second content page, the address of the second content page can be used as the page address. And when the user does not have the browsing authority for the second content page, the address of the permission page can be used as the page address.

[0066] Through this example, the second content page can be displayed when the user has the browsing permission for the second content page. For example, if the first two chapters of the e-book are free chapters and the third chapter is a paid chapter, when the user wants to switch to the third chapter, the chapter to be displayed can be determined based on whether the user is a paid user, thereby ensuring the security of the e-book reading platform. Furthermore, when the user does not have the browsing permission for the second content page, by using the address of the permission page as the address of the page, the user can quickly switch to the permission page to set the permission, thereby improving the user's content page browsing experience.

[0067] In another example, in order to ensure the reading continuity of the user, the address of the second content page may be used as the page address.

[0068] Through this example, if the e-book is a free book, when the user performs the first switching operation, the second content page can be continuously displayed after the first content page by using the address of the second content page as the page address, thereby ensuring the user's reading continuity and improving the user's browsing experience of the content page.

[0069] Secondly, the specific method for obtaining the page address of the transfer page. Optionally, after the native application obtains the first switching request, the first switching request or the relevant parameters corresponding to the first switching request can be sent to the transfer page. Alternatively, the embedded browser directly sends the first switching request to the transfer page of the native application.

[0070] S150: Displaying a page corresponding to the page address in the embedded browser.

[0071] In the disclosed embodiment, the page address may be sent to the embedded browser through the native application. After the embedded browser receives the page address, it may display the page corresponding to the page address.

[0072] In some embodiments, if the page address is the address of the second content page, the displayed page is the second content page. Alternatively, if the page address is the address of the permission page, the displayed page is the permission page.

[0073] In the disclosed embodiment, after detecting the switch from the first content page to the second content page, the sending of the first page request can be triggered by closing the embedded browser and jumping to the intermediate page, and then after obtaining the page address corresponding to the first page request based on the intermediate page, the embedded browser is started and the page corresponding to the page address is displayed. Thus, the user's first switching operation can be responded to in a timely manner, improving the user's content page browsing experience.

[0074] In addition, it should be noted that through the embodiments of the present disclosure, there is no need to change the communication mechanism between the native application and the embedded browser. When the user switches the browsing page, the switching request can be transmitted to the native application in real time. Through simple improvements on the original construction, real-time switching of content pages can be achieved.

[0075] In order to fully understand the above advantages of the embodiments of the present disclosure, the above advantages of the embodiments of the present disclosure will be illustrated below based on specific scenarios by comparing related technologies with the embodiments of the present disclosure.

[0076] In a related technology, since the communication between the embedded browser and the native application is only triggered when the component is destroyed, the application is retracted, or shared, when the user performs the first switching operation on the embedded browser, the embedded browser will not inform the native application to switch the content page. For example, when the user is reading an e-book, the operation of switching chapters may not respond, affecting the user's e-book reading experience.

[0077] In the disclosed embodiment, when the user performs the first switching operation on the embedded browser, the embedded browser can be automatically closed and the display of the transfer page can be jumped in response to the first switching operation, thereby automatically triggering the closing event of the embedded browser, that is, the component destruction event, so that after the user performs the first switching operation, the embedded browser can automatically trigger the one-way communication toward the native application, so that the embedded browser can promptly inform the native application to switch the content page. For example, when the user is reading an e-book, the user can respond to the user's switching operation in a timely and correct manner when switching chapters, and display the subsequent page, which improves the user's e-book reading experience.

[0078] In some embodiments, the page switching method also includes the specific step of transferring the page to obtain the page address.

[0079] Accordingly, before S140, the page switching method further includes the following steps B1 and B2.

[0080] Step B1, sending an address acquisition request corresponding to the first page request to the server of the e-book reading platform through a transfer page.

[0081] Optionally, the transfer page may transmit information to the server of the e-book reading platform through an interface between the native application and the server of the e-book reading platform.

[0082] Optionally, in order to facilitate the server of the e-book reading platform to accurately determine the next page to be displayed after the first content page, the address acquisition request may include content page switching information transmitted to the transfer page through the first page request. The content page switching information can represent information of the second content page to which the user targets to switch.

[0083] For example, it may include information that the current user has flipped up (i.e., switched to the previous chapter of the e-book content displayed on the first content page) or flipped down, etc. For another example, it may include address information of the second content page to be switched.

[0084] Optionally, the native application may respond to the first page request and determine whether the current user has the browsing authority for the second content page through the transfer page. When it is determined that the current user has the browsing authority for the second content page, an address acquisition request for requesting the page address of the second content page is sent to the server of the e-book reading platform. And, when it is determined that the current user does not have the browsing authority for the second content page, an address acquisition request for requesting the page address of the permission page is sent to the server of the e-book reading platform.

[0085] Step B2: receiving the page address fed back by the server of the e-book reading platform based on the address acquisition request through the transfer page.

[0086] In the disclosed embodiment, after the transfer page sends an address acquisition request to the server of the e-book reading platform, the server can determine the page address based on the address acquisition request.

[0087] The page address can be found in the relevant description of S140 in the embodiment of the present disclosure, and will not be repeated here.

[0088] Optionally, the server of the e-book reading platform can parse the content page switching information from the received address acquisition request, and then determine the page address accordingly. For example, if the current user performs the first switching operation representing turning up a chapter, the content page address of the previous chapter of the e-book chapter corresponding to the first content page is fed back. For another example, if the current user performs the first switching operation representing turning down a chapter, the content page address of the next chapter of the e-book chapter corresponding to the first content page is fed back.

[0089] Optionally, after receiving the address acquisition request for requesting the page address of the second content page, the server of the e-book reading platform feeds back the address of the second content page to the transfer page. Also, after receiving the address acquisition request for requesting the page address of the permission page, the server of the e-book reading platform feeds back the address of the permission page to the transfer page.

[0090] Through this embodiment, the page address of the page to be displayed can be obtained through information interaction between the native application and the e-book reading platform, so that the e-book content can be provided to the native application accurately and in real time through the e-book reading platform.

[0091] In other embodiments, the transfer page may obtain the page address based on the first page request. Optionally, the transfer page may determine the page address based on the content page switching information carried by the first page request or the address information of the second content page. For example, if the current user has the browsing permission of the second content page, the page address of the second content page may be determined by the content page switching information, or the address information of the second content page may be directly parsed from the first page request. Optionally, if the transfer page determines that the current user does not have the browsing permission of the second content page, the page address of the permission page may be obtained. Among them, the page address of the permission page may be pre-set locally on the transfer page, or obtained from the server of the e-book reading platform, which is not specifically limited.

[0092] Through this embodiment, the page address can be obtained through the transfer page, so that the first content page can be quickly switched to the page corresponding to the page address.

[0093] Figure 2 The flowchart of another page switching method provided by the embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.

[0094] like Figure 2 As shown, the page switching method may include the following steps.

[0095] S210: Display the first content page in the embedded browser of the native application.

[0096] Among them, S210 is similar to S110, and the specific content of S110 can be referred to, which will not be repeated here.

[0097] S220: In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser in the native application and displaying a transfer page, wherein the transfer page is a native page of the native application.

[0098] Among them, S220 is similar to S120, and the specific content of S120 can be referred to, which will not be repeated here.

[0099] S230: In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, wherein the first page request is used to request a second content page.

[0100] Among them, S230 is similar to S130, and the specific content of S130 can be referred to, which will not be repeated here.

[0101] S240, judging whether the current user has the browsing authority for the second content page through the transfer page. Optionally, whether the current user has the browsing authority for the second content page can be determined based on the user identity information of the current user.

[0102] In some embodiments, the transfer page may locally determine whether the current user has browsing authority for the second content page.

[0103] In other embodiments, the transfer page may call the server of the e-book reading platform through an interface with the server of the e-book reading platform to determine whether the current user has the browsing authority for the second content page.

[0104] S250: When it is determined that the current user has browsing authority, determine that the page address is an address of a second content page.

[0105] S260: Obtain the address of the second content page through the transfer page.

[0106] Optionally, the transfer page can directly obtain the address of the second content page by parsing the first page request, or determine the address of the second content page according to the content page switching information in the first page request.

[0107] Alternatively, the transfer page may obtain the address of the second content page by calling the server of the e-book reading platform.

[0108] S270, after obtaining the page address corresponding to the first page request through the transfer page, start the embedded browser through the transfer page.

[0109] Among them, S270 is similar to S140, and the specific content of S140 can be referred to, which will not be repeated here.

[0110] S280, displaying a page corresponding to the page address in the embedded browser.

[0111] In the embodiment of the present disclosure, the address of the second content page may be sent to the embedded browser via the transfer page, so that the embedded browser displays the second content page based on the address of the second content page.

[0112] In the disclosed embodiment, after detecting the switch from the first content page to the second content page, the sending of the first page request can be triggered by closing the embedded browser and jumping to the intermediate page, and then after obtaining the page address corresponding to the first page request based on the intermediate page, the embedded browser is started and the page corresponding to the page address is displayed. Thus, the user's first switching operation can be responded to in a timely manner, improving the user's content page browsing experience.

[0113] Furthermore, through this embodiment, the browsing authority of the user can be verified through the transfer page, thereby restricting the browsing of the second content page by unauthorized users and protecting the e-book reading platform.

[0114] In some embodiments, after S240 , the page switching method further includes: step C1 and step C2 .

[0115] Step C1, when it is determined that the current user does not have browsing authority, determining that the page resource is a resource of a permission page for obtaining user authority.

[0116] Step C2, obtaining the address of the permission page through the transfer page.

[0117] Optionally, the transfer page can obtain the address of the permission page locally.

[0118] Alternatively, the transfer page can obtain the address of the permission page by calling the server of the e-book reading platform.

[0119] Through this embodiment, when the current user does not have the browsing permission for the second content page, by using the address of the permission page as the address of the page, the user can quickly switch to the permission page to set the permission, thereby improving the user's content page browsing experience.

[0120] Figure 3 A flow chart of another page switching method provided by an embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.

[0121] like Figure 3 As shown, the page switching method may include the following steps.

[0122] S310: Displaying a first content page in an embedded browser of the native application.

[0123] Among them, S310 is similar to S110, and the specific content of S310 can be referred to, which will not be repeated here.

[0124] S320: In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser in the native application and displaying a transfer page, wherein the transfer page is a native page of the native application.

[0125] Among them, S320 is similar to S120, and the specific content of S120 can be referred to, which will not be repeated here.

[0126] S330 , in response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, where the first page request is used to request a second content page.

[0127] Among them, S330 is similar to S130, and the specific content of S130 can be referred to, which will not be repeated here.

[0128] S340, after obtaining the page address corresponding to the first page request through the transfer page, start the embedded browser through the transfer page.

[0129] Among them, S340 is similar to S140, and the specific content of S140 can be referred to, which will not be repeated here.

[0130] S350: Display a page corresponding to the page address in the embedded browser.

[0131] Among them, S350 is similar to S150, and the specific content of S150 can be referred to, which will not be repeated here.

[0132] S360, in response to detecting a second switching operation from the first content page to the directory page, after sending a second page request for the directory page to the native application through the embedded browser, a directory page is generated, where the directory page is a native page of the native application.

[0133] First, the catalog page is a page for displaying the catalog of target electronic books. The specific content of the catalog page is similar to that of the transfer page, and the relevant content of the transfer page can be found, which will not be repeated here.

[0134] Secondly, for the second switching operation, it may include gesture control operations such as clicking, double-clicking, long pressing, sliding, etc., for displaying the catalog page on the electronic device, voice control operations or expression control operations, etc., which are not limited here.

[0135] In some embodiments, the second switching operation may be a triggering operation for a directory page display control on the embedded browser.

[0136] Secondly, for the second page request of the directory page, after detecting the second switching operation, the second page request can be generated by the embedded browser, and the second page request can be sent to the native application by the embedded browser. Optionally, when the second switching operation is detected, the embodiment of the present disclosure triggers the communication opportunity of the embedded browser to the native application, and sends the second page request to the native application in a timely manner.

[0137] S370, loading directory resources through the directory page.

[0138] In the embodiment of the present application, the directory resource can be displayed by jumping from the embedded browser, and the address parameter of the directory can be parsed from the jump function generated by the embedded browser and sent to the directory page. And the directory resource is parsed according to the directory parameter, so that the parsed directory resource is loaded into the directory page. Optionally, the directory resource can be the directory content of the e-book.

[0139] S380: Displaying a directory page loaded with directory resources in the native application.

[0140] In the disclosed embodiment, after detecting the switch from the first content page to the second content page, the sending of the first page request can be triggered by closing the embedded browser and jumping to the intermediate page, and then after obtaining the page address corresponding to the first page request based on the intermediate page, the embedded browser is started and the page corresponding to the page address is displayed. Thus, the user's first switching operation can be responded to in a timely manner, improving the user's content page browsing experience.

[0141] After sending a second page request for the directory page to the native application through the embedded browser, the embedded browser continues to run in the background.

[0142] In some embodiments, before S380 , the page switching method may further include step D1 .

[0143] Step D1, after sending a second page request for a directory page to the native application through the embedded browser, continue to run the embedded browser in the background.

[0144] Optionally, in order to facilitate the user to return to the original browsing page later, the first content page can be put into the history page queue of the native application background.

[0145] Through this embodiment, by continuing to run the embedded browser in the background, it is convenient for the user to quickly call the embedded browser when he needs to continue browsing the content page later, thereby improving the user's content page browsing experience.

[0146] In some embodiments, after S380, the page switching method further includes step D2 and step D3.

[0147] Step D2, in response to receiving a page rollback operation of the directory page, closing the directory page.

[0148] First of all, the page back operation may include gesture control operations such as clicking, double-clicking, long pressing, sliding, etc., used to exit the directory page on the electronic device, voice control operations, or expression control operations, etc., which are not limited here.

[0149] In some embodiments, the page back operation may be a trigger operation for an exit control or a close control on a directory page.

[0150] Step D3, running the embedded browser in the foreground, and displaying the first content page through the embedded browser.

[0151] Optionally, after closing the directory page, the first content page may be extracted from the history page queue, and the first content page may be displayed through the embedded browser.

[0152] Through this embodiment, after the user exits the directory page, the user can return to the original reading page, avoiding the tedious operation of the user having to repeatedly open the content page after closing the directory page, thereby improving the user's content page browsing experience.

[0153] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0154] The electronic device provided in the embodiments of the present disclosure may include an electronic device supporting an e-book reading function. The electronic device may include, but is not limited to, mobile terminals such as smart phones, laptop computers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, and fixed terminals such as digital TVs, desktop computers, smart home devices, etc., without limitation.

[0155] It should be noted that Figure 4 The electronic device 400 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0156] The electronic device 400 conventionally includes a processor 410 and a computer program product or computer-readable medium in the form of a memory 420. The memory 420 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 420 has a storage space 421 for executable instructions (or program code) 4211 for executing any method steps in the above-mentioned note processing method. For example, the storage space 421 for executable instructions may include individual executable instructions 4211 respectively used to implement various steps in the above-mentioned note processing method. These executable instructions may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit. The storage unit may have a storage device having a storage medium ... Figure 4The memory 420 in the electronic device 400 is similarly arranged as a storage segment or storage space. The executable instructions can be compressed, for example, in an appropriate form. Generally, the storage unit includes executable instructions for executing the steps of the note processing method according to the present disclosure, that is, codes that can be read by a processor such as the processor 410, and when these codes are executed by the electronic device 400, the electronic device 400 executes the various steps in the note processing method described above.

[0157] Of course, to simplify, Figure 4 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, an input device, an output device, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.

[0158] The embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the note processing method provided by the embodiments of the present disclosure.

[0159] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0160] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0161] In the embodiments of the present disclosure, the program code for performing the operations of the present disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0162] This application discloses:

[0163] A1. A page switching method, wherein the method comprises:

[0164] Displaying the first content page in the embedded browser of the native application;

[0165] In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser and displaying a transition page in the native application, the transition page being a native page of the native application;

[0166] In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, wherein the first page request is used to request the second content page;

[0167] After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page;

[0168] The page corresponding to the page address is displayed in the embedded browser.

[0169] A2. The method according to A1, wherein:

[0170] The native application is a mini-program application, the embedded browser is a webview component, and the transfer page is a blank page.

[0171] A3. The method according to A1, wherein before closing the embedded browser and displaying the transfer page in the native application, the method further comprises:

[0172] In response to the first switching operation, generating a first page request through the embedded browser;

[0173] The step of responding to a closing event of the embedded browser and receiving, through the native application, a first page request sent by the embedded browser specifically includes:

[0174] When the closing event is monitored, the first page request is obtained through the native application.

[0175] A4. The method according to A1, wherein the page address is the address of the second content page, or the page resource is the address of a permission page for obtaining user permissions.

[0176] A5. The method according to A1, wherein:

[0177] Before starting the embedded browser through the transfer page, the method further includes:

[0178] Sending an address acquisition request corresponding to the first page request to a server of the e-book reading platform through the transfer page;

[0179] The page address fed back by the server based on the address acquisition request is received through the transfer page.

[0180] A6. The method according to A1, wherein before starting the embedded browser through the transfer page, the method further comprises:

[0181] Determining whether the current user has the browsing authority of the second content page through the transfer page;

[0182] In the case where it is determined that the current user has the browsing authority, determining the page address to be the address of the second content page, and determining the address of the second content page to be the page address;

[0183] The address of the second content page is obtained through the transfer page.

[0184] A7. The method according to A6, wherein:

[0185] After determining whether the current user has browsing authority for the second content page through the transfer page, the method further includes:

[0186] In the case where it is determined that the current user does not have the browsing authority, determining that the page resource is an address of a permission page for obtaining user authority;

[0187] The address of the permission page is obtained through the transfer page.

[0188] A8. The method according to A1, wherein after displaying the first content page in the embedded browser of the native application, the method further comprises:

[0189] In response to detecting a second switching operation from the first content page to the directory page, after sending a second page request for the directory page to the native application through the embedded browser, generating a directory page, the directory page being a native page of the native application;

[0190] Loading directory resources through the directory page;

[0191] The native application displays a directory page loaded with the directory resource.

[0192] A9. The method according to A8, wherein before the native application displays the directory page loaded with the directory resource, the method further comprises:

[0193] After sending the second page request for the directory page to the native application through the embedded browser, the embedded browser continues to run in the background.

[0194] A10. The method according to A8, wherein, after the native application displays the directory page loaded with the directory resource, the method further comprises:

[0195] In response to receiving a page rollback operation of the directory page, closing the directory page;

[0196] The embedded browser is run in the foreground, and the first content page is displayed through the embedded browser.

[0197] B11. An electronic device, comprising a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0198] Displaying the first content page in the embedded browser of the native application;

[0199] In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser and displaying a transition page in the native application, the transition page being a native page of the native application;

[0200] In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, wherein the first page request is used to request the second content page;

[0201] After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page;

[0202] The page corresponding to the page address is displayed in the embedded browser.

[0203] B12. An electronic device according to B11, wherein the native application is a mini-program application, the embedded browser is a webview component, and the transfer page is a blank page.

[0204] B13. The electronic device according to B11, wherein before the processor executes closing the embedded browser in the native application and displaying the transfer page, the executable instructions further cause the processor to execute:

[0205] In response to the first switching operation, generating a first page request through the embedded browser;

[0206] The step of responding to a closing event of the embedded browser and receiving, through the native application, a first page request sent by the embedded browser specifically includes:

[0207] When the closing event is monitored, the first page request is obtained through the native application.

[0208] B14. The electronic device according to B11, wherein the page address is an address of a second content page, or the page resource is an address of a permission page for obtaining user permissions.

[0209] B15. The electronic device according to B11, wherein before the processor executes the launching of the embedded browser through the transfer page, the executable instructions further cause the processor to execute:

[0210] Sending an address acquisition request corresponding to the first page request to a server of the e-book reading platform through the transfer page;

[0211] The page address fed back by the server based on the address acquisition request is received through the transfer page.

[0212] B16. The electronic device according to B11, wherein before launching the embedded browser through the transfer page, the executable instruction further causes the processor to execute:

[0213] Determining whether the current user has the browsing authority of the second content page through the transfer page;

[0214] In the case where it is determined that the current user has the browsing authority, determining the page address to be the address of the second content page, and determining the address of the second content page to be the page address;

[0215] The address of the second content page is obtained through the transfer page.

[0216] B17. The electronic device according to B16, wherein:

[0217] After the processor executes the step of determining whether the current user has the browsing authority of the second content page through the transfer page, the executable instruction further causes the processor to execute:

[0218] In the case where it is determined that the current user does not have the browsing authority, determining that the page resource is an address of a permission page for obtaining user authority;

[0219] The address of the permission page is obtained through the transfer page.

[0220] B18. The electronic device according to B11, wherein after the processor executes the embedded browser of the native application to display the first content page, the executable instructions further cause the processor to execute:

[0221] In response to detecting a second switching operation from the first content page to the directory page, after sending a second page request for the directory page to the native application through the embedded browser, generating a directory page, the directory page being a native page of the native application;

[0222] Loading directory resources through the directory page;

[0223] The native application displays a directory page loaded with the directory resource.

[0224] B19. The electronic device according to B18, wherein before the processor executes the step of displaying the directory page loaded with the directory resource in the native application, the executable instruction further causes the processor to execute:

[0225] After sending the second page request for the directory page to the native application through the embedded browser, the embedded browser continues to run in the background.

[0226] B20. The electronic device according to B18, wherein after the processor executes the step of displaying the directory page loaded with the directory resource in the native application, the executable instruction further causes the processor to execute:

[0227] In response to receiving a page rollback operation of the directory page, closing the directory page;

[0228] The embedded browser is run in the foreground, and the first content page is displayed through the embedded browser.

[0229] C21. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the page switching method described in any one of A1-A10 above.

[0230] The various component embodiments of the present disclosure can be implemented in hardware in all or part of the steps, or implemented in software modules running on one or more processors, or implemented in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0231] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0232] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0233] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A page switching method, It is characterized in that The method comprises: Displaying the first content page in the embedded browser of the native application; In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser and displaying a transition page in the native application, the transition page being a native page of the native application; In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, wherein the first page request is used to request the second content page; After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page; The page corresponding to the page address is displayed in the embedded browser.

2. The method according to claim 1, It is characterized in that The native application is a mini-program application, the embedded browser is a webview component, and the transfer page is a blank page.

3. The method according to claim 1, It is characterized in that Before closing the embedded browser and displaying the transfer page in the native application, the method further includes: In response to the first switching operation, generating a first page request through the embedded browser; The step of responding to a closing event of the embedded browser and receiving, through the native application, a first page request sent by the embedded browser specifically includes: When the closing event is monitored, the first page request is obtained through the native application.

4. The method according to claim 1, It is characterized in that The page address is the address of the second content page, or the page resource is the address of a permission page for obtaining user permissions.

5. The method according to claim 1, It is characterized in that Before starting the embedded browser through the transfer page, the method further includes: Sending an address acquisition request corresponding to the first page request to a server of the e-book reading platform through the transfer page; The page address fed back by the server based on the address acquisition request is received through the transfer page.

6. The method according to claim 1, It is characterized in that Before starting the embedded browser through the transfer page, the method further includes: Determining whether the current user has the browsing authority of the second content page through the transfer page; In the case where it is determined that the current user has the browsing authority, determining the page address to be the address of the second content page, and determining the address of the second content page to be the page address; The address of the second content page is obtained through the transfer page.

7. The method according to claim 6, It is characterized in that After determining whether the current user has browsing authority for the second content page through the transfer page, the method further includes: In the case where it is determined that the current user does not have the browsing authority, determining that the page resource is an address of a permission page for obtaining user authority; The address of the permission page is obtained through the transfer page.

8. The method according to claim 1, It is characterized in that After displaying the first content page in the embedded browser of the native application, the method further includes: In response to detecting a second switching operation from the first content page to the directory page, after sending a second page request for the directory page to the native application through the embedded browser, generating a directory page, the directory page being a native page of the native application; Loading directory resources through the directory page; The native application displays a directory page loaded with the directory resource.

9. The method according to claim 8, It is characterized in that Before the native application displays the directory page loaded with the directory resource, the method further includes: After sending the second page request for the directory page to the native application through the embedded browser, the embedded browser continues to run in the background.

10. The method according to claim 8, It is characterized in that After the native application displays the directory page loaded with the directory resource, the method further includes: In response to receiving a page rollback operation of the directory page, closing the directory page; The embedded browser is run in the foreground, and the first content page is displayed through the embedded browser.

11. An electronic device, It is characterized in that The invention comprises a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations: Displaying the first content page in the embedded browser of the native application; In response to detecting a first switching operation from the first content page to the second content page, closing the embedded browser and displaying a transition page in the native application, the transition page being a native page of the native application; In response to a closing event of the embedded browser, receiving, through the native application, a first page request sent by the embedded browser, wherein the first page request is used to request the second content page; After obtaining the page address corresponding to the first page request through the transfer page, starting the embedded browser through the transfer page; The page corresponding to the page address is displayed in the embedded browser.

12. The electronic device according to claim 11, It is characterized in that The native application is a mini-program application, the embedded browser is a webview component, and the transfer page is a blank page.

13. The electronic device according to claim 11, It is characterized in that Before the processor executes the closing of the embedded browser in the native application and the display of the transfer page, the executable instructions further cause the processor to execute: In response to the first switching operation, generating a first page request through the embedded browser; The step of responding to a closing event of the embedded browser and receiving, through the native application, a first page request sent by the embedded browser specifically includes: When the closing event is monitored, the first page request is obtained through the native application.

14. The electronic device according to claim 11, It is characterized in that The page address is the address of the second content page, or the page resource is the address of a permission page for obtaining user permissions.

15. The electronic device according to claim 11, It is characterized in that Before the processor executes the step of launching the embedded browser through the transfer page, the executable instructions further cause the processor to execute: Sending an address acquisition request corresponding to the first page request to a server of the e-book reading platform through the transfer page; The page address fed back by the server based on the address acquisition request is received through the transfer page.

16. The electronic device according to claim 11, It is characterized in that Before launching the embedded browser through the transfer page, the executable instructions further cause the processor to execute: Determining whether the current user has the browsing authority of the second content page through the transfer page; In the case where it is determined that the current user has the browsing authority, determining the page address to be the address of the second content page, and determining the address of the second content page to be the page address; The address of the second content page is obtained through the transfer page.

17. The electronic device according to claim 16, It is characterized in that After the processor executes the step of determining whether the current user has the browsing authority of the second content page through the transfer page, the executable instruction further causes the processor to execute: In the case where it is determined that the current user does not have the browsing authority, determining that the page resource is an address of a permission page for obtaining user authority; The address of the permission page is obtained through the transfer page.

18. The electronic device according to claim 11, It is characterized in that After the processor executes the embedded browser of the native application and displays the first content page, the executable instructions further cause the processor to execute: In response to detecting a second switching operation from the first content page to the directory page, after sending a second page request for the directory page to the native application through the embedded browser, generating a directory page, the directory page being a native page of the native application; Loading directory resources through the directory page; The native application displays a directory page loaded with the directory resource.

19. The electronic device according to claim 18, It is characterized in that Before the processor executes the step of displaying the directory page loaded with the directory resource in the native application, the executable instructions further cause the processor to execute: After sending the second page request for the directory page to the native application through the embedded browser, the embedded browser continues to run in the background.

20. The electronic device according to claim 18, It is characterized in that After the processor executes the step of displaying the directory page loaded with the directory resource in the native application, the executable instructions further cause the processor to execute: In response to receiving a page rollback operation of the directory page, closing the directory page; The embedded browser is run in the foreground, and the first content page is displayed through the embedded browser.

21. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the page switching method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Backspacing interaction method of App built-in browser and embedded webpage

    CN106339163A

  • Page end and native end communication method and device, equipment and readable medium

    CN111459685A