Fast application reading page turning method

By rendering the information to be read as an array in the quick app and combining it with user interaction behavior, the page turning method is dynamically selected, which solves the problem of page turning lag and compatibility in the quick app, achieves a fast and smooth page turning experience, and improves the user experience. User experience.

CN118672471APending Publication Date: 2024-09-20BEIJING RANDI MEDIA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410696089.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

The page turning of readers in existing quick apps is stuck and not smooth, which affects the user's reading experience. It is also difficult to achieve cross-platform compatibility, resulting in inconsistent page turning effects.

Method used

By rendering the information to be read in the form of an array to the swiper component, the interaction behavior information between the user and the page is obtained, and the page turning method is dynamically selected, including sliding, custom sliding and clicking, to optimize page turning efficiency.

Benefits of technology

It achieves a fast and smooth page turning experience, reduces DOM operations, and optimizes the page turning speed from 300ms to less than 100ms, solving cross-platform compatibility issues and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672471A
    Figure CN118672471A
Patent Text Reader

Abstract

The invention discloses a fast application reading page turning method which comprises the following steps: S100, rendering to-be-read information to a switch component in a fast application in an array form to obtain a plurality of to-be-read pages; s200, obtaining interaction behavior information between the user and the current reading page; and S300, executing different page turning modes based on the interactive behavior information between the user and the current reading page. Different page turning modes can be selected based on different interaction behaviors between the user and the page, the reading experience of the user can be improved, and the page turning efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of information display, and in particular relates to a quick application reading and page turning method. Background Art

[0002] With the popularity of quick apps on mobile phones, more and more people are starting to use quick apps to read articles, novels, information, etc. However, the readers in quick apps currently do not have a mature solution for page turning. They simply display information, and page turning only destroys the current page and displays a new page. There are shortcomings such as lag, unsmoothness, and poor reading experience, which greatly affect users' reading efficiency and usage experience.

[0003] In addition, since the quick application framework supports multiple operating systems and devices, the differences between different manufacturers and operating systems may result in different event triggering methods and page turning effects. Therefore, to achieve the reading page turning effect of the reader in the quick application, it is necessary to consider the compatibility issues between different platforms and devices, and perform event compatibility processing and effect optimization. However, it is difficult for the current quick application reader to achieve the above compatibility. Therefore, a method for smooth reading page turning for quick applications is urgently needed to solve the above problems. Summary of the invention

[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a quick application reading page turning method, which can select the page turning method that best matches the interaction behavior based on the user's different interaction behaviors with the page, thereby improving the user's reading experience and improving the page turning efficiency.

[0005] To achieve the above objectives, the present disclosure provides the following technical solutions:

[0006] A quick application reading page turning method includes the following steps:

[0007] S100: Rendering the information to be read in an array form to a swiper component in the quick application to obtain multiple pages to be read;

[0008] S200: Obtaining interaction behavior information between the user and the currently read page;

[0009] S300: Execute a corresponding page turning method based on the interaction between the user and the currently read page.

[0010] Preferably, step S100 includes the following steps:

[0011] S101: Obtain information to be read;

[0012] S102: Save the information to be read as an array;

[0013] S103: Render the array to a swiper component in the quick application to obtain multiple pages to be read.

[0014] Preferably, in step S200, the interactive behavior information between the user and the currently read page includes: swiper component sliding, custom sliding and clicking.

[0015] Preferably, in step S300, the page turning method includes:

[0016] The user slides the current reading page through the swiper component;

[0017] When the user uses custom sliding on the current reading page, the page is turned by calculating the horizontal distance from the finger falling to the finger lifting;

[0018] Build a menu on the current reading page and turn the page by obtaining the user's click position on the menu.

[0019] Preferably, in step S100, after obtaining a plurality of pages to be read, blank pages need to be added before and after the plurality of pages to be read respectively.

[0020] The present disclosure also provides a reader for quick application reading and page turning, comprising:

[0021] The page acquisition module is used to render the information to be read in the form of an array to the swiper component in the quick application to obtain multiple pages to be read;

[0022] An interactive behavior acquisition module is used to acquire interactive behavior information between the user and the currently read page;

[0023] The page turning module is used to execute the corresponding page turning method based on the interaction between the user and the current reading page.

[0024] Preferably, the page turning module includes:

[0025] The first page turning submodule is used to turn pages based on the swiper component;

[0026] The second page turning submodule is used to turn the page by calculating the horizontal distance from the finger sliding down to the finger lifting up;

[0027] The third page turning submodule is used to divide the current reading page into regions and turn the page by obtaining the user's click position.

[0028] Preferably, the reader further comprises:

[0029] The adding module is used to add blank pages before and after the plurality of pages to be read.

[0030] The present disclosure also provides an electronic device, comprising:

[0031] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:

[0032] When the processor executes the program, any of the above methods is implemented.

[0033] The present disclosure also provides a computer storage medium storing computer executable instructions for executing any of the above methods.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] 1. The present invention uses the smooth sliding feature of the slider view container swiper. Swiper uses native rendering technology and can directly access system resources. Therefore, it runs faster and more efficiently. It can solve the discomfort caused by lag when reading. It fills the gap in the page turning effect of the quick application reader to some extent.

