Page circulation sliding method and device
By cached a small number of page pointers in the LVGL system and updated the page pointer, efficient page loop sliding switching is achieved, solving the problem of large memory usage, and improving response speed and user experience.
Patent Information
- Application Number
- CN202510234315.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art consumes a large amount of memory resources when realizing LVGL page cyclic sliding switching, resulting in slow page response and degradation of device performance, especially when embedded resources are insufficient.
By obtaining the loop list, a small number of page pointers are cached, only some of the pages to be displayed are loaded, and the page pointer is updated based on the page sliding signal, so as to realize page loop sliding and reduce memory usage.
It improves the response speed of page switching, reduces memory consumption, and improves the performance and user experience of electronic devices.
Smart Images

Figure CN120255997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a page circular sliding method and device. Background Art
[0002] LVGL (Light and Versatile Graphics Library), a novel graphical user interface (GUI) library, stands out for its streamlined code and ease of UI (user interface) development. It only requires a small firmware to run on electronic devices.
[0003] In actual application, in order to realize the circular sliding switching on electronic devices based on the LVGL system framework, the relevant technology proposes to use the LVGL tabview control to implement it, set the tab object corresponding to the minimum and maximum values of the index ID to empty, and perform loop processing when the index ID is the maximum or minimum value. The relevant technology also uses N+2 interfaces to be spliced together by canvas. The application interface on the far left is a substitute for the second-to-last application interface on the right, and the application interface on the far right is a substitute for the second application interface on the left. This setting method can be used to realize the circular display of all pages. However, these methods consume a lot of memory resources and all pages need to be loaded. Especially when embedded resources are seriously insufficient, memory resources are greatly occupied, resulting in problems such as slow page response, waste of resources, and decreased device performance. Summary of the invention
[0004] In order to solve the above technical problems, the present application proposes a page loop sliding method and device, which is applied to the process of LVGL page loop display processing. It can not only realize LVGL page loop sliding, but also reduce the cache number of page resources to be displayed and improve the page switching response speed.
[0005] In one aspect, a page circular sliding method is provided, the method comprising:
[0006] Acquire a circular list; the circular list includes a first preset number of display areas; a second preset number of page pointers are cached in the circular list, and each of the second preset number of page pointers has a corresponding page to be displayed; the first preset number is less than the second preset number;
[0007] Loading a first preset number of pages to be displayed among the pages to be displayed into a first preset number of display areas, and determining page pointers corresponding to each of the first preset number of pages to be displayed;
[0008] In response to the page sliding signal, based on the page switching logic corresponding to the page sliding signal, the corresponding page pointers are updated to obtain updated page pointers;
[0009] Display the page to be displayed corresponding to the updated page pointer in the first preset number of display areas.
[0010] Furthermore, the page switching logic includes a page sliding direction and a step value. In response to a page sliding signal, based on the page switching logic corresponding to the page sliding signal, update the respective corresponding page pointers to obtain updated page pointers, including:
[0011] In response to the page sliding signal, determine the page sliding direction and the step value corresponding to the page sliding signal;
[0012] According to the page sliding direction and the step value, update the respective corresponding page pointers to obtain updated page pointers.
[0013] Furthermore, after obtaining the circular list, the method further includes:
[0014] Determine a target display area in the first preset number of display areas, and load default display elements on the target display area;
[0015] Determine the page pointer corresponding to the page to be displayed loaded in the target display area as the target display page pointer; the target display page pointer is used to determine the page to be displayed on the target display area.
[0016] Furthermore, in response to the page sliding signal, based on the page switching logic corresponding to the page sliding signal, update the respective corresponding page pointers to obtain updated page pointers, including:
[0017] In response to the page sliding signal, update the target display page pointer according to the page sliding direction and the step value to obtain an updated target display page pointer; the second preset number of page pointers includes the updated target display page pointer;
[0018] Display the page to be displayed corresponding to the updated page pointer in the first preset number of display areas, including:
[0019] Display the page to be displayed corresponding to the updated target display page pointer in the target display area.
[0020] Furthermore, the method further includes:
[0021] Sort the page pointers corresponding to the pages to be displayed respectively, determine the page pointer corresponding to the page ranked first in the pages to be displayed as the first preset page pointer, and determine the page pointer corresponding to the last rank in the pages to be displayed as the second preset page pointer;
[0022] Among them, the first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be displayed loaded in the first preset number of display areas.
[0023] Further, the page sliding direction includes a first preset sliding direction. In response to a page sliding signal, according to the page sliding direction and the step value, the target display page pointer is updated to obtain an updated target display page pointer, including:
[0024] In response to a page sliding signal indicating that the page slides in the first preset sliding direction, the target display page pointer and the step value are subjected to pointer addition calculation to obtain a first pointer calculation result;
[0025] Determine whether the first pointer calculation result is greater than the second preset page pointer; when the first pointer calculation result is less than or equal to the second preset page pointer, the updated target display page pointer is the first pointer calculation result; when the first pointer calculation result is greater than the second preset page pointer, the updated target display page pointer is the first preset page pointer.
[0026] Further, the page sliding direction includes a second preset sliding direction. In response to a page sliding signal, according to the page sliding direction and the step value, the target display page pointer is updated to obtain an updated target display page pointer, including:
[0027] In response to a page sliding signal indicating that the page slides in the second preset sliding direction, the target display page pointer and the step value are subjected to pointer subtraction calculation to obtain a second pointer calculation result; the second preset direction is opposite to the first preset direction;
[0028] Determine whether the second pointer calculation result is greater than the first preset page pointer; when the second pointer calculation result is greater than or equal to the first preset page pointer, the updated target display page pointer is the second pointer calculation result; when the second pointer calculation result is less than the first preset page pointer, the updated target display page pointer is the second preset page pointer.
[0029] Further, the method further includes:
[0030] When any page in the pages to be displayed is not displayed in the circular list, determine the target display time when any page is not displayed in the circular list;
[0031] Obtain the occurrence frequency and stay time of any page in the circular list;
[0032] According to the occurrence frequency and the stay time, determine the destruction delay time of any page;
[0033] When the target display time reaches the destruction delay time, destroy any page.
[0034] Further, according to the occurrence frequency and the stay time, determine the destruction delay time of any page, including:
[0035] Determine the frequency weight according to the occurrence frequency and the number of destructions;
[0036] Determine the destruction delay time of any page according to the frequency weight and the stay time.
[0037] On the other hand, the embodiment of the present application also provides a page circular sliding device, and the device includes:
[0038] An acquisition module, configured to acquire a circular list; the circular list includes a first preset number of display areas; a second preset number of page pointers are cached in the circular list, and each of the second preset number of page pointers corresponds to a page to be displayed; the first preset number is less than the second preset number;
[0039] A page loading module, configured to load a first preset number of pages to be displayed in the to-be-displayed pages into the first preset number of display areas, and determine the page pointers corresponding to the first preset number of pages to be displayed respectively;
[0040] A page pointer update module, configured to, in response to a page sliding signal, update the corresponding page pointers based on the page switching logic corresponding to the page sliding signal to obtain updated page pointers;
[0041] A display module, configured to display the pages to be displayed corresponding to the updated page pointers in the first preset number of display areas.
[0042] Further, the above page pointer update module includes:
[0043] A page sliding direction and step value determination unit, configured to, in response to a page sliding signal, determine the page sliding direction and the step value corresponding to the page sliding signal;
[0044] A page pointer update unit, configured to update the corresponding page pointers according to the page sliding direction and the step value to obtain updated page pointers.
[0045] Further, the device further includes:
[0046] A target display area determination unit, configured to determine a target display area in the first preset number of display areas, and load a default display element on the target display area;
[0047] A target display page pointer determination unit, configured to determine the page pointer corresponding to the page to be displayed loaded in the target display area as the target display page pointer; the target display page pointer is used to determine the page to be displayed displayed in the target display area.
[0048] Further, the page pointer update module includes:
[0049] A target display page pointer update unit, configured to update a target display page pointer in response to a page sliding signal, according to a page sliding direction and a step value, to obtain an updated target display page pointer; the second preset number of page pointers includes the updated target display page pointer;
[0050] The display module includes:
[0051] A target display area display unit, configured to display a page to be displayed corresponding to the updated target display page pointer in a target display area.
[0052] Further, the apparatus further includes:
[0053] A page pointer sorting unit, configured to sort page pointers corresponding to pages to be displayed respectively, determine a first preset page pointer as the page pointer corresponding to the page ranked first among the pages to be displayed, and determine a second preset page pointer as the page pointer corresponding to the page ranked last among the pages to be displayed; wherein, the first preset page pointer and the second preset page pointer are used to determine an adjustment range of page pointers corresponding to pages to be displayed loaded in the first preset number of display areas.
[0054] Further, the target display page pointer update unit is further configured to, in response to a page sliding signal for the page to slide in the first preset sliding direction, perform a pointer addition calculation on the target display page pointer and the step value to obtain a first pointer calculation result; determine whether the first pointer calculation result is greater than the second preset page pointer; when the first pointer calculation result is less than or equal to the second preset page pointer, obtain the updated target display page pointer as the first pointer calculation result; when the first pointer calculation result is greater than the second preset page pointer, obtain the updated target display page pointer as the first preset page pointer.
[0055] Further, the target display page pointer update unit is further configured to, in response to a page sliding signal for the page to slide in the second preset sliding direction, perform a pointer subtraction calculation on the target display page pointer and the step value to obtain a second pointer calculation result; the second preset direction is opposite to the first preset direction; determine whether the second pointer calculation result is greater than the first preset page pointer; when the second pointer calculation result is greater than or equal to the first preset page pointer, obtain the updated target display page pointer as the second pointer calculation result; when the second pointer calculation result is less than the first preset page pointer, obtain the updated target display page pointer as the second preset page pointer.
[0056] Further, the apparatus further includes:
[0057] A target display time determination module, configured to determine a target display time when any page in the page to be displayed is not displayed in the loop list;
[0058] An appearance frequency and stay time acquisition module, configured to acquire the appearance frequency and stay time of any page in the loop list;
[0059] A destruction delay time determination module, configured to determine a destruction delay time of any page according to the appearance frequency and the stay time;
[0060] A destruction module, configured to destroy any page when the target display time reaches the destruction delay time.
[0061] Further, the destruction delay time determination module includes:
[0062] A frequency weight determination unit, configured to determine a frequency weight according to the appearance frequency and the number of destructions;
[0063] A destruction delay time determination unit, configured to determine a destruction delay time of any page according to the frequency weight and the stay time.
[0064] On the other hand, an embodiment of the present application further provides an electronic device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or at least one program segment is loaded and executed by the processor to implement a page loop sliding method as described above.
[0065] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction or at least one program segment is stored, and the at least one instruction or at least one program segment is loaded and executed by the processor to implement a page loop sliding method as described above.
[0066] On the other hand, an embodiment of the present application further provides a computer program product, which implements a page loop sliding method as described above when executed by a processor.
[0067] The present application provides a method and apparatus for page circular sliding, which is applied to LVGL. The method includes obtaining a circular list, loading the first preset number of pages to be displayed in the first preset number of display areas, determining the page pointers corresponding to the first preset number of pages to be displayed respectively, in response to a page sliding signal, updating the corresponding page pointers based on the page switching logic corresponding to the page sliding signal, and displaying the pages to be displayed corresponding to the updated page pointers in the first preset number of display areas. Through the above method, simple and efficient LVGL page circular sliding processing is achieved by updating pointers, the page switching response speed is improved, and only the first preset number of pages to be displayed need to be initialized, reducing memory consumption and occupation, releasing memory resources, improving the performance of the electronic device applying LVGL, and enhancing the user experience. Description of the Drawings
[0068] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0069] Figure 1 is a flowchart showing a method for page circular sliding according to an exemplary embodiment;
[0070] Figure 2 is a flowchart showing a method for updating page pointers according to an exemplary embodiment;
[0071] Figure 3 is a flowchart showing a method for determining the target display page pointer according to an exemplary embodiment;
[0072] Figure 4 is the page pointer update logic when the page slides in the first preset sliding direction according to an exemplary embodiment;
[0073] Figure 5 is the page pointer update logic when the page slides in the second preset sliding direction according to an exemplary embodiment;
[0074] Figure 6 is a flowchart showing a process of page circular sliding processing according to an exemplary embodiment;
[0075] Figure 7 is a schematic diagram showing the page circular switching state of the left - slide embodiment according to an exemplary embodiment;
[0076] Figure 8It is a schematic diagram showing the page cyclic switching state of the right - swipe embodiment according to an exemplary embodiment;
[0077] Figure 9 It is a schematic flowchart of a page destruction method according to an exemplary embodiment;
[0078] Figure 10 It is a schematic flowchart of a method for determining the destruction delay time according to an exemplary embodiment;
[0079] Figure 11 It is a schematic diagram of a page cyclic sliding device according to an exemplary embodiment;
[0080] Figure 12 It is a hardware structure block diagram of a server for a page cyclic sliding method according to an exemplary embodiment. Detailed implementation manners
[0081] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0082] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of the present application and the above - mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. Thus, the features defined with "first", "second" may explicitly or implicitly include one or more of such features. In the description of this embodiment, unless otherwise stated, the meaning of "a plurality" is two or more. In addition, the terms "include" and "have" and any of their deformations are intended to cover non - exclusive inclusion. For example, a process, method, system, product or server including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0083] LVGL (Light and Versatile Graphics Library), a novel graphics user interface (GUI) library, stands out for its concise code and the convenience of UI (user interface) development. It only requires a relatively small firmware to run on an electronic device.
[0084] In practical applications, in order to achieve circular sliding and switching on an electronic device based on the LVGL system framework, related technologies propose to use the LVGL tabview control. The tab objects corresponding to the minimum and maximum values of the index ID are set to be empty. When the index ID is the maximum or minimum value, circular processing is performed. Related technologies also use N + 2 interfaces spliced together in the form of a canvas. The application interface on the far left is a substitute for the second-to-last application interface on the right, and the application interface on the far right is a substitute for the second application interface on the left. Through this setting method, all pages can be circularly displayed. However, these methods consume a large amount of memory resources and require all pages to be loaded. Especially in the case of severely insufficient embedded resources, they greatly occupy memory resources, resulting in problems such as slow page response, resource waste, and device performance degradation.
[0085] In view of this, an embodiment of the present application proposes a method for circular sliding of pages. Figure 1 A method for circular sliding of pages is shown according to an exemplary embodiment. This specification provides the method operation steps as described in the embodiment or flowchart, but based on routine or non-creative labor, it may include more or fewer operation steps. The step order listed in the embodiment is only one way among the execution orders of many steps and does not represent the only execution order. When the actual system or server product is executed, it can be executed in the order shown in the embodiment or the drawing or in parallel (for example, in an environment of parallel processors or multi-threaded processing). Specifically, as Figure 1 shown, the method may include:
[0086] S10: Obtain a circular list; the circular list includes a first preset number of display areas; a second preset number of page pointers are cached in the circular list, and each of the second preset number of page pointers corresponds to a page to be displayed; the first preset number is less than the second preset number.
[0087] Exemplarily, there are a second preset number of pages to be displayed, and the corresponding page pointers are also a second preset number, that is, the page pointers and the pages to be displayed are in a one-to-one correspondence relationship; in order to achieve circular sliding and switching of pages based on LVGL, it is necessary to first create a circular list. The capacity of the circular list is the first preset number, that is, the circular list includes a first preset number of display areas, and the display area refers to the interface loaded by the electronic device for display.
[0088] A page pointer is a reference or identifier that points to a page to be displayed. In the circular list, page pointers can be cached for quick access and display.
[0089] A second preset number of page pointers are cached in the circular list, so that the purpose of page switching can be achieved by updating the page pointers during the page sliding process.
[0090] The purpose of the first preset number being smaller than the second preset number is to initialize fewer page resources and reduce memory usage.
[0091] Optionally, the first preset number is preferably 3, and loading 3 display areas can achieve initialization of fewer page resources while increasing the response speed of page switching.
[0092] Optionally, the first preset number of display areas are recorded as ID1, ID2, ID3 . . . IDk in a list order.
[0093] S30: loading a first preset number of pages to be displayed among the pages to be displayed into a first preset number of display areas, and determining page pointers corresponding to the first preset number of pages to be displayed.
[0094] Exemplarily, a first preset number of pages to be displayed among the pages to be displayed are loaded into a first preset number of display areas respectively, and the page pointers corresponding to the first preset number of pages to be displayed stored in each display area are determined.
[0095] S50: Loading a first preset number of pages to be displayed among the pages to be displayed into a first preset number of display areas, and determining page pointers corresponding to the first preset number of pages to be displayed.
[0096] Exemplarily, after receiving the sliding signal, the interface switching system responds, obtains the page switching logic corresponding to the page sliding signal, and updates the corresponding page pointers based on the page switching logic corresponding to the page sliding signal to obtain an updated page pointer. When the received page sliding signals are different, the determined page switching logic is different, and the page pointer is updated in a different manner.
[0097] S70: Displaying the to-be-displayed pages corresponding to the updated page pointers in a first preset number of display areas.
[0098] Exemplarily, the pages to be displayed corresponding to the updated page pointers are displayed in the first preset number of display areas, that is, the contents displayed in the first preset number of display areas are updated according to the pages to be displayed corresponding to the updated page pointers.
[0099] The embodiment of the present application provides a page circular sliding method, which is applied to the LVGL page circular sliding and switching. By means of pointer update, simple and efficient LVGL page circular sliding processing is realized, the page switching response speed is improved, and only the first preset number of pages to be displayed need to be initialized, reducing memory consumption and occupation, releasing memory resources, improving the performance of the electronic device applying LVGL, and enhancing the user experience.
[0100] As an optional implementation manner, the page switching logic includes the page sliding direction and the step value. As Figure 2 shown, in the above step S50, in response to the page sliding signal, based on the page switching logic corresponding to the page sliding signal, updating the respective corresponding page pointers to obtain the updated page pointers includes:
[0101] S501: In response to the page sliding signal, determine the page sliding direction and the step value corresponding to the page sliding signal.
[0102] Exemplarily, the step value refers to the amount by which the page moves in the sliding operation, which can be in pixel units or page units. For example, in the embodiment of the present application, the step value may be 1, indicating that one page is flipped each time of sliding. The sliding direction refers to the physical direction in which the user slides on the screen. In the embodiment of the present application, it can be the horizontal direction (from left to right or from right to left) or the vertical direction (from top to bottom or from bottom to top).
[0103] After responding to the page sliding signal, determine its corresponding step value and sliding direction by a preset method.
[0104] Optionally, the preset method can be realized by detecting the movement track of the touch point on the screen.
[0105] S502: According to the page sliding direction and the step value, update the respective corresponding page pointers to obtain the updated page pointers.
[0106] Exemplarily, when the page sliding direction is different or the step value is different, the updated page pointers are also different.
[0107] After the embodiment of the present application responds to the page sliding signal, obtain its corresponding sliding direction and step value, and based on the sliding direction and the step value, update the page pointers corresponding to each display area in the circular list, that is, realize the page circular sliding and switching, realize simple and efficient LVGL page circular sliding processing, improve the page switching response speed, and enhance the user experience.
[0108] As an optional implementation manner, after obtaining the circular list, as Figure 3 shown, the method further includes:
[0109] S20: Determine a target display area among a first preset number of display areas, and load default display elements on the target display area.
[0110] Exemplarily, determine a default display area in a circular list. The specific method for determining this default display area is: determine a target display area among a first preset number of display areas, and load default display elements on the target display area. That is, the target display area is the default display area, and the default display area is the display area visible to the user.
[0111] Optionally, in order to improve the page response speed, the target display area is generally set at the middle position of the first preset number of display areas. For example, the first preset number is 3, and the first preset number of display areas are denoted as ID1, ID2, ID3 in the list order; that is, set ID2 as the target display area.
[0112] Optionally, except for the target display area, other display areas are virtual pages and are not visible to the user.
[0113] S21: Determine the page pointer corresponding to the page to be displayed loaded in the target display area as the target display page pointer; the target display page pointer is used to determine the page to be displayed shown in the target display area.
[0114] Exemplarily, determine the pointer corresponding to the page loaded in the target display area as the target display page pointer.
[0115] It should be noted that this step is limited to the initial setup stage. At this time, only default display elements are loaded on the target display page, and its corresponding page pointer is determined as the target display page pointer. In the initial setup stage, except for the page pointers of the display areas other than the target display area, the page pointers of other display areas are all empty. After the initial setup stage is completed, the above step S30 is executed.
[0116] In the embodiment of the present application, by determining a target display area among a first preset number of display areas and determining its corresponding target page pointer, the default display page when an electronic device based on LVGL implements a circular sliding function is determined, the page switching response speed is improved, the performance of the electronic device applying LVGL is improved, and the user experience is enhanced.
[0117] As an optional implementation manner, in the above step S50, in response to the page sliding signal, based on the page switching logic corresponding to the page sliding signal, update the respective corresponding page pointers to obtain updated page pointers, including:
[0118] In response to the page sliding signal, update the target display page pointer according to the page sliding direction and the step value to obtain the updated target display page pointer; the second preset number of page pointers includes the updated target display page pointer.
[0119] Exemplarily, the main task of the page cyclic sliding and switching process is to update the display page of the target display area in response to the page sliding signal. The specific update method is as follows: update the target display page pointer according to the obtained page sliding direction and step value to obtain the updated target display page pointer.
[0120] The value of the updated target display page pointer is one of the second preset number of page pointers, representing the cyclic switching of the target display page among the second preset number of pages to be displayed.
[0121] In step S70 above, displaying the page to be displayed corresponding to the updated page pointer in the first preset number of display areas includes:
[0122] Display the page to be displayed corresponding to the updated target display page pointer in the target display area.
[0123] Exemplarily, displaying the page to be displayed corresponding to the updated target display page pointer in the target display area realizes the switching of the page displayed in the target display area in response to the page sliding signal.
[0124] In the embodiment of the present application, by updating the target display page pointer according to the step value and the page sliding direction, that is, realizing the update of the target display page, and performing page cyclic sliding and switching through the pointer update method, it has the advantages of simplicity and high efficiency, fast page response speed, small memory occupancy, etc., improving the user experience.
[0125] As an optional implementation manner, the method further includes:
[0126] Sort the page pointers corresponding to the pages to be displayed respectively, determine the page pointer corresponding to the page ranked first among the pages to be displayed as the first preset page pointer, and determine the page pointer corresponding to the last rank among the pages to be displayed as the second preset page pointer; wherein, the first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be loaded in the first preset number of display areas respectively.
[0127] Exemplarily, there are a total of N pages to be cyclically displayed, namely P1, P2, P3, … Pn. N represents the second preset number of pages to be displayed. Record the page pointers corresponding to the N pages as PTRi (i = 1, ..n). Determine the page pointer PTR1 corresponding to page P1 as the first preset page pointer, and determine the page pointer PTRn corresponding to Pn as the second preset page pointer.
[0128] The first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be displayed loaded in the first preset number of display areas. That is, it represents that the page pointer range corresponding to the pages loaded in the display area is between PTR1 - PTRn. Specifically, when the page to be displayed corresponding to PTR1 is loaded in the current display area, and in response to the sliding signal, when the page pointer calculated according to the page sliding direction and the step value is PTR0, the operation at this time is to load the page Pn corresponding to PTRn in the current display area. Through the above page update method, cyclic display is achieved. When the page to be displayed corresponding to PTRn is loaded in the current display area, and in response to the sliding signal, when the page pointer calculated according to the page sliding direction and the step value is PTRn+1, the operation at this time is to load the page P1 corresponding to PTR1 in the current display area. Through the above page update method, cyclic display is achieved. Therefore, the first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be displayed loaded in the first preset number of display areas.
[0129] In the embodiment of the present application, by sorting the pages to be displayed and determining the first preset page pointer and the second preset page pointer, the adjustment range of the page pointers corresponding to the pages loaded in the display area is determined, and pointer cyclic switching is achieved, that is, page cyclic switching is achieved. Using this method for sliding cycle is simple and efficient, and there is no need to load all the pages at once. When switching, the corresponding page can be loaded through the page pointer, which has the advantages of simple and efficient, fast page response speed, and small memory occupancy, improving the user experience.
[0130] As an alternative embodiment, the page sliding direction includes a first preset sliding direction, such as Figure 4 shown, in the above steps, in response to the page sliding signal, according to the page sliding direction and the step value, updating the target display page pointer to obtain the updated target display page pointer includes:
[0131] S001: In response to the page sliding signal that the page slides in the first preset sliding direction, perform pointer addition calculation on the target display page pointer and the step value to obtain the first pointer calculation result.
[0132] Exemplarily, the first preset sliding direction represents a left swipe or an upward swipe. In response to a signal of swiping in the first preset sliding direction, the target display page pointer is incremented by a step value to obtain a first pointer calculation result. For example, the target display page pointer is PRT2, the step value is obtained as PRT1, and the first calculation result is PTR3.
[0133] S002: Determine whether the first pointer calculation result is greater than the second preset page pointer; when the first pointer calculation result is less than or equal to the second preset page pointer, the updated target display page pointer is the first pointer calculation result; when the first pointer calculation result is greater than the second preset page pointer, the updated target display page pointer is the first preset page pointer.
[0134] Exemplarily, compare the size of the first pointer calculation result and the second preset page pointer PTRn. When the first pointer calculation result is less than or equal to the second preset page pointer, it means that the target display page pointer before the swipe is less than the second preset quantity, and the updated target display page pointer is the first pointer calculation result.
[0135] When the first pointer calculation result is greater than the second preset page pointer, it means that the target display page before the swipe is the second preset page pointer, that is, the target display area stores the last page to be displayed in the sorting, or the target display area does not store the last page to be displayed in the sorting, but the step value is large, resulting in exceeding the second preset page pointer after the swipe. In either of the above cases, at this time, page circular display needs to be performed, and the updated target display page pointer is the first preset page pointer.
[0136] It should be noted that the above method for updating the page pointer is not only applicable to updating the target display page pointer, but also applicable to updating the page pointers of other display areas of the circular list.
[0137] The embodiment of the present application further illustrates the page pointer update logic when the page swipes in the first preset sliding direction. Through the above page pointer update logic, page circular switching display is realized. Using this method for sliding circulation is simple and efficient, and there is no need to load all the pages at once. When switching, the corresponding page can be loaded through the page pointer, which has the advantages of simple and efficient, fast page response speed, and small memory occupancy, improving the user experience.
[0138] As an optional implementation manner, the page sliding direction includes a second preset sliding direction, such as Figure 5 described above. In the above steps, in response to the page sliding signal, according to the page sliding direction and the step value, the target display page pointer is updated to obtain the updated target display page pointer, including:
[0139] S0001: In response to a page sliding signal for sliding the page in a second preset sliding direction, perform a pointer subtraction calculation on the target display page pointer and the step value to obtain a second pointer calculation result; the second preset direction is opposite to the first preset direction.
[0140] Exemplarily, the second preset sliding direction is opposite to the first preset sliding direction, which means swiping right or down. In response to a signal for sliding in the second preset sliding direction, subtract the step value from the target display page pointer to obtain a second pointer calculation result. For example, if the target display page pointer is PRT2 and the obtained step value is PRT1, the first calculation result is PTR1.
[0141] S0002: Determine whether the second pointer calculation result is greater than the first preset page pointer; when the second pointer calculation result is greater than or equal to the first preset page pointer, the updated target display page pointer is the second pointer calculation result; when the second pointer calculation result is less than the first preset page pointer, the updated target display page pointer is the second preset page pointer.
[0142] Exemplarily, compare the size of the second pointer calculation result and the first preset page pointer PTR1. When the first pointer calculation result is greater than or equal to the second preset page pointer, it means that the target display page pointer before sliding is greater than the second preset quantity, and the updated target display page pointer is the second pointer calculation result.
[0143] When the first pointer calculation result is less than the first preset page pointer, it means that the target display page before sliding is the first preset page pointer, that is, the page to be displayed at the top of the sorting is stored in the target display area, or the page stored in the target display area is not the page to be displayed at the top of the sorting, but the step value is large, resulting in exceeding the first preset page pointer after sliding. In either of the above cases, at this time, page circular display is required, and the updated target display page pointer is the second preset page pointer.
[0144] It should be noted that the above method for updating the page pointer is not only applicable to updating the target display page pointer, but also applicable to updating the page pointers in other display areas of the circular list.
[0145] The embodiments of the present application further illustrate the page pointer update logic when the page slides in the second preset sliding direction. Through the above page pointer update logic, page circular switching display is realized. Using this method for sliding circulation is simple and efficient, and there is no need to load all pages at once. When switching, the corresponding page can be loaded through the page pointer, which has the advantages of simplicity, high efficiency, fast page response speed, and small memory occupancy, improving the user experience.
[0146] The present application also provides a preferred embodiment to illustrate the above method, as Figure 6 shown, which is specifically described as follows:
[0147] 1. Initialize a circular list with a default capacity of 3, and the list serial numbers are ID0, ID1, and ID2, that is, three display areas are set; there are a total of N pages to be cyclically displayed, namely P1, P2, P3,... Pn, and their corresponding page pointers are PTRi (i = 1,.. n). After each list is initialized, the cached content is the page pointer PTRi (i = 1,.. n) to be loaded;
[0148] 2. Set ID1 as the default display area, that is, the target display area, and load the default display elements into the default display area. The page pointer corresponding to ID1 is IPR21, and the pointers PTR11 and PTR31 of serial numbers ID0 and ID2 are empty.
[0149] 3. Load the three pages to be displayed, P1, P2, and P3, into ID0, ID1, and ID2. The page pointers of the three pages to be displayed are PTR1, IPR2, and PTR3 respectively, that is, the page pointer stored in ID0 is PTR1, the page pointer stored in ID1 is PTR2, and the page pointer stored in ID2 is PTR3.
[0150] 4. In response to the signal of swiping left, that is, the direction of serial number ID1 > serial number ID0. At this time, the operation is that the page pointer PTR1 of serial number ID0 points to P2, the page pointer PTR2 of serial number ID1 points to P3, and the page pointer PTR3 of ID2 points to P4; when swiping left to the end, at this time, the page pointer stored in ID2 is PTRn, that is, the last page. When continuing to swipe left, the operation that needs to be performed at this time is that the page pointer stored in ID2 needs to become PTR1, that is, the loop function is realized.
[0151] 5. In response to the signal of swiping right, that is, the direction of serial number ID1 -> serial number ID2. At this time, the operation is that the page pointer PTR2 of serial number ID1 points to P1, the page pointer PTR3 of serial number ID2 points to P2, and the page pointer PTR1 of ID0 points to P1; when swiping right to the end, at this time, the page pointer stored in ID0 is PTR1, that is, the first page. When continuing to swipe right, the operation that needs to be performed at this time is that the page pointer stored in ID0 needs to become PTRn, that is, the loop function is realized.
[0152] The above page pointer replacement is performed based on the following formula:
[0153] (1) Page pointer replacement mapping relationship:
[0154] IDk (k = 0, 1, 2) => PTRi (i = 1, 2, 3, 4…n);
[0155] IDk: The page identifier, where "k" is the index, which can be 0, 1, 2, representing different display areas in the circular list; PTR represents the page pointer, which can be 1, 2, 3, 4... up to n, representing the page pointers of n pages to be circularly displayed.
[0156] (2) Page pointer calculation formula:
[0157]
[0158] ID1 = PTR{i, 1 ≤ i ≤ n;
[0159]
[0160] Regarding the above formula, it can be interpreted as:
[0161] ID0: If i - 1 is negative (i.e., i is 1), then the modulo operation (i - 1) % n will return n - 1 because the n pages are circularly used. If i - 1 is not negative, then (i - 1) % n will return i - 1;
[0162] ID1: This formula directly points the pointer PTR to the i-th page, where the range of i is from 1 to n;
[0163] ID2: This formula calculates the pointer to the page i + 1. If i + 1 is equal to n (i.e., the last page of the array), then the pointer points to page 1 (the first page of the array). If i + 1 is not equal to n, then the pointer points to (i + 1) % n, that is, loops to the next page of the array.
[0164] This mapping relationship is for implementing the page replacement algorithm of the page replacement strategy of the circular list, where the pages are loaded into physical memory in a certain order and will loop back to the start of the array when reaching the end of the array.
[0165] Based on the above method, taking the number of pages to be displayed as 6 as an example, when swiping left to the end, the pages displayed in the circular list and the pages to be displayed are as shown in Figure 7. When swiping right to the end, the pages displayed in the circular list and the pages to be displayed are as shown in Figure 8.
[0166] As an alternative implementation, as Figure 9 shown, the embodiment of the present application also provides a page destruction method, which further includes:
[0167] S91: When any page in the pages to be displayed is not displayed in the circular list, determine the target display time when any page is not displayed in the circular list.
[0168] Exemplarily, when any page in the page to be displayed is not loaded in the circular list, that is, when it is replaced, it is not immediately destroyed, but the time when this page slides out of the circular list is determined, and this time is called the target display time.
[0169] It should be noted that when there are multiple pages to be displayed that are not in the circular list, the target display time of each page to be displayed is calculated separately.
[0170] S92: Obtain the appearance frequency and residence time of any page in the circular list.
[0171] S93: Determine the destruction delay time of any page according to the appearance frequency and residence time.
[0172] Exemplarily, after the page is switched, first obtain the appearance frequency Freq and residence time Delay of any page in the circular list, calculate a suitable destruction delay time, which can also be called the delayed destruction time. Determining the delayed destruction time can ensure that the page is not immediately destroyed after being switched. When the page is switched to again before the delayed destruction time is reached, it can be quickly loaded, reducing the number of times of loading pages, increasing the operating memory of the electronic device, and at the same time improving the switching response speed of the page.
[0173] S93: When the target display time reaches the destruction delay time, destroy any page.
[0174] Exemplarily, when the time when any page slides out of the circular list, that is, the target display time reaches the destruction delay time, any page will be destroyed to release the memory space.
[0175] It should be noted that the destruction of any page does not mean that its corresponding page pointer will also be destroyed. When switching to this destroyed page again, this page will be reloaded according to the page pointer of this page.
[0176] It should be noted that the above process can also be called the page aging processing process or the page destruction process.
[0177] In the embodiments of the present application, by setting a delayed destruction time, when the page is switched, it is not immediately destroyed, but is destroyed after the switched time reaches the delayed destruction time, reducing the number of times of loading pages, releasing the operating memory of the electronic device, and at the same time improving the switching response speed of the page. When it is determined that it will not be used again in a short time, any page will be destroyed to release the memory space, improving the operating speed of the electronic device.
[0178] As an optional implementation manner, such as Figure 10As shown, in the above step S93, determining the destruction delay time of any page according to the occurrence frequency and the stay time includes:
[0179] S931: Determine the frequency weight according to the occurrence frequency and the number of destructions.
[0180] Exemplarily, for any page, whenever any page enters the circular list in response to a page sliding signal, the corresponding frequency weight of its occurrence frequency Freq is incremented by 1. When the target display time reaches the destruction delay time, its frequency weight is reset to 0.
[0181] It should be noted that when any page enters the circular list again, its weighted frequency is recalculated from the beginning.
[0182] S932: Determine the destruction delay time of any page according to the frequency weight and the stay time.
[0183] Exemplarily, set a maximum destruction delay time MAX_TIME. According to the frequency weight and the stay time, determine the destruction delay time of any page as (∑Freq weight * logDelay) ∈ MAX_TIME, so that the destruction delay time of each page tends to the set maximum destruction delay time MAX_TIME as much as possible. This can achieve the maximum utilization of resources, reduce the number of loadings and release the running memory of the electronic device to which this method is applied.
[0184] In the embodiment of the present application, the corresponding destruction delay time of any page is determined through the frequency weight and the stay time of any page, and the delayed destruction time tends to the maximum destruction delay time as much as possible, so as to maximize the utilization of resources, reduce the number of loadings and release the running memory of the electronic device to which this method is applied, improve the response speed of page sliding and switching, and improve the user experience.
[0185] On the other hand, the embodiment of the present application also provides a page circular sliding device, as Figure 11 shown, the device includes:
[0186] An acquisition module 301, configured to acquire a circular list; the circular list includes a first preset number of display areas; a second preset number of page pointers are cached in the circular list, and each of the second preset number of page pointers has a corresponding page to be displayed; the first preset number is less than the second preset number;
[0187] A page loading module 303, configured to load a first preset number of pages to be displayed in the page to be displayed into the first preset number of display areas, and determine the page pointers corresponding to the first preset number of pages to be displayed respectively;
[0188] A page pointer update module 305, configured to respond to a page sliding signal, and update respective corresponding page pointers based on a page switching logic corresponding to the page sliding signal, so as to obtain updated page pointers;
[0189] A display module 307, configured to display a to-be-displayed page corresponding to the updated page pointer in a first preset number of display areas.
[0190] As an optional implementation manner, the above-mentioned page pointer update module includes:
[0191] A page sliding direction and step value determination unit, configured to respond to a page sliding signal, and determine a page sliding direction and a step value corresponding to the page sliding signal;
[0192] A page pointer update unit, configured to update respective corresponding page pointers according to the page sliding direction and the step value, so as to obtain updated page pointers.
[0193] As an optional implementation manner, the apparatus further includes:
[0194] A target display area determination unit, configured to determine a target display area in a first preset number of display areas, and load default display elements on the target display area;
[0195] A target display page pointer determination unit, configured to determine a page pointer corresponding to a to-be-displayed page loaded in the target display area as a target display page pointer; the target display page pointer is used to determine the to-be-displayed page displayed in the target display area.
[0196] As an optional implementation manner, the page pointer update module includes:
[0197] A target display page pointer update unit, configured to respond to a page sliding signal, and update the target display page pointer according to the page sliding direction and the step value, so as to obtain an updated target display page pointer; the second preset number of page pointers includes the updated target display page pointer;
[0198] The display module includes:
[0199] A target display area display unit, configured to display a to-be-displayed page corresponding to the updated target display page pointer in the target display area..
[0200] As an optional implementation manner, the apparatus further includes:
[0201] A page pointer sorting unit, configured to sort the page pointers corresponding to the pages to be displayed respectively, determine the page pointer corresponding to the page ranked first among the pages to be displayed as the first preset page pointer, and determine the page pointer corresponding to the last rank among the pages to be displayed as the second preset page pointer; wherein, the first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be displayed loaded in the first preset number of display areas.
[0202] As an optional implementation manner, the target display page pointer updating unit is further configured to, in response to a page sliding signal that the page slides in the first preset sliding direction, perform a pointer increment calculation on the target display page pointer and the step value to obtain a first pointer calculation result; determine whether the first pointer calculation result is greater than the second preset page pointer; when the first pointer calculation result is less than or equal to the second preset page pointer, obtain the updated target display page pointer as the first pointer calculation result; when the first pointer calculation result is greater than the second preset page pointer, obtain the updated target display page pointer as the first preset page pointer.
[0203] As an optional implementation manner, the target display page pointer updating unit is further configured to, in response to a page sliding signal that the page slides in the second preset sliding direction, perform a pointer decrement calculation on the target display page pointer and the step value to obtain a second pointer calculation result; the second preset direction is opposite to the first preset direction; determine whether the second pointer calculation result is greater than the first preset page pointer; when the second pointer calculation result is greater than or equal to the first preset page pointer, obtain the updated target display page pointer as the second pointer calculation result; when the second pointer calculation result is less than the first preset page pointer, obtain the updated target display page pointer as the second preset page pointer. As an optional implementation manner, the apparatus further includes:
[0204] A target display time determining module, configured to determine the target display time when any page among the pages to be displayed is not displayed in the circular list;
[0205] An appearance frequency and stay time obtaining module, configured to obtain the appearance frequency and stay time of any page in the circular list;
[0206] A destruction delay time determining module, configured to determine the destruction delay time of any page according to the appearance frequency and the stay time;
[0207] A destruction module, configured to destroy any page when the target display time reaches the destruction delay time.
[0208] As an optional implementation manner, the destruction delay time determining module includes:
[0209] A frequency weight determination unit, configured to determine a frequency weight according to the occurrence frequency and the number of times of destruction;
[0210] A destruction delay time determination unit, configured to determine the destruction delay time of any page according to the frequency weight and the residence time.
[0211] It should be noted that the embodiment of the page loop sliding device provided in this application is based on the same inventive concept as the above-mentioned embodiment of the page loop sliding method.
[0212] The embodiment of the present application also provides an electronic device for page loop sliding. The electronic device includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and at least one instruction or at least one program segment is loaded and executed by the processor to implement a page loop sliding method provided in any of the above embodiments.
[0213] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be set in a terminal to store at least one instruction or at least one program segment for implementing a page loop sliding method in the method embodiment. At least one instruction or at least one program segment is loaded and executed by the processor to implement a page loop sliding method provided in the above method embodiment.
[0214] Optionally, in the embodiment of this specification, the storage medium can be located in at least one of multiple network servers in a computer network. Optionally, in this embodiment, the above storage medium may include, but is not limited to: various media such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc that can store program codes.
[0215] The memory in the embodiment of this specification can be used to store software programs and modules. The processor executes various functional application programs and data processing by running the software programs and modules stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0216] An embodiment of the present application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the page circular sliding method provided in the above method embodiment.
[0217] The method embodiments provided by the embodiments of the present application can be executed on a terminal, a computer terminal, a server, or a similar computing device. Taking running on a server as an example, Figure 12 is a hardware structure block diagram of a server for a page circular sliding method provided according to an exemplary embodiment. As Figure 12 shown, the server 400 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 410 (the central processing unit 410 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 430 for storing data, and one or more storage media 420 (such as one or more mass storage devices) for storing application programs 423 or data 422. Among them, the memory 430 and the storage medium 420 may be transient storage or persistent storage. The program stored in the storage medium 420 may include one or more modules, and each module may include a series of instruction operations on the server. Further, the central processing unit 410 may be configured to communicate with the storage medium 420 and execute a series of instruction operations in the storage medium 420 on the server 400. The server 400 may also include one or more power supplies 460, one or more wired or wireless network interfaces 450, one or more input / output interfaces 440, and / or one or more operating systems 421, such as Windows Server TM, Mac OS XTM, Unix TM, LinuxTM, Free BSDTM, and so on.
[0218] The input / output interface 440 may be used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server 400. In one example, the input / output interface 440 includes a network interface controller (NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one example, the input / output interface 440 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0219] Those of ordinary skill in the art can understand that Figure 12 The structure shown is only illustrative and does not limit the structure of the above electronic device. For example, server 400 may also include more or fewer components than those Figure 12 shown, or have a different configuration from that Figure 12 shown.
[0220] It should be noted that the above order of the embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of this specification have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0221] Each embodiment in this specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0222] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk, an optical disc, etc.
[0223] In order to make the purpose, technical solution and advantages of the embodiments of the present application more clear, the following further details the embodiments of the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present application and are not used to limit the embodiments of the present application.
Claims
1. A page loop sliding method, characterized in that, The method includes: Obtain a circular list; the circular list includes a first preset number of display areas; the circular list caches a second preset number of page pointers, and each of the second preset number of page pointers corresponds to a page to be displayed; the first preset number is less than the second preset number; Load a first preset number of pages to be displayed in the first preset number of display areas, and determine the page pointers corresponding to the first preset number of pages to be displayed respectively; In response to a page sliding signal, based on the page switching logic corresponding to the page sliding signal, update the corresponding page pointers respectively to obtain updated page pointers; Display the pages to be displayed corresponding to the updated page pointers in the first preset number of display areas.
2. The method according to claim 1, wherein The page switching logic includes a page sliding direction and a step value. The step of, in response to a page sliding signal, based on the page switching logic corresponding to the page sliding signal, updating the corresponding page pointers respectively to obtain updated page pointers includes: In response to the page sliding signal, determine the page sliding direction and the step value corresponding to the page sliding signal; Update the corresponding page pointers respectively according to the page sliding direction and the step value to obtain updated page pointers.
3. The method according to claim 2, wherein After obtaining the circular list, the method further includes: Determine a target display area in the first preset number of display areas, and load a default display element on the target display area; Determine the page pointer corresponding to the page to be displayed loaded in the target display area as the target display page pointer; the target display page pointer is used to determine the page to be displayed shown in the target display area.
4. The method according to claim 3, characterized in that, The step of, in response to a page sliding signal, based on the page switching logic corresponding to the page sliding signal, updating the corresponding page pointers respectively to obtain updated page pointers includes: In response to the page sliding signal, update the target display page pointer according to the page sliding direction and the step value to obtain an updated target display page pointer; the second preset number of page pointers includes the updated target display page pointer; The step of displaying the pages to be displayed corresponding to the updated page pointers in the first preset number of display areas includes: Display the pages to be displayed corresponding to the updated target display page pointer in the target display area.
5. The method according to claim 4, characterized in that The method further includes: Sort the page pointers corresponding to the pages to be displayed respectively, determine the page pointer corresponding to the page ranked first in the pages to be displayed as the first preset page pointer, and determine the page pointer corresponding to the last rank in the pages to be displayed as the second preset page pointer; Wherein, the first preset page pointer and the second preset page pointer are used to determine the adjustment range of the page pointers corresponding to the pages to be displayed loaded in the first preset number of display areas respectively.
6. The method according to claim 5, characterized in that, The page sliding direction includes a first preset sliding direction. Responding to a page sliding signal, updating the target display page pointer according to the page sliding direction and the step value to obtain an updated target display page pointer includes: Responding to a page sliding signal indicating that the page slides in the first preset sliding direction, performing a pointer increment calculation on the target display page pointer and the step value to obtain a first pointer calculation result; Determining whether the first pointer calculation result is greater than a second preset page pointer; when the first pointer calculation result is less than or equal to the second preset page pointer, obtaining the updated target display page pointer as the first pointer calculation result; when the first pointer calculation result is greater than the second preset page pointer, obtaining the updated target display page pointer as the first preset page pointer.
7. The method according to claim 5, characterized in that The page sliding direction includes a second preset sliding direction. Responding to a page sliding signal, updating the target display page pointer according to the page sliding direction and the step value to obtain an updated target display page pointer includes: Responding to a page sliding signal indicating that the page slides in the second preset sliding direction, performing a pointer decrement calculation on the target display page pointer and the step value to obtain a second pointer calculation result; the second preset direction is opposite to the first preset direction; Determining whether the second pointer calculation result is greater than the first preset page pointer; when the second pointer calculation result is greater than or equal to the first preset page pointer, obtaining the updated target display page pointer as the second pointer calculation result; when the second pointer calculation result is less than the first preset page pointer, obtaining the updated target display page pointer as the second preset page pointer.
8. The method according to claim 1, wherein The method further includes: When any page in the to-be-displayed pages is not displayed in the circular list, determining the target display time when the any page is not displayed in the circular list; Obtaining the occurrence frequency and the stay time of the any page in the circular list; Determining the destruction delay time of the any page according to the occurrence frequency and the stay time; Destroying the any page when the target display time reaches the destruction delay time.
9. The method according to claim 8, wherein The determining the destruction delay time of the any page according to the occurrence frequency and the stay time includes: Determining a frequency weight according to the occurrence frequency and the number of destructions; Determining the destruction delay time of the any page according to the frequency weight and the stay time.
10. A page loop sliding device, characterized in that, The apparatus includes: An acquisition module, configured to acquire a circular list; the circular list includes a first preset number of display areas; a second preset number of page pointers are cached in the circular list, and each of the second preset number of page pointers corresponds to a to-be-displayed page; the first preset number is less than the second preset number; A page loading module, configured to load a first preset number of to-be-displayed pages in the to-be-displayed pages into the first preset number of display areas, and determine the page pointers corresponding to the first preset number of to-be-displayed pages respectively; A page pointer update module, configured to respond to a page sliding signal, and update the respective corresponding page pointers based on the page switching logic corresponding to the page sliding signal, so as to obtain updated page pointers; A display module, configured to display the to-be-displayed page corresponding to the updated page pointer in the first preset number of display areas.