A page display method, device, apparatus and storage medium

CN110618848BActive Publication Date: 2026-08-21BEIJING TIME FLIES TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201811591974.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-25
Publication Date
2026-08-21
Estimated Expiration
2038-12-25

AI Technical Summary

Technical Problem

[0003]上述页面显示场景中,生成的页面会逐渐增多,页面过多会造成内存占满、页面卡顿等问题

Benefits of technology

[0041]本公开实施例的技术方案,在依次显示至少三个页面后,可以根据用户操作从当前显示页面返回到上一页面;在返回时若确定存在页面销毁记录,可以直接重新创建被销毁的页面,并通过调整页面绘制顺序使当前显示页面为上一页面,实现了页面的逐级返回,而且无需等待页面重新加载;在根据用户操作确定需要返回到重新创建的页面时,可以直接获取重新创建的页面并进行显示,并且可以直接返回到页面之前的浏览记录。上述技术方案缩短了页面返回时所需要的页面加载的时间,提高了页面的显示效率,实现了页面的顺畅加载。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110618848B_ABST
    Figure CN110618848B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a page display method, device, equipment and storage medium. The method comprises the following steps: after displaying at least three pages in sequence, returning to a previous page from a currently displayed page according to a user operation, and determining whether there is a page destruction record; if there is a page destruction record, re-creating the destroyed page, and making the currently displayed page the previous page by adjusting a page drawing order; when it is determined according to the user operation that it is needed to return to the re-created page, obtaining and displaying the re-created page. The technical solution of the embodiments of the present disclosure shortens the time required for page loading when returning to a page, improves the display efficiency of the page, and realizes smooth loading of the page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of application development technology, and in particular to a page display method, apparatus, device, and storage medium. Background Technology

[0002] In Android systems where pages are displayed hierarchically, each time a user clicks a link on the currently displayed page, a new page is generated and displayed. For example, if the currently displayed page is page A, clicking a link on page A generates and displays page B, clicking a link on page B generates and displays page C, and so on.

[0003] In the above page display scenario, the number of generated pages gradually increases, and too many pages can cause problems such as memory exhaustion and page lag. To solve these problems, one solution is to retain only a limited number of pages and destroy the rest. However, with this solution, when it is necessary to return to the previous page from the currently displayed page, if the page has been destroyed, the destroyed page needs to be reloaded, which takes a long time and results in a poor user experience. Summary of the Invention

[0004] This disclosure provides a page display method, apparatus, device, and storage medium to shorten the page loading time required when returning to a page and improve page display efficiency.

[0005] In a first aspect, embodiments of this disclosure provide a page display method, which may include:

[0006] After displaying at least three pages in sequence, return to the previous page from the currently displayed page based on the user's operation, and determine whether there is a page destruction record;

[0007] If a page destruction record exists, the destroyed page will be recreated, and the page rendering order will be adjusted so that the currently displayed page is the previous page.

[0008] When it is determined from the user's actions that the user needs to return to the newly created page, the newly created page is retrieved and displayed.

[0009] In the above solution, optionally, the current display page can be made to be the previous page by adjusting the page rendering order. Specifically, this can include:

[0010] The drawing order of recreated destroyed pages is adjusted to take precedence over other pages, and the drawing order of other pages is consistent with the display order when at least three pages are displayed in sequence.

[0011] Optionally, after recreating the destroyed page, the page display method may further include: adjusting the transmission order of screen touch events to each page, so as to prioritize the transmission of detected screen touch events to the currently displayed page.

[0012] In the above solution, optionally, the transmission order of screen touch events can be adjusted to prioritize the transmission of detected screen touch events to the currently displayed page. Specifically, this may include:

[0013] The order in which screen touch events are passed to each page is adjusted as follows: the currently displayed page is placed before the recreated and destroyed page, other pages are placed between the currently displayed page and the recreated and destroyed page, and the order of other pages is the reverse of the display order when at least three pages are displayed in sequence.

[0014] Optionally, in the above solution, at least three pages may be displayed sequentially, which may specifically include:

[0015] Create an activity component and a fragment component associated with the activity component. Load the current page content that needs to be displayed into the newly created fragment component for display.