[0036] 2. The present invention converts the to-be-read information to be displayed into an array by advance calculation and renders it through swiper. Since each page has been rendered according to the array in advance, when the user slides, the operation of DOM can be reduced, and there is no need to recalculate and render each page, making the page turning speed faster, and the page turning speed can be optimized from 300ms to within 100ms. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flow chart of a quick application reading and page turning method provided by an embodiment of the present disclosure;

[0038] Figure 2 It is a schematic diagram of area division on a currently reading page provided by another embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The following will refer to the attached Figure 1 to Figure 2 Specific embodiments of the present disclosure are described in detail. Although specific embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0040] It should be noted that certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that technicians may use different nouns to refer to the same component. This specification and claims do not use the difference in nouns as a way to distinguish components, but use the difference in the functions of the components as the criterion for distinction. As mentioned throughout the specification and claims, "including" or "comprising" is an open term, so it should be interpreted as "including but not limited to". The subsequent description of the specification is a preferred embodiment of the present disclosure, but the description is based on the general principles of the specification and is not used to limit the scope of the present disclosure. The scope of protection of the present disclosure shall be determined by the attached claims.

[0041] To facilitate understanding of the embodiments of the present disclosure, further explanation will be given below using specific embodiments as examples in conjunction with the accompanying drawings, and each of the accompanying drawings does not constitute a limitation on the embodiments of the present disclosure.

[0042] In one embodiment, if Figure 1 As shown, the present disclosure provides a quick application reading page turning method, comprising the following steps:

[0043] S100: Rendering the information to be read in an array form to a swiper component in the quick application to obtain multiple pages to be read;

[0044] S200: Obtaining interaction behavior information between the user and the currently read page;

[0045] S300: Execute a corresponding page turning method based on the interaction between the user and the currently read page.

[0046] The existing page turning method is that the current page disappears when turning the page, and the content of the next page is requested from the server and then displayed. This page turning method will cause the page switching to be abrupt, and the request for content will consume time, especially when the network is not good, it will cause a long blank period. The above method implemented in this embodiment can preload the content of a chapter by using the smooth sliding characteristics of the slider view container swiper in the quick application, and the page turning is smooth without constantly requesting the server, and different page turning methods can be selected based on the interaction between the user and the page, thereby improving the user's reading experience and improving the efficiency of page turning.

[0047] In another embodiment, step S100 includes the following steps:

[0048] S101: The quick application initiates a network request to the server to obtain the information to be read;

[0049] In this step, the information to be read includes chapter content, size and ratio of the terminal screen, multimedia content to be displayed (such as links to advertisements, pictures, videos, etc.), font size and line height, etc.

[0050] In the quick application component, you can first initiate a network request by defining a method (such as fetchReadingInfo). In this method, use require('@system.request') to obtain the request module and call its request method to make a network request. The specific implementation code is as follows:

[0051]

[0052]

[0053] Secondly, call the request method in the lifecycle hook of the page or component. You can select the appropriate lifecycle hook (such as onInit, onShow, etc.) to call the fetchReadingInfo method just defined to ensure that the data can be correctly bound to the template after the network request is completed. This can be achieved through the following code:

[0054]

[0055] Finally, use the obtained information to be read in the template

[0056] After completing the above steps, when the component is initialized, the quick app will initiate a GET request to the specified API endpoint to obtain the information to be read. If the request is successful, the returned data will be parsed and assigned to the readingPages property of the component, and then correctly rendered in the template.

[0057] S102: Save the information to be read as an array;

[0058] In this step, this embodiment uses the following code to illustrate how to save the information to be read as an array:

[0059]

[0060]

[0061]

[0062] In the above array, each object represents a page, and different objects display different types of pages, such as text, advertisements, pictures, videos, audio, etc.

[0063] in,

[0064] Type indicates the content displayed on the current page. Depending on the type, the displayed content is different, specifically:

[0065] When type is "text", it means the page is a text page, and the content array is displayed;

[0066] When type is "start" and "end", it means the page is a blank page for switching pages;

[0067] "ad" means advertisement;

[0068] "image" means picture;

[0069] "video" means video;

[0070] "audio" means audio;

[0071] The style field indicates the style required for the content.

[0072] S103: Render the array to a swiper component in the quick application to obtain multiple pages to be read.

[0073] In this step, rendering the array to the swiper component in the quick app includes the following steps:

[0074] 1. Introduce Swiper component

[0075] In this step, make sure to add the necessary Swiper component references according to the quick app documentation.

[0076] 2. Use Swiper component in template (.ux)

[0077] In this step, in the quick application template file (.ux), use the swiper component as a container, and use a loop (for instruction) inside it to traverse the array of information to be read. For example, a subcomponent (such as swiper-item) can be created for each item through the following code to display the information of a single reading item:

[0078]

[0079]

[0080]

[0081] 3. Add corresponding CSS styles to .reading-page and its internal elements (such as .page-title, .page-content, etc.) to ensure that the content is correctly laid out and displayed in Swiper. For example, this can be achieved through the following code:

[0082]

[0083]

[0084] After completing the above steps, the array of information to be read will be successfully rendered into the swiper component of the quick app in the form of multiple pages, and users can browse different reading pages by swiping.

[0085] In another embodiment, in step S200, the interaction behavior information between the user and the current reading page includes: swiper component sliding, custom sliding and clicking.

[0086] In this embodiment, after obtaining multiple pages to be read, it is necessary to poll the interaction behavior between the user and the current reading page, and select different page turning methods according to different interaction behaviors between the user and the reading page to obtain the best page turning efficiency, thereby enabling the user to obtain the best reading experience. Specifically, the page turning methods based on different interaction behaviors include:

[0087] Method 1: The user slides on the current reading page through the swiper component. Since the swiper is provided by the quick app itself, the slider view container will directly turn the page (a subcomponent of the swiper component is a page. When the user slides the screen, the subcomponent will slide with the user's finger. When the sliding stops, the page will be turned up and down according to the sliding distance).

[0088] Method 2: When the user uses custom sliding on the current reading page on an element outside the swiper component (an element located above the swiper component, not inside the swiper component, does not have the swiper feature, and will not follow the user's finger sliding), the coordinate position from the finger falling to the finger lifting is analyzed and the horizontal sliding distance and direction are calculated according to the coordinate position to determine how to turn the page, that is, whether to turn to the previous page or the next page;

[0089] Specifically, in this method, it is necessary to calculate whether the horizontal distance from the user's finger falling to the lifting is greater than a preset value (taking 100px as an example) and the direction, and then call the swipeTo method of the swiper component (the sliding event of the swiper component, the parameter is {index:number (specified position)}, which can make the swiper scroll to the index position) to switch pages. The specific execution process is as follows:

[0090] 1. Monitor the touchstart event (quick application event: triggered when the finger just touches the component) and the touchend event (quick application event: triggered when the finger touch action ends) of the user's finger. When the event is triggered, the parameter touches returned by the event can be used to obtain the horizontal coordinate position of the user's finger when it is dropped and lifted;

[0091] 2. Calculate the difference in horizontal displacement of the finger when the user's finger falls and lifts up through two horizontal coordinates, that is, the sliding distance;

[0092] 3. Compare the sliding distance with the preset value (for example, 100px) to determine whether the sliding distance is greater than the preset value. If the original coordinates of the current page are set to (0,0), the coordinates of the finger falling are (x1,y1), and the coordinates of the finger lifting are (x2,y2), then the sliding distance is expressed as distance = x1-x2.

[0093] 4. When the absolute value of the sliding distance is greater than 100px, it turns to the positive page, that is, turns to the next page; when the absolute value of the sliding distance is less than 100px, it turns to the negative page, that is, turns to the previous page; if the absolute value is equal to 100px, the page will not be turned. The specific page turning method is to switch pages through the swipeTo method of the quick application Swiper component.

[0094] It should be noted that the above preset values ​​cannot be too high or too low. If they are too low, it will cause accidental page turning, and if they are too high, it will cause difficulty in page turning, affecting the user experience. For example, a preset value less than 5px can be defined as too low. If the preset value is less than 5px, the user may accidentally touch the page and trigger the page turning; a preset value greater than 300px can be defined as too high. If the preset value is greater than 300px, the user's finger may slide beyond the screen range but the page turning may not be triggered.

[0095] Method 3: Divide the current reading page horizontally into Figure 2 The three areas shown include a forward area, a menu area, and a backward area. Pages are turned by obtaining the click position of the user on the page. Clicking the menu area does not turn the page.

[0096] In this method, a quick app click event listener is added to each area (that is, the click event is bound to the element for listening). When the user clicks the forward area, the reader turns the page forward. When the user clicks the backward area, the reader turns the page backward. The page turning method uses the swipeTo method mentioned above.

[0097] In another embodiment, in step S100, after obtaining a plurality of pages to be read, blank pages need to be added before and after the plurality of pages to be read.

[0098] In this embodiment, adding blank pages before and after the multiple pages to be read can be achieved by the following steps:

[0099] 1. Modify the data structure;

[0100] Add an object representing a blank page before and after the original readingPages array. These objects can contain an identifier (such as type:'blank') to distinguish blank pages from ordinary reading pages in the template. Modifying the data structure can be achieved through the following code:

[0101]

[0102]

[0103] 2. Modify the template (.ux);

[0104] In the template, determine whether the current page being rendered is a blank page or a normal reading page based on item.type, and adjust the rendered content accordingly. For a blank page, you can just display a placeholder element (such as an empty view or div), or use a specific style to make it look like a blank page. To modify the template, you can use the following code:

[0105]

[0106]

[0107]

[0108] In the above code, Vue.js's conditional rendering instructions v-if and v-else are used to distinguish between blank pages and normal reading pages. For blank pages, only an empty view element is rendered and the class name is blank-page. For normal reading pages, the original content display logic is retained.

[0109] 3. Modify the style (.ux.css);

[0110] Add corresponding CSS styles to the blank page to make it look like a blank page. For example, you can set the background color, hide content, etc. You can modify the style through the following code:

[0111]

[0112]

[0113] After completing the above steps, the array of information to be read will have a blank page added before and after, and will be correctly rendered in the swiper component of the quick app. Users can browse multiple reading pages including blank pages by sliding.

[0114] It should be noted that due to the differences in event compatibility among different quick application manufacturers, the rendering of the next chapter cannot be simply triggered by a general event. Therefore, a blank page is added as a tool page to the first and last pages of the multiple pages to be read to serve as an index for switching chapters (blank page is a standardized element. Regardless of the manufacturer, the display of blank pages can be monitored through the change event, so that the reading of the chapter content is known, and the chapter is switched). When the Swiper component's change detects a blank page after multiple pages to be read, the Swiper component destroys the current array, and immediately obtains multiple new information to be read by executing step S100 and converts it into a new array to obtain multiple new pages to be read. Because quick applications are developed using the MVVM design pattern, developers do not need to directly operate the addition and deletion of DOM nodes, and use a data-driven approach to complete node updates, so new chapter content will be displayed.

[0115] In another embodiment, the present disclosure further provides a reader for reading and turning pages in a quick application, including:

[0116] The page acquisition module is used to render the information to be read in the form of an array to the swiper component in the quick application to obtain multiple pages to be read;

[0117] An interactive behavior acquisition module is used to acquire interactive behavior information between the user and the currently read page;

[0118] The page turning module is used to execute the corresponding page turning method based on the interaction between the user and the current reading page.

[0119] In another embodiment, the page turning module includes:

[0120] The first page turning submodule is used to turn pages based on the swiper component;

[0121] The second page turning submodule is used to turn the page by calculating the horizontal distance from the finger sliding down to the finger lifting up;

[0122] The third page turning submodule is used to divide the current reading page into regions and turn the page by obtaining the user's click position.

[0123] In another embodiment, the reader further comprises:

[0124] The adding module is used to add blank pages before and after the plurality of pages to be read.

[0125] In another embodiment, the present disclosure further provides an electronic device, including:

[0126] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:

[0127] When the processor executes the program, any of the above methods is implemented.

[0128] In another embodiment, the present disclosure further provides a computer storage medium storing computer executable instructions for executing any of the above methods.

[0129] The applicant of the present invention has described the embodiments of the present invention in detail in conjunction with the drawings of the specification, but those skilled in the art should understand that the above embodiments are only preferred implementation examples of the present invention and are not limited to the above specific embodiments. The detailed description is to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvement or change based on the spirit of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for turning pages in a quick application reading. The following steps are involved: S100: Rendering the information to be read to the swiper component in the quick application to obtain multiple pages to be read; S200: Obtaining interaction behavior information between the user and the currently read page; S300: Execute a corresponding page turning method based on the interaction between the user and the currently read page.

2. The method according to claim 1, in, Preferably, in step S200, the interactive behavior information between the user and the currently read page includes: swiper component sliding, custom sliding and clicking.

3. The method according to claim 1, in, In step S300, the page turning method includes: The user slides the current reading page through the swiper component.

4. The method according to claim 1, in, In step S100, after obtaining a plurality of pages to be read, blank pages need to be added before and after the plurality of pages to be read.

5. A reader for implementing the method according to any one of claims 1 to 4, include: The page acquisition module is used to render the information to be read to the swiper component in the quick application to obtain multiple pages to be read; An interactive behavior acquisition module is used to acquire interactive behavior information between the user and the currently read page; The page turning module is used to execute the corresponding page turning method based on the interaction between the user and the current reading page.

6. The reader according to claim 5, in, The reader also includes: The adding module is used to add blank pages before and after the plurality of pages to be read.

7. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

8. A computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the method according to any one of claims 1 to 4.