Desktop page turning and sliding processing method, device and terminal based on intelligent terminal
By detecting the user's finger sliding operation and calculating the offset progress value of the subview, the subview is controlled to rotate angles and transparency changes, which solves the problem of simple and lack of dynamic interface of the smartphone, and achieves a richer and dynamic user interaction experience.
Patent Information
- Application Number
- CN202411832134.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-04
AI Technical Summary
The existing smartphone interface is too simple and lacks dynamic, resulting in poor user interaction experience.
By detecting the user's finger sliding operation, the offset progress value of each subview and the center point of the screen is calculated, and the subview is controlled to perform angle rotation and transparency changes based on this value, achieving a smooth and dynamic sliding effect.
It improves the visual appeal of the user interface and the pleasure of user interaction, provides a richer and more engaging operating experience, and solves the problems of the simple and lack of dynamic interface of the early smartphone.
Smart Images

Figure CN119759247A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent terminals, and in particular to an intelligent terminal-based desktop page turning and sliding processing method, device, intelligent terminal and storage medium. Background Art
[0002] With the rapid development of science and technology, smart terminals such as smart phones have become an indispensable communication tool in people's daily lives. With the development of smart phones, screen resolutions are getting higher and higher, processor performance is also significantly improved, and smart phones can achieve more and more functions; for example, some smart phones use simple linear transition animations for desktop flipping, but the interactive experience of the desktop flipping user interface using linear transition animations is not good and is not convenient for users to use.
[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0004] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a desktop page turning and sliding processing method, device, smart terminal and storage medium based on a smart terminal are provided. The realization of the sliding special effects of the present invention not only improves the visual appeal of the user interface, but also enhances the pleasure of user interaction; it solves the problem that the early smart phone interfaces are too simple and lack of dynamism, provides users with a richer and engaging operating experience, and provides convenience for users.
[0005] The technical solution adopted by the present invention to solve the problem is as follows:
[0006] A desktop page turning and sliding processing method based on an intelligent terminal, comprising:
[0007] When the smart terminal is in desktop state, the sliding operation specified by the user's finger is detected in real time;
[0008] According to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding;
[0009] During the sliding of the desktop page, traverse each subview and calculate the offset progress value of each subview from the center point of the screen;
[0010] According to the offset progress value, the corresponding subview is controlled to rotate at a corresponding angle, and while rotating the slide page of each subview, the previous view of the corresponding subview is controlled to rotate at a corresponding angle and change in transparency, so as to realize the sliding effect generated by sliding the page.
[0011] The desktop page turning sliding processing method based on the smart terminal, wherein when the smart terminal is in the desktop state, before the step of real-time detection of the sliding operation specified by the user's finger includes:
[0012] The sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal is preset as a sliding operation of sliding the finger to the left or to the right on the desktop.
[0013] The desktop page turning sliding processing method based on the intelligent terminal, wherein the step of detecting the sliding operation specified by the user's finger in real time when the intelligent terminal is in the desktop state comprises:
[0014] When the smart terminal is in the desktop state, it detects in real time whether the user's finger slides left or right on the desktop;
[0015] When it is detected that the user's finger has a sliding operation of sliding to the left or sliding to the right on the desktop, it is determined that the sliding operation specified by the user's finger is detected.
[0016] The desktop page turning sliding processing method based on the intelligent terminal, wherein, according to the sliding operation specified by the user's finger detected, the desktop is controlled to follow the finger sliding to turn the page;
[0017] According to the detected sliding operation of the user's finger sliding to the left on the desktop, the desktop is controlled to slide to the left to turn the page following the sliding operation of the finger sliding to the left;
[0018] Or, according to the detected sliding operation of the user's finger sliding to the right on the desktop, the desktop is controlled to slide to the right to turn the page following the sliding operation of the finger sliding to the right.
[0019] The desktop page turning sliding processing method based on the intelligent terminal, wherein, during the desktop page sliding process, the step of traversing each subview and calculating the offset progress value of each subview from the center point of the screen includes:
[0020] During the desktop page sliding process, traverse each subview;
[0021] Calculate the half width (halfScreenSize) of the smart terminal desktop screen to determine the center position reference point of the view;
[0022] Get the scroll position of the current page being flipped, add half the screen width, estimate the distance between the center of the page and the center of the screen, and get the offset progress value of each subview from the center of the screen, that is, the offset.
[0023] The desktop page turning and sliding processing method based on the intelligent terminal, wherein the steps of controlling the corresponding subview to rotate at a corresponding angle according to the offset progress value, and controlling the previous view of the corresponding subview to rotate at a corresponding angle and change in transparency while rotating and sliding each subview, and realizing the sliding effect generated by sliding the page include:
[0024] According to the positive or negative value of the offset and whether the layout direction is from right to left, determine whether the sliding direction of the adjacent page is forward or backward;
[0025] Calculate the total distance: If the adjacent page index is invalid, that is, it exceeds the page range, the total distance is the current page width plus the panelCount times of the page spacing, where panelCount represents the number of sub-panels contained in each page or a certain grouping method; if the adjacent page index is valid, the distance required to scroll from the current page to the adjacent page is calculated as the total distance;
[0026] The scroll progress value is obtained by dividing the offset by the total distance.
[0027] The desktop page turning and sliding processing method based on the intelligent terminal, wherein the corresponding subview is controlled to rotate at a corresponding angle according to the offset progress value, and the previous view of the corresponding subview is controlled to rotate at a corresponding angle and change in transparency while rotating and sliding each subview, and the step of realizing the sliding effect generated by sliding the page also includes:
[0028] Traverse each subview in the page;
[0029] Calculate the specific transformation parameters of the view according to the position of the subview in the page and the scroll progress value;
[0030] Apply a rotation effect, determine the rotation angle based on the scroll progress value, and rotate around the x-axis, y-axis, or z-axis;
[0031] Apply transparency changes and adjust the transparency value of the view according to the scroll progress value to achieve a fade-in and fade-out effect;
[0032] Apply horizontal displacement and adjust the x coordinate of the view according to the scroll progress value to achieve a sliding effect.
[0033] A desktop page turning and sliding processing device based on an intelligent terminal, wherein the device comprises:
[0034] A presetting module, used for presetting the sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal to be a sliding operation of sliding the finger to the left or to the right on the desktop;
[0035] A sliding action detection module is used to detect the sliding action specified by the user's finger in real time when the smart terminal is in the desktop state;
[0036] A page turning control module, used to control the desktop to turn pages according to the sliding operation specified by the user's finger according to the detection;
[0037] The offset progress value calculation module is used to traverse each subview during the desktop page sliding process and calculate the offset progress value of each subview and the center point of the screen;
[0038] The page turning and sliding control module is used to control the corresponding sub-view to rotate at a corresponding angle according to the offset progress value, and control the corresponding sub-view's previous view to rotate at a corresponding angle and change in transparency while rotating each sub-view, so as to achieve the sliding effect generated by sliding the page.
[0039] An intelligent terminal includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, including the method for executing any one of the methods described above.
[0040] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described above.
[0041] As can be seen from the above, the present application provides a desktop page turning and sliding processing method, device, smart terminal and storage medium based on a smart terminal, which adopts: detecting the user's finger sliding operation; during the page sliding process, traversing each subview and calculating its offset progress value with the center point of the screen; applying corresponding angle rotation and transparency change to each subview according to the offset progress value; and finally realizing the page sliding special effect generated by sliding the page. The present invention adds a new function to the smart terminal: it has a desktop page turning and sliding function; by monitoring the user's finger sliding operation, calculating the offset progress value of the page with the center point of the screen, and applying angle rotation and transparency change to each subview based on this, so as to achieve a smooth and dynamic page sliding special effect: and the present invention also has the following advantages:
[0042] 1) With accurate offset progress calculation: by calculating the half width of the screen, the distance between the center of the current page and the center of the screen (delta), and considering the position of the adjacent pages, an accurate scroll progress value (scrollProgress) is obtained. This value is limited to a predetermined range to ensure the consistency and controllability of the special effects.
[0043] 2) Dynamic view transformation: Based on the calculated scroll progress value, rotation and horizontal displacement effects are applied to each subview. This dynamic transformation makes the page flipping process more vivid and three-dimensional.
[0044] 3) Highly adaptable layout: The solution takes into account the right-to-left (RTL) layout direction, enhancing its applicability in different language environments.
[0045] 4) Performance optimization: By performing calculations and rendering only during the sliding process, unnecessary resource consumption is avoided, ensuring smooth performance under various hardware conditions.
[0046] The implementation of the sliding special effect of the present invention not only improves the visual appeal of the user interface, but also enhances the pleasure of user interaction, solves the problem that the interface of early smart phones is too simple and lacks dynamism, and provides users with a richer and more attractive operating experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 The present invention is a flowchart of a method for processing desktop page turning and sliding based on a smart terminal provided by an embodiment of the present invention.
[0049] Figure 2 It is a flowchart of a desktop page turning and sliding processing method based on an intelligent terminal according to a specific application embodiment of the present invention.
[0050] Figure 3 It is a principle block diagram of an embodiment of a desktop page turning and sliding processing device based on a smart terminal provided by the present invention.
[0051] Figure 4 It is a block diagram of the internal structure principle of the intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0053] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0054] If smart terminals can achieve more diverse and complex sliding effects, such as 3D rotation, zooming, fading in and out, etc. These effects not only make the user interface more attractive, but also increase the pleasure of user interaction.
[0055] The present invention provides a method for processing desktop page turning and sliding based on a smart terminal, and provides a method for realizing desktop page turning and sliding special effects, aiming to solve the problem of interactive experience of smartphone user interface. With the improvement of smartphone hardware performance, complex animation and transition effects become possible, and the present invention is an innovative solution proposed based on this background.
[0056] The present invention monitors the user's finger sliding operation, calculates the offset progress value between the page and the center point of the screen, and based on this, applies angle rotation and transparency change to each subview (full-page desktop view), thereby achieving a smooth and dynamic page sliding effect.
[0057] Specifically, Figure 1 As shown, a desktop page turning sliding processing method based on a smart terminal in Embodiment 1 of the present invention includes the following steps:
[0058] Step S100: presetting the sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal to be a sliding operation of sliding the finger to the left or to the right on the desktop.
[0059] In the embodiment of the present invention, the intelligent terminal is described by taking a smart phone as an example. In specific implementation, in the operation interface of the smart phone in the embodiment of the present invention, the user can turn pages by sliding his finger to view different applications or functions on the mobile phone desktop.
[0060] Specifically, the main content of this step is to set the left and right sliding gesture operation for the user, and the user can switch the desktop page by simply sliding the finger. The sliding operation specified by the user's finger for controlling the page sliding of the smart terminal desktop is pre-set as a sliding operation of sliding the finger to the left or right on the desktop. This function can be realized by configuring the gesture operation in the setting menu of the device, allowing users to customize it according to their own habits.
[0061] The benefit of this step is that users do not need to use physical buttons or complex operations to switch desktops, and can easily achieve it by simply sliding. It can also improve the response speed. Gesture sliding is more intuitive and faster than clicking icons or pressing buttons, especially when multitasking, which can improve the user's operating efficiency.
[0062] Step S200: When the intelligent terminal is in the desktop state, a sliding operation specified by a user's finger is detected in real time;
[0063] In this step embodiment, when the user unlocks the phone and enters the desktop state, the smart terminal phone starts to track and analyze the finger movements on the screen in real time. When the user slides with his finger, the smart phone will immediately recognize this gesture and perform a preset function in the subsequent steps, such as turning pages. Such real-time detection relies on the touch screen technology of the phone. For example, the phone uses a capacitive touch screen, which can quickly recognize multi-touch actions.
[0064] Specifically, the step S200 includes:
[0065] S201, when the smart terminal is in the desktop state, detecting in real time whether the user's finger slides left or right on the desktop;
[0066] In the embodiment of the present invention, when the smart phone is in the desktop state, it starts to monitor the user's finger movements. The mobile phone continuously checks whether the user has a left or right sliding gesture on the screen through the sensor of the touch screen. This real-time detection requires the device to have a highly sensitive touch recognition capability to ensure that every movement of the user can be captured.
[0067] S202: When it is detected that the user's finger has a sliding operation of sliding to the left or sliding to the right on the desktop, it is determined that a sliding operation designated by the user's finger has been detected.
[0068] In the embodiment of the present invention, once the mobile phone detects that the user's finger has indeed slid to the left or right, it will determine this action as the user's designated sliding operation. This means that the system has confirmed the action that the user really wants to perform, so that corresponding feedback can be taken or subsequent instructions can be executed.
[0069] In the embodiment of the present invention, by real-time monitoring of the user's sliding action, the smart phone can provide more dynamic feedback, allowing the user to experience a better interactive experience. In addition, this detection method can ensure that the user's instructions are responded to quickly, reduce delays, improve the smoothness of operations, and respond quickly. Moreover, the user only needs a simple sliding gesture to execute a command, which reduces the complexity of the operation. In particular, it is more convenient for multitasking or quickly finding applications.
[0070] Step S300: According to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding;
[0071] This step embodiment involves how to respond to the user's sliding gestures in real time and make the desktop screen turn pages accordingly according to these gestures, that is, turn desktop pages similar to turning pages of a book.
[0072] Specifically, the method embodiment of the present invention not only detects the user's finger sliding operation, but also can accurately control the page turning operation of the desktop according to this operation. When the user slides the finger to the left or right, the present invention will recognize this action in real time and start turning the desktop page, showing the movement corresponding to the finger sliding. If the user slides to the left, the present invention will control the desktop to move to the left following the finger sliding direction; correspondingly, sliding to the right will move the desktop to the right.
[0073] The smooth page switching of the present invention can dynamically adjust the displayed content while the user is sliding, making the desktop interface look more flexible and intuitive.
[0074] In the embodiment of the present invention, the user can control the screen through natural gestures, which improves the intuitiveness of the operation. Just a simple finger slide, without additional clicks or buttons, provides a smoother experience. And through the clear sliding direction of the finger, the system can more accurately identify the user's intention and reduce the possibility of erroneous operation, which is crucial to improving the user experience.
[0075] Furthermore, the step S300 specifically includes:
[0076] Step S301: according to the detected sliding operation of the user's finger sliding to the left on the desktop, the desktop is controlled to slide to the left to turn the page following the sliding operation of the finger sliding to the left;
[0077] That is, in the embodiment of the present invention, when a sliding operation of a user's finger sliding to the left on the desktop is detected, the desktop is controlled to slide to the left synchronously with the sliding operation of the finger sliding to the left to turn the page.
[0078] Step S302, according to the detected sliding operation of the user's finger sliding to the right on the desktop, the desktop is controlled to slide to the right to turn the page following the sliding operation of the finger sliding to the right.
[0079] In this step embodiment, according to the detected sliding operation of the user's finger sliding to the right on the desktop, the desktop is controlled to slide to the right to turn the page following the sliding operation of the finger sliding to the right, and the process goes to step S400.
[0080] Step S400: During the sliding process of the desktop page, traverse each subview and calculate the offset progress value of each subview from the center point of the screen;
[0081] In the embodiment of the present application, when the user slides the desktop page, the distance and relative position between each subview (i.e., the full-page desktop view involved when turning the page) and the center point of the screen are checked in real time. This process involves calculating the "offset progress value" between each subview (i.e., the full-page desktop view involved when turning the page) and the center point, that is, determining the distance between their positions in the current sliding process and the center point of the screen, and then proceeding to step S500.
[0082] Step S500: According to the offset progress value, the corresponding subview is controlled to rotate at a corresponding angle, and while rotating each subview, the previous view of the corresponding subview is controlled to rotate at a corresponding angle and change in transparency, so as to realize the sliding effect generated by sliding the page.
[0083] In the embodiment of this step, according to the offset progress value calculated in step S400, the corresponding subview (full-page desktop view) is controlled to rotate at an appropriate angle in the form of a page. The rotation angle is proportional to the offset. At the same time, the present invention also adjusts the previous view of the current view to achieve a rotation effect, that is, during the sliding process, the content of the previous page will also gradually rotate and display transparently, thereby creating a sense of continuity of the sliding effect generated by the sliding page.
[0084] For example, when a user uses a smartphone, the user slides on the home screen to switch application pages. The scenario is as follows:
[0085] Step S400 implements: when the user slides his finger to the left on the screen, the present invention will calculate the offset between each application icon and the center point of the screen in real time. During the sliding page turning process, the icons on the left will gradually approach the center point, and the icons on the right will gradually move away from the center.
[0086] Step S500 implements: When the user slides to a certain extent, the application icon on the left side of the page starts to rotate, forming a certain angle, and rendering a gradient transparent effect, as if "floating out" from the screen. At the same time, the subview (full-page desktop view) to be displayed on the right side of the page also rotates toward the center, creating a feeling of "entry". Each page with a desktop icon is slid and turned in the mode of a full-page book.
[0087] This visual effect allows users to not only see the changes in the application icons when switching pages, but also observe the dynamic changes in angle and transparency transition, forming a visual "sliding page turning effect", further improving the interactivity and fun of the interface. Overall, this design significantly enhances the user experience and makes the operation more active and attractive.
[0088] It can be seen that by implementing the change of rotation and transparency in the embodiment of the present invention, the interface can be made more vivid and interesting, and the visual enjoyment of the user during use can be increased. In addition, the dynamic sliding page special effects can make the user feel that each of their operations has feedback, which enhances the sense of control and participation in the device. And compared with static page switching, this visual effect can effectively reduce the user's visual fatigue and make the sliding switching process more natural and smooth. In addition, the exquisite sliding page special effects can attract the user's attention and increase the attention to the application, thereby improving the overall user experience.
[0089] Furthermore, the step S400 specifically includes:
[0090] S401, traversing each subview during the sliding of the desktop page;
[0091] In this step, when the page slides, each subview (full-page desktop view) (such as the next page icon desktop of the current main desktop, etc.) will be traversed and checked. This traversal process is to obtain the current position information of each view to ensure that the system can dynamically adjust the page turning of all subviews (full-page desktop views).
[0092] S402, calculating the half width (halfScreenSize) of the desktop screen of the intelligent terminal, which is used to determine the central position reference point of the view;
[0093] In this step, the half width (halfScreenSize) of the desktop screen is calculated to determine the reference point of the center position of the screen. Half the width of the screen can help the system set up a baseline to measure the position of other views when performing layout and view changes.
[0094] S403, obtaining the scroll position of the current page being turned, and adding half the screen width, estimating the distance between the center of the page and the center of the screen, and obtaining the offset progress value between each subview and the center point of the screen, that is, obtaining the offset.
[0095] In this step, the scroll position of the current page is obtained, and the value of half the screen width is added to the scroll position to estimate the distance between the center of the current page and the center of the screen. Through these values, the present invention can calculate the offset of the sub-view (full-page desktop view) corresponding to the page turning relative to the center of the screen, thereby obtaining the position change of each sub-view (full-page desktop view).
[0096] For example, take the case where a user is using a smartphone and wants to switch to the next desktop application page by swiping.
[0097] Operation of step S401: When the user slides to the left, the system of the smart phone of the embodiment of the present invention instantly traverses all application icons on the current desktop and collects their location data for the next step of processing.
[0098] Calculation in step S402: This step calculates the half width of the screen (for example, if the screen width is 360 pixels, the half width is 180 pixels) as the reference center point. This calculation provides a reference for subsequent offset measurement.
[0099] Execution of step S403: If the user's current scrolling position is 100 pixels, the present invention will add half the screen width (180 pixels) to the current scrolling position to obtain 280 pixels, and use this value to evaluate the distance between each subview (full-page desktop view) and the center of the screen, and then calculate the offset of each application icon.
[0100] Through these steps, the present invention enables the smart phone to efficiently and in real time update the position change of the subview (full-page desktop view) during the sliding process, so that each operation can present a smooth and eye-catching visual effect. The accuracy of the calculation and the design of immediate feedback allow users to experience a significantly smooth experience when using the device, thereby increasing their satisfaction with the device.
[0101] And the present invention can provide users with a dynamic and smooth visual experience by traversing the corresponding sub-views involved in page turning and calculating their offsets from the center of the screen, making the operation more intuitive. And the clear center position reference point and offset calculation make the interface respond to user operations more accurately, reducing the chance of misoperation. And the user can watch the position change of the sub-view (full-page desktop view) in real time when sliding, which increases the vividness of the operation and improves the user's sense of participation and satisfaction. And by using the center of the screen and the current scrolling position, the system can adapt to screens of various sizes and the sliding speed of the user, thereby achieving stronger compatibility and flexibility.
[0102] Furthermore, the step S500 specifically includes:
[0103] S501, judging whether the sliding direction of the adjacent page is forward or backward according to the positive or negative value of the offset and whether the layout direction is from right to left;
[0104] The core of this step is to determine the current sliding direction of the user. By analyzing the positive and negative values of the offset (for example, a positive value indicates sliding to the right, and a negative value indicates sliding to the left), and the direction of the page layout, the present invention can confirm whether the sliding direction of the adjacent page is forward (next page) or backward (previous page). For example, if the user slides to the left and the offset is a negative value, it means that the user wants to turn the page forward.
[0105] S502, calculating the total distance: if the adjacent page index is invalid, that is, it exceeds the page range, the total distance is the current page width plus the panelCount times of the page spacing, where panelCount represents the number of sub-panels contained in each page or a certain grouping method; if the adjacent page index is valid, the distance required to scroll from the current page to the adjacent page is calculated as the total distance;
[0106] In the embodiment of this step, the total distance needs to be calculated in order to accurately determine the specific position between the pages during the sliding process. If the index of the current page and the target page exceeds the valid range (i.e., there is no next page or previous page), then the embodiment of the present invention will set the total distance to the current page width plus the page spacing (e.g., margin or spacing) multiplied by the number of sub-panels contained in the page, so as to give the user a reasonable visual effect. If the current index is valid, the present invention will determine the total distance by directly calculating the distance between the current page and the adjacent page.
[0107] S503: Divide the offset by the total distance to obtain a scrolling progress value.
[0108] In this step, the scroll progress value calculated by the ratio of the offset to the total distance can monitor the current sliding progress of the user. This progress value can not only indicate the extent of page sliding, but also be used to control the animation effects of page elements, such as transparency changes and rotation effects.
[0109] For example, a user is using a smart phone and turning pages on a desktop icon page.
[0110] Step S501 implements: the user slides the screen to the left on the main desktop to view the next page of desktop icons. The present invention detects that the offset is a negative value and confirms that the user is sliding in the layout direction from right to left, so it determines that the user wants to turn the current desktop forward.
[0111] Step S502 Calculation: At this time, if the index of the user's current page is valid (for example, the current desktop has the third icon page and the fourth icon page), the present invention will calculate the total distance required from the current page to the next page, for example, the width of each desktop page is 310 pixels, and the spacing between pages is 10 pixels. In this case, the total distance is calculated as 310 pixels, plus the spacing of 10 pixels, a total of 320 pixels.
[0112] Step S503 calculates: when the user has slid 80 pixels, the present invention divides the offset (80 pixels) by the total distance (320 pixels) to obtain a scroll progress value of 0.25, which means that the user has made 25% progress in sliding toward the next page of desktop icons.
[0113] During the entire sliding process, the precise feedback and dynamic calculation of the present invention can make the user feel that the application interface is coordinating with the user's gestures, creating a smoother and more pleasant user experience. Every time you scroll, you can see the instant update of the page and the smooth interaction effect, making the process of using this device more natural and pleasant.
[0114] Benefits of this step: By calculating the clear sliding direction and progress, the user's operation on the interface becomes more intuitive and natural, which enhances the user's sense of control. And the possibility of misoperation is reduced, because the present invention ensures that the user can get reasonable feedback even when sliding on the edge page through effective index checking, reducing user misunderstanding and wrong operation. And by calculating and displaying the corresponding sliding progress, dynamic effects can be displayed during the user's sliding process, thereby increasing visual appeal and improving the overall user experience.
[0115] Furthermore, the step S500 specifically includes:
[0116] S511, traverse each subview in the page;
[0117] In the embodiment of this step, all desktop views on the mobile phone desktop are traversed, where each desktop view is called a subview, and each subview has multiple APP application icons. In this process, the APP application icon of each subview will be marked for subsequent processing. This ensures that each icon is identified and can be processed, improving the overall user experience; and through traversal, each icon in each subview can be flexibly coordinated with the overall page turning operation.
[0118] For example, if there are 12 application icons on a mobile phone desktop, during the traversal process, the program will allow each icon to enter the subsequent page turning and scrolling process. Even if new icons are added, the traversal operation ensures that they can all be recognized without additional code adjustments.
[0119] S512, calculating specific transformation parameters of the view according to the position of the subview in the page and the scroll progress value;
[0120] In the embodiment of this step, the transformation parameters of each view, such as rotation angle, transparency and horizontal displacement, are dynamically calculated based on the position of each subview in each page (such as the first desktop view, the second desktop view) and the user's scrolling progress (such as the percentage moving from the top to the bottom).
[0121] For example, when the user slides the desktop to the left, the first desktop view will be switched to the second desktop view. The icon in the center of the first desktop view screen may need to be displayed with a transparency of 0.8 at the 70% position, while the icon in the second desktop view located on the right side of the screen needs to calculate its transformation parameters when it enters the field of view to ensure the naturalness of the animation effect.
[0122] S513, applying a rotation effect, determining a rotation angle according to the scroll progress value, and rotating around the x-axis, y-axis or z-axis;
[0123] In this step, the rotation effect is applied to each subview according to the previously calculated progress value and angle. The rotation can be around the x-axis, y-axis or z-axis, and different axes will have different visual effects on the icon.
[0124] For example, when the user scrolls the desktop to the left, a cool weather application icon on the full-page desktop may slowly rotate 90 degrees around the y-axis, making the user pay more attention to the icon.
[0125] In the embodiment of the present invention, the rotation effect can effectively attract the user's attention and increase the vividness of the interface.
[0126] S514, applying transparency changes, adjusting the transparency value of the view according to the scroll progress value, to achieve a fade-in and fade-out effect;
[0127] In the embodiment of this step, the system adjusts the transparency of each icon according to the user's scrolling progress to achieve a gradient effect, so that the icon gradually appears or disappears.
[0128] The change of transparency makes the appearance and disappearance of icons more natural and less abrupt. The fade-in and fade-out effect increases the visual beauty of the interface and makes users more pleasant when operating.
[0129] S515. Apply horizontal displacement and adjust the x coordinate of the view according to the scroll progress value to achieve a sliding effect.
[0130] In the embodiment of this step, the x coordinate of each subview (full-page desktop view) is dynamically adjusted according to the user's scrolling progress to achieve a sliding effect of different icons in the horizontal direction.
[0131] For example, when the user swipes to the left, the icons on the right side of the screen will slide out smoothly, and sliding to the left will reveal hidden icons. This effect can make users pay attention to more applications and increase their desire to explore.
[0132] In this step, horizontal displacement can make desktop operations more dynamic and enhance the interactive experience; and by sliding, it can ensure the user's recognition of certain icons and guide the user to pay attention or click during the transformation process.
[0133] As can be seen from the above, by gradually splitting and explaining these steps in detail, the present invention can see that each link plays an important role in improving the user experience of the mobile desktop. Through dynamic traversal, calculation, rotation, transparency change and horizontal displacement, a vivid and user-friendly environment can be created, allowing each user to feel higher interactivity and fun during operation. This design not only attracts users' attention, but also improves their participation in the application and their satisfaction with use.
[0134] The present invention is further described in detail below through specific application examples:
[0135] The specific implementation logic of this specific embodiment is as follows: S11. Slide the page with your finger, then enter S12. The page sliding process traverses the offset progress value of each subview (full-page desktop view) and the center point of the screen, and then enters S13. After sliding the page for each subview (i.e., the next full-page desktop view of the page turning transformation) according to the offset progress value, the view itself (current view) is rotated in angle and transparency. Then enter step S4. Finally, the sliding page special effect is achieved by sliding the page.
[0136] In a specific embodiment of the present invention, the calculation of the offset progress between the finger sliding and the center point of the screen in the X-axis direction is specifically implemented by the following steps:
[0137] S21 calculates half screen size: half screen size halfScreenSize is half of the screen width and is used to determine the center position of the view in subsequent calculations.
[0138] S22 calculates the offset: The offset (delta) is the distance between the center of the current screen and the center of the scrolling page. Here, getScrollForPage(page) is used to obtain the scrolling position of the scrolling page, and half the screen size is added to estimate the center position of the page.
[0139] S23 determines the adjacent page: determines whether the next adjacent page of the current page scrolls forward or backward according to the positive or negative value of the offset (delta) and whether the layout direction is from right to left (mIsRtl).
[0140] S24 calculates the total distance: if the adjacent page index is invalid (i.e., out of page range), the total distance is assumed to be the current page width plus panelCount times the page spacing (here panelCount may represent the number of sub-panels contained in each page or some kind of grouping method, but without more context, the specific meaning is unclear).
[0141] If the adjacent page index is valid, the distance required to scroll from the current page to the adjacent page is calculated.
[0142] S25 calculates scroll progress: The scroll progress value (scrollProgress) is calculated by dividing delta by the total distance (totalDistance). This value will be limited to between -MAX_SCROLL_PROGRESS and MAX_SCROLL_PROGRESS to ensure that the progress value does not exceed the expected range.
[0143] Then, after obtaining the offset progress value of each page through the scroll progress value (scrollProgress value) calculated by the above steps, the progress value change between 0 and 1 is used to control the rotation and horizontal displacement of the view, as shown below: Figure 2 As shown;
[0144] like Figure 2 As shown, the desktop page turning sliding processing method based on the smart terminal described in this specific application embodiment includes the following steps:
[0145] Step S31: Figure 2 As shown in the upper left corner, there are three subviews: the desktop view of page 0 (X coordinate: star: 0, end: 1080), the desktop view of page 1 (X coordinate: star: 1080, end: 2160), and the desktop view of page 2 (X coordinate: star: 2160, end: 3240); the center point of the screen is: 540, and the calculation method is: getScrollX()+getMeasuredWidth() / 2. When the user slides his finger, the offset of all pages from the center point of the screen can be obtained and converted into a change in a scroll progress value (scrollProgress), and then enter step S32;
[0146] view.setRotationY(offset*120.of); sets the rotation change between the screens (page 0 desktop view, page 1 desktop view, page 2 desktop view) by changing the offset value.
[0147] Step S32: At this time, the user terminal obtains a progress value change of the horizontal sliding, traverses all pages and passes the scroll progress value (scrollProgress) to the corresponding subview involved in page turning to perform Y-axis rotation and displacement; then enters step S33;
[0148] Step S33: Figure 2As shown in the lower left corner, there are three subviews: the 0th page desktop view (X coordinate: star: 0, end: 1080), the 1st page desktop view (X coordinate: star: 1080, end: 2160), and the 2nd page desktop view (X coordinate: star: 2160, end: 3240); the center point of the screen is: 1620, and the calculation method is: getScrollX()+getMeasuredWidth() / 2; that is, 1080+(2160-1080) / 2=1620.
[0149] That is, in an embodiment of the present invention, how to accurately calculate the offset progress value during the page sliding process is the basis for achieving smooth sliding special effects, which is specifically carried out through the following steps: S1. Calculate the half screen width (halfScreenSize): used to determine the reference point of the center position of the view; S2. Calculate the offset (delta): obtain the page scrolling position through getScrollForPage(page), and add the half screen width to estimate the distance between the center of the page and the center of the screen; S3. Determine the adjacent page: determine the sliding direction according to the positive and negative values of delta and the layout direction (whether it is RTL); S4. Calculate the total distance (totalDistance): if the adjacent page is valid, calculate the distance from the current page to the adjacent page; if invalid, assume that it is the current page width plus the panelCount times of the page spacing; 5. Calculate the scroll progress value (scrollProgress): divide the offset delta by the total distance totalDistance, and limit it to between -MAX_SCROLL_PROGRESS and MAX_SCROLL_PROGRESS (from the maximum scroll progress to the maximum scroll progress).
[0150] Assume that the screen width is 1080 pixels, the center of the current page is at 540 pixels, and the user slides 100 pixels to the left: corresponding to S1, calculate the half width of the screen (halfScreenSize), halfScreenSize = 1080 / 2 = 540 pixels; corresponding to S2. Calculate the offset (delta): delta = 100 pixels (positive to the left); S3. Determine that the next page is the right page; S4. Calculate the total distance (totalDistance): totalDistance = 1080 pixels (assuming that the page width is equal to the screen width); S5. Calculate the scroll progress value (scrollProgress): scrollProgress = 100 / 1080≈0.093 (9.3% sliding progress).
[0151] As can be seen from the above, the present invention realizes fine control of the sliding process through precise progress calculation, making the special effects presentation smoother and more natural; and the present invention takes into account different page sizes and layout directions, enhances the universality of special effects, and avoids excessive calculation and optimizes performance by limiting the range of progress values.
[0152] Furthermore, regarding the dynamic view transformation in the present invention, based on the calculated scroll progress value (scrollProgress value), a rotation and horizontal displacement effect is applied to each subview in the page, including the following steps.
[0153] S41. Traverse each subview in the page; S42. Calculate the specific transformation parameters of the view according to the position of the subview in the page and the scroll progress value scrollProgress; S43. Apply the rotation effect: determine the rotation angle according to the progress value, which may be a rotation around the x-axis, y-axis or z-axis;
[0154] S44. Apply transparency changes: adjust the alpha value of the view according to the progress value to achieve a fade-in and fade-out effect;
[0155] S45. Apply horizontal displacement: adjust the x coordinate of the view according to the progress value to achieve a sliding effect.
[0156] For example, assuming the scroll progress value scrollProgress is 0.5 (50% sliding progress): corresponding to S41. Rotation effect: the view may rotate 45 degrees (assuming the maximum rotation angle is 90 degrees); corresponding to S42. Transparency: the alpha value of the view can be set to 0.5, rendering it semi-transparent. Corresponding to S43. Horizontal displacement: the view may move 25% of the screen width to the left.
[0157] The present invention creates a three-dimensional and dynamic page-turning effect through a combination of rotation and displacement. The gradual change of transparency ensures visual continuity when switching pages, reducing the sense of abruptness. The dynamic transformation intuitively reflects the user's sliding operation, enhancing the instant feedback of the interaction. And by adjusting various parameters, a variety of sliding special effects of different styles can be achieved to meet the visual requirements of different applications.
[0158] Exemplary Devices
[0159] like Figure 3 As shown, an embodiment of the present invention provides a desktop page turning and sliding processing device based on a smart terminal, the device comprising:
[0160] The presetting module 310 is used to pre-set the sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal to be a sliding operation of sliding the finger to the left or to the right on the desktop;
[0161] The sliding action detection module 320 is used to detect the sliding action specified by the user's finger in real time when the smart terminal is in the desktop state;
[0162] The page turning control module 330 is used to control the desktop to turn pages according to the sliding operation specified by the user's finger according to the detection;
[0163] The offset progress value calculation module 340 is used to traverse each subview during the desktop page sliding process and calculate the offset progress value of each subview and the center point of the screen;
[0164] The page turning and sliding control module 350 is used to control the corresponding sub-view to rotate at a corresponding angle according to the offset progress value, and control the previous view of the corresponding sub-view to produce a corresponding angle rotation and transparency rotation change while rotating and sliding each sub-view, so as to realize the sliding effect generated by sliding the page, as described above.
[0165] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 4 As shown. The intelligent terminal includes a processor, a memory, a network interface, a display screen, and a database connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a desktop page turning and sliding processing method based on the intelligent terminal is implemented. The database of the intelligent terminal is used to store a desktop page turning and sliding processing program based on the intelligent terminal.
[0166] Those skilled in the art will understand that Figure 4 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] In one embodiment, a smart terminal is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:
[0168] When the smart terminal is in desktop state, the sliding operation specified by the user's finger is detected in real time;
[0169] According to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding;
[0170] During the sliding of the desktop page, traverse each subview and calculate the offset progress value of each subview from the center point of the screen;
[0171] According to the offset progress value, the corresponding subview is controlled to rotate at a corresponding angle, and while rotating the slide page of each subview, the previous view of the corresponding subview is controlled to rotate at a corresponding angle and change in transparency, so as to realize the sliding effect generated by sliding the page, as described above.
[0172] Wherein, when the smart terminal is in the desktop state, the step of detecting the sliding operation specified by the user's finger in real time includes:
[0173] The sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal is preset as a sliding operation of sliding the finger to the left or to the right on the desktop.
[0174] Wherein, when the intelligent terminal is in the desktop state, the step of detecting the sliding operation specified by the user's finger in real time includes:
[0175] When the smart terminal is in the desktop state, it detects in real time whether the user's finger slides left or right on the desktop;
[0176] When it is detected that the user's finger has a sliding operation of sliding to the left or sliding to the right on the desktop, it is determined that the sliding operation specified by the user's finger is detected.
[0177] Wherein, according to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding;
[0178] According to the detected sliding operation of the user's finger sliding to the left on the desktop, the desktop is controlled to slide to the left to turn the page following the sliding operation of the finger sliding to the left;
[0179] Or, according to the detected sliding operation of the user's finger sliding to the right on the desktop, the desktop is controlled to slide to the right to turn the page following the sliding operation of the finger sliding to the right.
[0180] The step of traversing each subview and calculating the offset progress value of each subview from the center point of the screen during the sliding of the desktop page includes:
[0181] During the desktop page sliding process, traverse each subview;
[0182] Calculate the half width (halfScreenSize) of the smart terminal desktop screen to determine the center position reference point of the view;
[0183] Get the scroll position of the current page being flipped, add half the screen width, estimate the distance between the center of the page and the center of the screen, and get the offset progress value of each subview from the center of the screen, that is, the offset.
[0184] The step of controlling the corresponding subview to rotate at a corresponding angle according to the offset progress value, and controlling the previous view of the corresponding subview to rotate at a corresponding angle and change in transparency while rotating the slide page of each subview, to realize the slide page special effect generated by sliding the page includes:
[0185] According to the positive or negative value of the offset and whether the layout direction is from right to left, determine whether the sliding direction of the adjacent page is forward or backward;
[0186] Calculate the total distance: If the adjacent page index is invalid, that is, it exceeds the page range, the total distance is the current page width plus the panelCount times of the page spacing, where panelCount represents the number of sub-panels contained in each page or a certain grouping method; if the adjacent page index is valid, the distance required to scroll from the current page to the adjacent page is calculated as the total distance;
[0187] The scroll progress value is obtained by dividing the offset by the total distance.
[0188] The step of controlling the corresponding subview to rotate at a corresponding angle according to the offset progress value, and controlling the previous view of the corresponding subview to rotate at a corresponding angle and change in transparency while rotating the slide page of each subview, and realizing the slide page special effect generated by sliding the page also includes:
[0189] Traverse each subview in the page;
[0190] Calculate the specific transformation parameters of the view according to the position of the subview in the page and the scroll progress value;
[0191] Apply a rotation effect, determine the rotation angle based on the scroll progress value, and rotate around the x-axis, y-axis, or z-axis;
[0192] Apply transparency changes and adjust the transparency value of the view according to the scroll progress value to achieve a fade-in and fade-out effect;
[0193] Apply horizontal displacement and adjust the x coordinate of the view according to the scroll progress value to achieve the sliding effect, as described above.
[0194] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0195] In summary, the present invention provides a desktop page turning and sliding processing method, device, smart terminal and storage medium based on smart terminal, which adopts: detecting the sliding operation of user's finger; in the process of page sliding, traversing each subview, calculating its offset progress value with the center point of the screen; applying corresponding angle rotation and transparency change to each subview according to the offset progress value; finally realizing the sliding page special effect generated by sliding the page. The present invention adds a new function to the smart terminal: it has a desktop page turning and sliding function; by monitoring the sliding operation of the user's finger, calculating the offset progress value of the page with the center point of the screen, and applying angle rotation and transparency change to each subview based on this, so as to realize a smooth and dynamic sliding page special effect.
Claims
1. A desktop page turning sliding processing method based on an intelligent terminal, characterized in that: include: When the smart terminal is in desktop state, the sliding operation specified by the user's finger is detected in real time; According to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding; During the sliding of the desktop page, traverse each subview and calculate the offset progress value of each subview from the center point of the screen; According to the offset progress value, the corresponding subview is controlled to rotate at a corresponding angle, and while rotating the slide page of each subview, the previous view of the corresponding subview is controlled to rotate at a corresponding angle and change in transparency, so as to realize the sliding effect generated by sliding the page.
2. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 1, characterized in that: When the smart terminal is in the desktop state, the step of detecting the sliding operation specified by the user's finger in real time includes: The sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal is preset as a sliding operation of sliding the finger to the left or to the right on the desktop.
3. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 2, characterized in that: When the smart terminal is in the desktop state, the step of detecting the sliding operation specified by the user's finger in real time includes: When the smart terminal is in the desktop state, it detects in real time whether the user's finger slides left or right on the desktop; When it is detected that the user's finger has a sliding operation of sliding to the left or sliding to the right on the desktop, it is determined that the sliding operation specified by the user's finger is detected.
4. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 3 is characterized in that: According to the detected sliding operation specified by the user's finger, the desktop is controlled to slide to turn pages following the finger sliding; According to the detected sliding operation of the user's finger sliding to the left on the desktop, the desktop is controlled to slide to the left to turn the page following the sliding operation of the finger sliding to the left; Or, according to the detected sliding operation of the user's finger sliding to the right on the desktop, the desktop is controlled to slide to the right to turn the page following the sliding operation of the finger sliding to the right.
5. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 1, characterized in that: The step of traversing each subview and calculating the offset progress value of each subview from the center point of the screen during the desktop page sliding process includes: During the desktop page sliding process, traverse each subview; Calculate the half width (halfScreenSize) of the smart terminal desktop screen to determine the center position reference point of the view; Get the scroll position of the current page being flipped, add half the screen width, estimate the distance between the center of the page and the center of the screen, and get the offset progress value of each subview from the center of the screen, that is, the offset.
6. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 5, characterized in that: The step of controlling the corresponding subview to rotate at a corresponding angle according to the offset progress value, and controlling the previous view of the corresponding subview to rotate at a corresponding angle and change in transparency while rotating the slide page of each subview, to realize the slide page special effect generated by sliding the page includes: According to the positive or negative value of the offset and whether the layout direction is from right to left, determine whether the sliding direction of the adjacent page is forward or backward; Calculate the total distance: If the adjacent page index is invalid, that is, it exceeds the page range, the total distance is the current page width plus the panelCount times of the page spacing, where panelCount represents the number of sub-panels contained in each page or a certain grouping method; if the adjacent page index is valid, the distance required to scroll from the current page to the adjacent page is calculated as the total distance; The scroll progress value is obtained by dividing the offset by the total distance.
7. The method for processing desktop page turning and sliding based on an intelligent terminal according to claim 6, characterized in that: The step of controlling the corresponding subview to rotate at a corresponding angle according to the offset progress value, and controlling the previous view of the corresponding subview to rotate at a corresponding angle and change in transparency while rotating the slide page of each subview, and realizing the slide page special effect generated by sliding the page also includes: Traverse each subview in the page; Calculate the specific transformation parameters of the view according to the position of the subview in the page and the scroll progress value; Apply a rotation effect, determine the rotation angle based on the scroll progress value, and rotate around the x-axis, y-axis, or z-axis; Apply transparency changes and adjust the transparency value of the view according to the scroll progress value to achieve a fade-in and fade-out effect; Apply horizontal displacement and adjust the x coordinate of the view according to the scroll progress value to achieve a sliding effect.
8. A desktop page turning and sliding processing device based on an intelligent terminal, characterized in that: The device comprises: A presetting module, used for presetting the sliding operation specified by the user's finger for controlling the page turning and sliding of the desktop of the intelligent terminal to be a sliding operation of sliding the finger to the left or to the right on the desktop; A sliding action detection module is used to detect the sliding action specified by the user's finger in real time when the smart terminal is in the desktop state; A page turning control module, used to control the desktop to turn pages according to the sliding operation specified by the user's finger according to the detection; The offset progress value calculation module is used to traverse each subview during the desktop page sliding process and calculate the offset progress value of each subview and the center point of the screen; The page turning and sliding control module is used to control the corresponding sub-view to rotate at a corresponding angle according to the offset progress value, and control the corresponding sub-view's previous view to rotate at a corresponding angle and change in transparency while rotating each sub-view, so as to achieve the sliding effect generated by sliding the page.
9. An intelligent terminal, characterized in that: The device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include being used to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in any one of claims 1 to 7.