[0016] Subsequently, each time a new page needs to be displayed based on the user's click on a link on the currently displayed page, a new fragment component associated with the activity component is created, and the content of the new page to be displayed is loaded into the newly created fragment component for display. Also, it is determined whether the number of existing pages is greater than a set threshold. If so, the corresponding page is destroyed by destroying the created fragment component, so that the number of existing pages is not higher than the set threshold, which is an integer not less than 3.

[0017] Optionally, the page display method may further include: adding the identifier of the displayed page to a preset stack each time a page is displayed;

[0018] The method of destroying the corresponding page by destroying the created fragment component can specifically include: destroying the fragment component corresponding to the page identifier at the bottom of the preset stack to destroy the corresponding page; deleting the page identifier at the bottom of the stack and recording the identifier of the destroyed page;

[0019] The re-creation of the destroyed page may specifically include: creating a new fragment component associated with the activity component, and loading the page content corresponding to the identifier of the most recently recorded destroyed page into the newly created fragment component for display.

[0020] Secondly, embodiments of this disclosure also provide a page display device, which may include:

[0021] The page destruction record determination module is used to return from the currently displayed page to the previous page based on the user's operation after displaying at least three pages in sequence, and to determine whether there is a page destruction record.

[0022] The page destruction and reconstruction module is used to recreate the destroyed page if a page destruction record exists, and adjust the page drawing order so that the currently displayed page is the previous page.

[0023] The page display reconstruction module is used to retrieve and display the recreated page when it is determined from the user's operation that a return to the recreated page is required.

[0024] Optionally, in the above solution, the page destruction and reconstruction module may further include:

[0025] The page destruction and reconstruction unit is used to adjust the drawing order of the recreated destroyed pages to take precedence over other pages, and the drawing order of other pages is consistent with the display order when at least three pages are displayed in sequence.

[0026] Optionally, in the above solution, the page display device may further include:

[0027] The transmission order adjustment module is used to adjust the transmission order of screen touch events to each page, so as to prioritize the transmission of detected screen touch events to the currently displayed page.

[0028] Optionally, in the above scheme, the transmission order adjustment module may include:

[0029] The transmission order adjustment unit is used to adjust the transmission order of screen touch events to each page so that: the currently displayed page is placed before the recreated and destroyed page, other pages are placed between the currently displayed page and the recreated and destroyed page, and the order of other pages is the reverse of the display order when at least three pages are displayed in sequence.

[0030] Optionally, in the above solution, the page destruction record determination module may include:

[0031] The current page content display unit is used to create an activity component and a fragment component associated with the activity component. The current page content that needs to be displayed is loaded into the currently created fragment component for display.

[0032] The existing page count determination unit is used to create a new fragment component associated with the activity component each time a new page needs to be displayed based on the user's click operation on the link of the currently displayed page, load the content of the new page to be displayed into the newly created fragment component for display, and determine whether the number of existing pages is greater than a set threshold. If so, the corresponding page is destroyed by destroying the created fragment component to ensure that the number of existing pages is not higher than the set threshold, which is an integer not less than 3.

[0033] Optionally, the page display device may further include: an identifier addition module, used to add the identifier of the displayed page to a preset stack each time a page is displayed;

[0034] The existing page count determination unit can also be used to destroy the fragment component corresponding to the page identifier at the bottom of the preset stack, thereby destroying the corresponding page; delete the page identifier at the bottom of the stack, and record the identifier of the destroyed page;

[0035] The current page content display unit can also be used to create a new fragment component associated with the activity component, and load the page content corresponding to the identifier of the most recently recorded destroyed page into the newly created fragment component for display.

[0036] Thirdly, embodiments of this disclosure also provide a terminal device, which may include:

[0037] One or more processors;

[0038] Memory, used to store one or more programs.

[0039] When one or more programs are executed by one or more processors, the one or more processors implement the page display method provided in any embodiment of this disclosure.

[0040] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page display method provided in any embodiment of this disclosure.

[0041] The technical solution of this disclosure embodiment, after displaying at least three pages sequentially, allows users to return to the previous page from the currently displayed page based on user actions. If a page destruction record is detected during the return, the destroyed page can be directly recreated, and the page rendering order can be adjusted so that the currently displayed page is the previous page, achieving a step-by-step return of pages without waiting for page reloading. When it is determined from user actions that a return to a newly created page is necessary, the newly created page can be directly retrieved and displayed, and the browsing history can be directly returned to. The above technical solution shortens the page loading time required for page return, improves page display efficiency, and achieves smooth page loading. Attached Figure Description

[0042] Figure 1 This is a flowchart of a page display method according to Embodiment 1 of this disclosure;

[0043] Figure 2A This is a schematic diagram of a page display method according to Embodiment 1 of this disclosure;

[0044] Figure 2B This is a schematic diagram of a page display method according to Embodiment 1 of this disclosure;

[0045] Figure 2C This is a schematic diagram of a page display method according to Embodiment 1 of this disclosure;

[0046] Figure 2D This is a schematic diagram of a page display method according to Embodiment 1 of this disclosure;

[0047] Figure 3 This is a flowchart of a page display method according to Embodiment 2 of this disclosure;

[0048] Figure 4 This is a flowchart of a page display method according to Embodiment 3 of this disclosure;

[0049] Figure 5 This is a structural block diagram of a page display device according to Embodiment 4 of this disclosure;

[0050] Figure 6 This is a schematic diagram of the structure of a terminal device according to Embodiment 5 of this disclosure. Detailed Implementation

[0051] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present disclosure and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the drawings, not the entire structure.

[0052] In the following embodiments, each embodiment provides optional features and examples. The features described in the embodiments can be combined to form multiple optional solutions. Each numbered embodiment should not be regarded as only one technical solution.

[0053] Example 1

[0054] Figure 1 This is a flowchart of a page display method provided in Embodiment 1 of this disclosure. This embodiment is applicable to situations involving page display, and is particularly suitable for situations involving the sequential display of multiple pages. This method can be executed by the page display device provided in this disclosure, which can be implemented in software and / or hardware, and can be integrated into various user terminal devices or servers. See also... Figure 1 The method of this disclosure specifically includes the following steps:

[0055] S110. After displaying at least three pages in sequence, return to the previous page from the currently displayed page based on the user's operation, and determine whether there is a page destruction record.

[0056] If a link on the currently displayed page is clicked, the Android system can sequentially generate and display new pages. For example, if the currently displayed page is page A, when a link on page A is clicked, page B is generated and displayed; when a link on page B is clicked, page C is generated and displayed, and so on. These pages can be displayed sequentially and stored in system memory. Furthermore, to avoid excessive page generation leading to memory exhaustion and page lag, some earlier generated pages can be destroyed, and the destroyed pages are recorded. The browsing progress of the destroyed pages can also be recorded, and this progress can be displayed as a percentage.

[0057] For example, in a scenario where a user clicks a link to generate a new page, if the system is pre-set to only retain three pages in memory, the following situations might occur: page A generates and displays page B, and page B generates and displays page C, etc. Figure 2A As shown; when page D is generated and displayed from page C, page A is destroyed and recorded, as follows. Figure 2B As shown; when page E is generated and displayed from page D, page B is destroyed and recorded, as follows. Figure 2C As shown, pages A and B have been destroyed, and only pages C, D, and E remain in system memory, with page E displayed at the forefront, followed by pages D and C. Therefore, the previous page relative to the currently displayed page E is page D.

[0058] Of course, it's understandable that after at least three pages have been generated and displayed sequentially, upon receiving an instruction to return to the previous page from the current display page—for example, an instruction corresponding to a "back operation"—the user can return from the current display page to the previous page, such as from page E to page D, allowing them to continue browsing the content of the previous page. Furthermore, it can be determined whether there are any page destruction records.

[0059] S120. If a page destruction record exists, the destroyed page is recreated, and the page drawing order is adjusted so that the currently displayed page is the previous page.

[0060] In cases where page destruction records exist, the destroyed page can be recreated to shorten page loading time when returning to the previous page. For example, when returning from the currently displayed page E to the previous page D, if destruction records for pages A and B are confirmed, considering that the system memory can only hold three pages, the destroyed page B can be recreated. Furthermore, based on the page destruction records, the browsing history of the recreated page B can be synchronized with the browsing history of the destroyed page B. Figure 2D As shown.

[0061] According to the default page display order in the Android system, the most recently generated page, or in other words, the most recently drawn page, becomes the currently displayed page. However, to maintain the order in which users browse pages, the previous page should become the currently displayed page when a back operation is performed. This can be achieved by adjusting the page drawing order. For example, after recreating page B, to ensure that the currently displayed page is still D, the page drawing order needs to be adjusted. Specifically, it can be adjusted from C->D->B to B->C->D. This is because page B is drawn first, then page C, and finally page D, so that page C covers page B, and page D covers page C, ultimately displaying the content of page D. Therefore, when a back operation is performed, page D with the adjusted drawing order becomes the currently displayed page.

[0062] S130. When it is determined from the user's operation that it is necessary to return to the newly created page, obtain the newly created page and display it.

[0063] Specifically, when the user's action determines that the previous page to return to is a newly created page, the newly created page can be directly retrieved and displayed, along with content corresponding to the browsing history. For example, if the user's action determines that a return from page C to page B is needed, since page B has already been recreated, it can be directly retrieved and displayed without requiring the user to wait for the page B creation process. Furthermore, if the browsing history of the destroyed page B is 30%, then displaying the newly created page B can directly show the content corresponding to that 30% of the browsing history.

[0064] The technical solution of this disclosure embodiment, after displaying at least three pages sequentially, allows users to return to the previous page from the currently displayed page based on user actions. If a page destruction record is detected during the return, the destroyed page can be directly recreated, and the page rendering order can be adjusted so that the currently displayed page is the previous page, achieving a step-by-step return of pages without waiting for page reloading. When it is determined from user actions that a newly created page needs to be returned to, the newly created page can be directly retrieved and displayed, and the browsing history can be directly returned to. The above technical solution shortens the page loading time required for page return, improves page display efficiency, and achieves smooth page loading.

[0065] An optional technical solution, wherein adjusting the page drawing order to make the current display page the previous page, may include: adjusting the drawing order of the recreated and destroyed pages to take precedence over other pages, wherein the drawing order of other pages is consistent with the display order when at least three pages are displayed in sequence.

[0066] According to the default settings of the Android system, the most recently drawn page is the currently displayed page, which is the page the user directly sees. Therefore, in the case of recreated and destroyed pages, to achieve a step-by-step return of pages—in other words, to ensure that the order in which pages are returned is exactly the reverse of the display order of at least three pages—we can: The drawing order of the recreated and destroyed pages is adjusted so that they are drawn first and displayed last; furthermore, the drawing order of other pages is consistent with the display order when at least three pages are displayed, so that during a return operation, the currently displayed page is the previous page, thus achieving a step-by-step return of pages.

[0067] Example 2

[0068] Figure 3This is a flowchart of a page display method provided in Embodiment 2 of this disclosure. This embodiment is an optimization based on Embodiment 1. In this embodiment, after recreating the destroyed page, the page display method may further include: adjusting the transmission order of screen touch events to each page, so as to prioritize the transmission of detected screen touch events to the currently displayed page. Correspondingly, as... Figure 3 As shown, the method in this embodiment may specifically include the following steps:

[0069] S210. After displaying at least three pages in sequence, return to the previous page from the currently displayed page based on the user's operation, and determine whether there is a page destruction record.

[0070] S220. If a page destruction record exists, the destroyed page is recreated, and the page drawing order is adjusted so that the currently displayed page is the previous page.

[0071] S230. Adjust the order in which screen touch events are transmitted to each page so that detected screen touch events are transmitted to the currently displayed page first.

[0072] According to the default settings of the Android system, a component is an object that can be displayed graphically on the screen and interact with the user. Therefore, pages can be displayed as components. However, components cannot be displayed independently; they need to be placed in a container to be displayed. The container itself is also a component, possessing all the properties of a component, but its primary function is to contain components.

[0073] After recreating the destroyed page, although the page rendering order is adjusted to make the currently displayed page the previous page, the newly created page is still at the top layer in the container. The page at the top of the container receives screen touch events first. Therefore, when a screen touch event is received from the user, it is actually passed to the newly created, destroyed page, not the currently displayed page. Thus, by adjusting the order in which screen touch events are passed to each page, detected screen touch events can be prioritized for the currently displayed page, matching the user's actual needs and truly achieving a hierarchical return to the previous page.

[0074] To better understand the specific implementation process of the drawing order and transmission order, let's continue with the above example. For instance, when returning from page E to page D, the destroyed page B is recreated, and the drawing order of the pages is adjusted to B->C->D, making page D the currently displayed page. However, at this point, the newly created page B is still at the top of the container. When the user perceives a click on the currently displayed page D, it is actually a click on page B. Therefore, the transmission order of screen touch events to each page can be adjusted so that detected screen touch events are first passed to the currently displayed page D, and then to page C and page B.

[0075] S240. When it is determined from the user's operation that it is necessary to return to the newly created page, obtain the newly created page and display it.

[0076] The technical solution of this disclosure, after recreating the destroyed page, adjusts the drawing order of each page and the transmission order of screen touch events to each page. The drawing order and the transmission order cooperate with each other so that the currently displayed page and the page to which screen touch events are preferentially transmitted are the same page. In other words, the page that the user actually sees and the page that the user actually operates on are the same page, which matches the user's actual needs and truly realizes the step-by-step return of each page.

[0077] An optional technical solution, wherein adjusting the transmission order of screen touch events to preferentially transmit detected screen touch events to the currently displayed page, may include: adjusting the transmission order of screen touch events to each page as follows: the currently displayed page is placed before the recreated and destroyed page, other pages are placed between the currently displayed page and the recreated and destroyed page, and the order of other pages is the reverse of the display order when at least three pages are displayed sequentially.

[0078] To prioritize passing detected screen touch events to the currently displayed page, the order in which these events are passed needs to be adjusted. This adjustment can be achieved by:

[0079] When three pages are displayed sequentially, the currently displayed page can be placed before the recreated and destroyed page, and the other pages can be placed between the currently displayed page and the recreated and destroyed page. For example, when returning from page E to page D, the priority of the adjusted page passing order from high to low is D->C->B. Therefore, screen touch events can be passed to the currently displayed page D, which has the highest priority.

[0080] Additionally, when displaying more than three pages sequentially, in addition to placing the currently displayed page before the recreated and destroyed page, and other pages between the currently displayed page and the recreated and destroyed page, the order of the other pages also needs to be adjusted to be the reverse of the display order when displaying at least three pages sequentially. For example, when displaying four pages sequentially, the pages displayed are A, B, C, D, E, and F. When displaying page F, pages A and B have already been destroyed. Therefore, when returning from page F to page E, page B is recreated. The priority of the adjusted page delivery order, from highest to lowest, is E->D->C->B. Thus, detected screen touch events can be preferentially delivered to the currently displayed page E.

[0081] The advantage of the above steps is that screen touch events can be passed sequentially according to the actual order in which the user browses the pages, with priority given to the currently displayed page. This ensures that the page the user actually sees and the page the user is actually interacting with are the same page, allowing the system's operations to directly match the user's needs and truly enabling step-by-step navigation between pages.

[0082] Example 3

[0083] Figure 4 This is a flowchart of a page display method provided in Embodiment 3 of this disclosure. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, "displaying at least three pages sequentially" is specifically optimized as follows: "Create an activity component and create a fragment component associated with the activity component; load the content of the current page to be displayed into the currently created fragment component for display; subsequently, each time a new page needs to be displayed based on the user's link click operation on the currently displayed page, create a new fragment component associated with the activity component and load the content of the new page to be displayed into the newly created fragment component for display; determine whether the number of existing pages is greater than a set threshold; if so, destroy the corresponding page by destroying the created fragment component, so that the number of existing pages is not higher than the set threshold, where the set threshold is an integer not less than 3." Accordingly, as... Figure 4 As shown, the method in this embodiment may specifically include the following steps:

[0084] S310. Create an activity component and a fragment component associated with the activity component. Load the current page content that needs to be displayed into the currently created fragment component for display.

[0085] An activity component is a type of component used to represent a user interface within an application. The activity component starts when an activity begins and its lifecycle ends when the activity ends. A fragment component, on the other hand, is a part of an activity component and can be considered a sub-activity component. Fragments can be added to or removed from an activity component while the activity is running.

[0086] Compared to activity components, fragment components have the advantage that, although the newly created fragment component is at the top level of the activity component—in other words, at the top level of the container—it can be dynamically drawn at the bottom level of the activity component to meet the user's need for navigating through levels. Specifically, embodiments of this disclosure can create only one activity component and at least one fragment component associated with the activity component, loading the current page content to be displayed into the newly created fragment component for page display.

[0087] S320. Subsequently, each time a new page needs to be displayed based on the user's click on the link of the currently displayed page, a new fragment component associated with the activity component is created, and the content of the new page to be displayed is loaded into the newly created fragment component for display.

[0088] In this scenario, if a user clicks a link on the currently displayed page and determines that a new page needs to be shown, a new fragment component associated with the activity component can be created, and the content of the new page to be displayed can be loaded into the newly created fragment component for display. Therefore, an activity component will have at least one fragment component, and when it is determined that a new page needs to be displayed, a fragment component is superimposed on the activity component.

[0089] S330. Determine whether the number of existing pages is greater than a set threshold. If so, destroy the corresponding page by destroying the created fragment component, so that the number of existing pages is not higher than the set threshold, where the set threshold is an integer not less than 3.

[0090] The fragment component is used to load and display pages. To ensure smooth page browsing, when the number of existing pages exceeds a set threshold, the corresponding pages can be destroyed by destroying the created fragment components, thus keeping the number of existing pages below the threshold and alleviating memory pressure. The set threshold can be any integer not less than 3.

[0091] S340. Return to the previous page from the currently displayed page based on the user's operation, and determine whether there is a page destruction record.

[0092] S350. If a page destruction record exists, the destroyed page is recreated, and the page drawing order is adjusted so that the currently displayed page is the previous page.

[0093] S360: When it is determined from the user's operation that it is necessary to return to the newly created page, obtain the newly created page and display it.

[0094] The technical solution of this disclosure embodiment can create a fragment component associated with the activity component to load the new page when there is a new page that needs to be displayed. It is precisely by using the fragment component that can change the drawing order that the actual needs of users to return level by level are met.

[0095] An optional technical solution, based on embodiment three, further includes: adding the identifier of the displayed page to a preset stack each time a page is displayed. The page identifier can correspond one-to-one with a specific page, and further, it can also correspond one-to-one with a fragment component used to load the page. Adding the identifier of the displayed page to the preset stack each time a page is displayed allows for the recording of each page.

[0096] The step of destroying the corresponding page by destroying the created fragment components includes: destroying the fragment component corresponding to the page identifier at the bottom of the preset stack to destroy the corresponding page; deleting the page identifier at the bottom of the stack and recording the identifier of the destroyed page.

[0097] When there is a one-to-one correspondence between page identifiers, pages, and fragment components, the corresponding fragment component and page can be destroyed using the page identifier. After a page to be destroyed is destroyed, the page identifier at the bottom of the stack can be deleted, but the identifier of the destroyed page is recorded so that it can be correctly created when the page is recreated. Furthermore, the timely deletion of page identifiers ensures that the page identifier corresponding to each page to be destroyed is always at the bottom of the preset stack.

[0098] The process of recreating the destroyed page includes: creating a new fragment component associated with the activity component, and loading the page content corresponding to the identifier of the most recently recorded destroyed page into the newly created fragment component for display.

[0099] Specifically, when a destroyed page is recreated, a new fragment component associated with the activity component can be created to display the page. Furthermore, the page content corresponding to the identifier of the most recently destroyed page in the record is loaded into the fragment component for display. The advantage of these steps is that the pages corresponding to the identifiers can be accurately destroyed and / or rebuilt based on the identifiers stored in a preset stack.

[0100] To better understand the steps in Embodiment 3, for example, when page A is created, an activity component is created, and a fragment component associated with the activity component for loading page A is created, and the page identifier corresponding to page A is added to a preset stack; when a link in page A is clicked, a fragment component associated with the activity component for loading page B is created, and the page identifier corresponding to page B is added to a preset stack, at which point the bottom of the preset stack is the identifier corresponding to page B; the creation process of subsequent pages follows the same principle.

[0101] When the threshold is set to 3, when page D is created, page A is destroyed by deleting the fragment component corresponding to the page identifier at the bottom of the stack, and the identifier corresponding to page A is recorded. The creation of page E and the destruction of page B are carried out in the same way to ensure that the number of existing pages does not exceed 3. Therefore, when returning from page E to page D, page B needs to be rebuilt. Page B can be loaded into the newly created fragment component and displayed based on the identifier of the most recently destroyed page B in the record.

[0102] Example 4

[0103] Figure 5 This is a structural block diagram of a page display device provided in Embodiment 4 of this disclosure. This device is used to execute the page display method provided in any of the above embodiments. This device and the page display methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the page display device can be found in the embodiments of the page display methods described above. See also... Figure 5 The device may specifically include: a page destruction record determination module 410, a page destruction reconstruction module 420, and a page reconstruction display module 430.

[0104] The page destruction record determination module 310 is used to return from the currently displayed page to the previous page based on the user's operation after displaying at least three pages in sequence, and to determine whether there is a page destruction record.

[0105] The page destruction and reconstruction module 420 is used to recreate the destroyed page if a page destruction record exists, and adjust the page drawing order so that the currently displayed page is the previous page.

[0106] The page display reconstruction module 430 is used to obtain and display the recreated page when it is determined from the user's operation that the user needs to return to the recreated page.

[0107] Optionally, the page destruction and reconstruction module 420 may further include: a page destruction and reconstruction unit, used to adjust the drawing order of the recreated destroyed pages to be drawn with priority over other pages, wherein the drawing order of other pages is consistent with the display order when at least three pages are displayed in sequence.

[0108] Optionally, the page display device may further include:

[0109] The transmission order adjustment module is used to adjust the transmission order of screen touch events to each page, so as to prioritize the transmission of detected screen touch events to the currently displayed page.

[0110] Optionally, the transmission order adjustment module may include: a transmission order adjustment unit, used to adjust the transmission order of screen touch events to each page as follows: the currently displayed page is placed before the recreated and destroyed page, other pages are placed between the currently displayed page and the recreated and destroyed page, and the order of other pages is the reverse of the display order when at least three pages are displayed in sequence.

[0111] Optionally, the page destruction record determination module 410 may include:

[0112] The current page content display unit is used to create an activity component and a fragment component associated with the activity component. The current page content that needs to be displayed is loaded into the currently created fragment component for display.

[0113] The existing page count determination unit is used to create a new fragment component associated with the activity component each time a new page needs to be displayed based on the user's click operation on the link of the currently displayed page, load the content of the new page to be displayed into the newly created fragment component for display, and determine whether the number of existing pages is greater than a set threshold. If so, the corresponding page is destroyed by destroying the created fragment component to ensure that the number of existing pages is not higher than the set threshold, which is an integer not less than 3.

[0114] Optionally, the page display device may further include: an identifier addition module, used to add the identifier of the displayed page to a preset stack each time a page is displayed;

[0115] The existing page count determination unit can also be used to destroy the fragment component corresponding to the page identifier at the bottom of the preset stack, thereby destroying the corresponding page; delete the page identifier at the bottom of the stack, and record the identifier of the destroyed page;

[0116] The current page content display unit can also be used to create new fragment components associated with the activity component, loading the page content corresponding to the identifier of the most recently destroyed page into the newly created fragment component for display.

[0117] The page display device provided in Embodiment 4 of this disclosure achieves step-by-step page return through the cooperation of a page destruction record determination module and a page destruction and reconstruction module, without waiting for page reloading. Based on the page reconstruction and display module, the recreated page can be directly obtained and displayed, and the browsing history can be directly returned to. This device shortens the page loading time required for page return, improves page display efficiency, and achieves smooth page loading.

[0118] The page display device provided in this disclosure can execute the page display method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0119] It is worth noting that in the embodiments of the above-mentioned page display device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of this disclosure.

[0120] Example 5

[0121] The following is for reference. Figure 6The diagram illustrates a structural schematic suitable for implementing a terminal device 800 according to embodiments of the present disclosure. The terminal device in embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0122] like Figure 6 As shown, the terminal device 800 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the terminal device 800. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0123] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows terminal device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 A terminal device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0124] Example 6

[0125] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.

[0126] It should be noted that the computer storage medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0127] The aforementioned computer storage medium may be included in the aforementioned terminal device; or it may exist independently and not be assembled into the terminal device.

[0128] The aforementioned computer storage medium carries one or more programs. When the aforementioned one or more programs are executed by the terminal device, the terminal device causes the terminal device to: after displaying at least three pages in sequence, return from the currently displayed page to the previous page according to the user's operation, and determine whether there is a page destruction record; if there is a page destruction record, recreate the destroyed page, and adjust the page drawing order so that the currently displayed page is the previous page; when it is determined according to the user's operation that it is necessary to return to the recreated page, obtain the recreated page and display it.

[0129] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "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 a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via 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., via the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0131] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not necessarily limiting in certain circumstances; for example, the page destruction record determination module can also be described as "a module that, after displaying at least three pages in sequence, returns from the currently displayed page to the previous page based on user operation and determines whether a page destruction record exists."

[0132] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A page display method, characterized in that, include: After displaying at least three pages in sequence, the system returns to the previous page from the currently displayed page based on the user's actions, and checks whether there are any page destruction records. If a page destruction record exists, the destroyed page will be recreated, and the page rendering order will be adjusted so that the currently displayed page is the previous page. When it is determined that the user needs to return to the newly created page based on the user's operation, the newly created page is obtained and displayed; The step of recreating the destroyed page if a page destruction record exists includes: synchronizing the browsing history of the recreated destroyed page with the browsing history of the destroyed page before it was destroyed, based on the page destruction record. The step of adjusting the page rendering order to make the current display page the previous page includes: The drawing order of the recreated and destroyed pages is adjusted to take precedence over other pages, and the drawing order of other pages is consistent with the display order of the other pages when they are generated and displayed in sequence; After recreating the destroyed page, the method further includes: Adjust the order in which screen touch events are passed to each page, so that detected screen touch events are passed to the currently displayed page first; The sequential display of at least three pages includes: Create an activity component and a fragment component associated with the activity component. Load the current page content that needs to be displayed into the newly created fragment component for display. Subsequently, each time a new page needs to be displayed based on the user's click on a link on the currently displayed page, a new fragment component associated with the activity component is created, and the content of the new page to be displayed is loaded into the newly created fragment component for display. Also, it is determined whether the number of existing pages is greater than a set threshold. If so, the corresponding page is destroyed by destroying the created fragment component, so that the number of existing pages is not higher than the set threshold, which is an integer not less than 3.

2. The method according to claim 1, characterized in that, The adjustment of the transmission order of screen touch events to prioritize the transmission of detected screen touch events to the currently displayed page includes: The order in which screen touch events are passed to each page is adjusted as follows: the currently displayed page is placed before the recreated and destroyed page, other pages are placed between the currently displayed page and the recreated and destroyed page, and the order of other pages is the reverse of the display order when at least three pages are displayed sequentially.

3. The method according to claim 1, characterized in that, The method further includes adding the identifier of the displayed page to a preset stack each time a page is displayed; The step of destroying the corresponding page by destroying the created fragment components includes: destroying the fragment component corresponding to the page identifier at the bottom of the preset stack to destroy the corresponding page; deleting the page identifier at the bottom of the stack and recording the identifier of the destroyed page; The process of recreating the destroyed page includes: creating a new fragment component associated with the activity component, and loading the page content corresponding to the identifier of the most recently recorded destroyed page into the newly created fragment component for display.

4. A page display device, characterized in that, include: The page destruction record determination module is used to return from the currently displayed page to the previous page based on the user's operation after displaying at least three pages in sequence, and to determine whether there is a page destruction record. The page destruction and reconstruction module is used to recreate the destroyed page if a page destruction record exists, and adjust the page drawing order so that the currently displayed page is the previous page. The page display reconstruction module is used to obtain and display the recreated page when it is determined from the user's operation that the user needs to return to the recreated page. The page destruction reconstruction module is specifically used to synchronize the browsing history of the recreated destroyed page with the browsing history of the destroyed page before it was destroyed, based on the page destruction record. The destroyed page reconstruction module includes: The page destruction and reconstruction unit is used to adjust the drawing order of the recreated destroyed pages to be drawn with priority over other pages, and the drawing order of other pages is consistent with the display order of the other pages when they are generated and displayed in sequence; The transmission order adjustment module is used to adjust the transmission order of screen touch events to each page, so as to prioritize the transmission of detected screen touch events to the currently displayed page; The page destruction record determination module includes: The current page content display unit is used to create an activity component and a fragment component associated with the activity component, and to load the current page content to be displayed into the currently created fragment component for display. The existing page count determination unit is used to create a new fragment component associated with the activity component each time a new page needs to be displayed based on the user's click operation on the link of the currently displayed page, load the content of the new page to be displayed into the newly created fragment component for display, and determine whether the number of existing pages is greater than a set threshold. If so, the corresponding page is destroyed by destroying the created fragment component to ensure that the number of existing pages is not higher than the set threshold, which is an integer not less than 3.

5. A terminal device, characterized in that, The terminal device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method as described in any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the page display method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method and device for switching displayed page

    CN103309563A

  • Bookmark storing and displaying method and device and browser

    CN106095917A

  • Page skipping method in application program, terminal and storage medium

    CN108287743A