Image display method and device, equipment, medium and program product

By calculating and adjusting the acceleration in the image sliding display, ensuring that the target image is aligned with the edge of the target page when it stops, the problem that the acceleration model in traditional technology cannot adapt to device and user differences is solved, and more accurate and smooth image sliding control is achieved.

CN119902681APending Publication Date: 2025-04-29ROX MOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411970645.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Traditional image sliding display technology is based on a fixed acceleration model and cannot adapt to differences between different devices and users, resulting in the image being unable to accurately align with the edges of the target page when it is stopped, affecting user experience and satisfaction.

Method used

By acquiring the initial sliding speed and sliding direction information of the target image, the total sliding distance under the first acceleration is calculated. If the distance is less than the preset sliding distance threshold, the second acceleration is calculated so that the target image is decelerated from the initial sliding speed to stop according to the second acceleration, and the total sliding distance is equal to the total sliding distance threshold.

Benefits of technology

It solves the problem of edge misalignment caused by insufficient sliding distance at the default acceleration, while ensuring the smoothness of the sliding display, user's visual experience and operation satisfaction, and achieving more accurate and smoother image sliding control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902681A_ABST
    Figure CN119902681A_ABST
Patent Text Reader

Abstract

The invention discloses an image display method and device, equipment, a medium and a program product. The method comprises the steps of obtaining information of an initial sliding speed of a target image and information of a sliding direction of the target image in a sliding display request in response to the sliding display request of the target image; calculating information of a first sliding total distance corresponding to deceleration to stop of the target image from the initial sliding speed according to a preset first acceleration; under the condition that the first sliding total distance is smaller than a preset sliding total distance threshold value, a second acceleration is calculated; and based on the second acceleration, controlling the target image to slide and display in the target page along the sliding direction. According to the image sliding control method and device, the problem of edge misalignment caused by insufficient sliding distance under the default first acceleration can be solved, meanwhile, the smoothness of sliding display and the visual experience and operation satisfaction of a user are guaranteed, and more accurate and smoother image sliding control is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular, relates to an image display method, device, equipment, medium and program product. Background Art

[0002] In current digital devices (such as smart phones, tablet computers, e-book readers, etc.), sliding display of images is a common user interface interaction method.

[0003] However, traditional image sliding display technology often controls image sliding based on a fixed acceleration model. This simple control method cannot adapt to the differences of all devices and users. Due to differences in screen size, resolution, and user sliding operations, the default acceleration often cannot ensure that the image can be accurately aligned with the edge of the target page when it stops. Especially when the sliding distance is short, part of the image may not be fully displayed when it stops, which not only destroys the user's visual experience, but also reduces the user's satisfaction with the device operation.

[0004] Therefore, the existing fixed acceleration model cannot adapt to the differences between devices and users, resulting in the problem of image edge misalignment, which affects user experience and satisfaction. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, medium and program product for displaying an image, which can solve the problem of edge misalignment caused by insufficient sliding distance under the default first acceleration, while ensuring the smoothness of the sliding display and the user's visual experience and operational satisfaction, and achieving more accurate and smoother image sliding control.

[0006] In a first aspect, an embodiment of the present application provides a method for displaying an image, comprising:

[0007] In response to a sliding display request of a target image, acquiring information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request;

[0008] Calculate information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to stopping according to a preset first acceleration;

[0009] When the first total sliding distance is less than a preset total sliding distance threshold, a second acceleration is calculated, wherein the total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page;

[0010] Based on the second acceleration, the target image is controlled to slide and display in the target page along the sliding direction.

[0011] In a possible embodiment of the first aspect, before obtaining, in response to a sliding display request for a target image, information about an initial sliding speed of the target image and information about a sliding direction of the target image in the sliding display request, the method further includes:

[0012] In response to a sliding operation of the touch element on the target page, obtaining information about the sliding speed of the touch element and information about the sliding direction of the touch element;

[0013] Determine the sliding speed of the touch element as the initial sliding speed of the target image; determine the sliding direction of the touch element as the sliding direction of the target image;

[0014] A slide display request for the target image is generated based on the information of the initial slide speed of the target image and the information of the slide direction of the target image.

[0015] In a possible embodiment of the first aspect, calculating information of a first total sliding distance corresponding to a target image decelerating from an initial sliding speed to stopping according to a preset first acceleration includes:

[0016] The square of the initial sliding velocity is divided by twice the first acceleration to obtain the first total sliding distance.

[0017] In a possible embodiment of the first aspect, when the first total sliding distance is less than a preset total sliding distance threshold, before calculating the second acceleration, the method further includes:

[0018] Acquire information about the initial position of a first edge of a target image and information about the initial position of a second edge of the target image, and acquire information about the position of a first edge of a target page and information about the position of a second edge of the target page;

[0019] Calculate the distance between the initial position of the first edge of the target image and the first edge of the target page to obtain a first total sliding distance threshold; calculate the distance between the initial position of the second edge of the target image and the second edge of the target page to obtain a second total sliding distance threshold;

[0020] When the first sliding total distance is less than a preset sliding total distance threshold, calculating the second acceleration includes:

[0021] When the sliding direction is the first sliding direction and the first total sliding distance is less than the second total sliding distance threshold, calculating the second acceleration;

[0022] When the sliding direction is the second sliding direction and the first total sliding distance is less than the first total sliding distance threshold, a second acceleration is calculated.

[0023] In a possible embodiment of the first aspect, when the first total sliding distance is less than a preset total sliding distance threshold, calculating the second acceleration includes:

[0024] When the first total sliding distance is less than a preset total sliding distance threshold, the square of the initial sliding speed is divided by twice the total sliding distance threshold to obtain the second acceleration.

[0025] In a possible embodiment of the first aspect, based on the second acceleration, controlling the target image to slide and display in the target page along the sliding direction includes:

[0026] Calculate the total time it takes for the target image to decelerate from the initial sliding speed to stop;

[0027] Within the total duration, multiple time points are determined according to preset time intervals;

[0028] Calculate the sliding distance corresponding to the time point;

[0029] St=(2Vo-a×t)×t / 2

[0030] Wherein, Vo is the initial sliding velocity, a is the second acceleration, t is the time point, and St is the sliding distance corresponding to the time point t;

[0031] At the target time point, the target image is slid and displayed in the target page according to the sliding direction.

[0032] In a possible embodiment of the first aspect, the present invention further includes:

[0033] When the first total sliding distance is equal to a preset total sliding distance threshold, the target image is controlled to slide and display in the target page along the sliding direction based on the first acceleration.

[0034] Based on the same inventive concept, in a second aspect, an embodiment of the present application further provides an image display device, comprising:

[0035] an acquisition module, configured to, in response to a sliding display request of a target image, acquire information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request;

[0036] A calculation module, used to calculate information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to stopping according to a preset first acceleration;

[0037] The calculation module is further configured to calculate a second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, wherein the total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page;

[0038] The control module is used to control the target image to slide and display in the target page along the sliding direction based on the second acceleration.

[0039] Based on the same inventive concept, in the third aspect, an embodiment of the present application also provides an image display device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the first aspect, or the image display method in any embodiment of the first aspect.

[0040] Based on the same inventive concept, in the fourth aspect, an embodiment of the present application further provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for displaying an image in the first aspect or any embodiment of the first aspect is implemented.

[0041] Based on the same inventive concept, in the fifth aspect, an embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the device, the device can execute the image display method in the first aspect or any embodiment of the first aspect.

[0042] The image display method, device, equipment, medium and program product of the embodiment of the present application, when the user requests the target image to be displayed by sliding, the method first captures the information of the initial speed and sliding direction of the target image in the request, and then calculates the information of the total sliding distance corresponding to the target image decelerating from the initial speed to the stop according to the default first acceleration. If the total sliding distance is less than the preset total sliding distance threshold (the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page), it means that part of the target image is not displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved according to the default first acceleration. Then, the preset total sliding distance threshold can be used as the new total sliding distance of the target image, so as to calculate the second acceleration, and the total sliding distance corresponding to the subsequent target image decelerating from the initial sliding speed to the stop according to the second acceleration is the total sliding distance threshold. Then, based on the second acceleration, the target image can be controlled to slide and display in the target page according to the sliding direction input by the user. In the embodiment of the present application, when the edge alignment cannot be ensured by moving the target image according to the default first acceleration, the preset total sliding distance threshold is used as the new total sliding distance, and the appropriate second acceleration is recalculated. This can make the edge difference between the target image and the target page after stopping be 0, thereby ensuring that the target image is aligned with the edge of the target page when stopping, effectively solving the edge misalignment problem caused by insufficient sliding distance under the default first acceleration, while ensuring the smoothness of the sliding display and the user's visual experience and operation satisfaction, and achieving more precise and smoother image sliding control. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Other features, objects and advantages of the present application will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings, in which the same or similar reference numerals represent the same or similar features and the accompanying drawings are not drawn to scale.

[0044] Figure 1 It is a flow chart of a method for displaying an image provided in an embodiment of the present application;

[0045] Figure 2 It is another flow chart of the method for displaying an image provided in an embodiment of the present application;

[0046] Figure 3 is another flow chart of the method for displaying an image provided in an embodiment of the present application;

[0047] Figure 4 It is another flow chart of the method for displaying an image provided in an embodiment of the present application;

[0048] Figure 5 It is another flow chart of the method for displaying an image provided in an embodiment of the present application;

[0049] Figure 6 It is another flowchart of the method for displaying an image provided in an embodiment of the present application;

[0050] Figure 7 It is another flowchart of the method for displaying an image provided in an embodiment of the present application;

[0051] Figure 8 It is a flow chart of when a target image starts to slide in the image display method provided in an embodiment of the present application;

[0052] Fig. 9 It is a flow chart of a target image sliding process in the image display method provided in an embodiment of the present application;

[0053] Fig.10 is a structural schematic diagram of an image display device provided in an embodiment of the present application;

[0054] Fig.11 It is a structural schematic diagram of an image display device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0056] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0057] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0058] It is obvious to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit or scope of the present application. Therefore, the present application is intended to cover modifications and changes of the present application that fall within the scope of the corresponding claims (technical solutions for protection) and their equivalents. It should be noted that the implementation methods provided in the embodiments of the present application can be combined with each other without contradiction.

[0059] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:

[0060] In current digital devices (such as smart phones, tablet computers, e-book readers, etc.), sliding display of images is a common user interface interaction method.

[0061] However, related image sliding display technologies often control image sliding based on a fixed acceleration model. This simple control method cannot adapt to the differences between all devices and users. Due to differences in screen size, resolution, and user sliding operations, the default acceleration often cannot ensure that the image can be accurately aligned with the edge of the target page when it stops. Especially in the case of a short sliding distance, part of the image may not be fully displayed when it stops, which not only destroys the user's visual experience, but also reduces the user's satisfaction with the device operation. Therefore, the fixed acceleration model in the related art cannot adapt to the differences between devices and users, resulting in the problem of image edge misalignment, which affects the user experience and satisfaction.

[0062] For example, in related image display technologies, when a user requests a target image to slide on the screen, the system usually controls the image's sliding speed and distance based on a preset default acceleration. However, this simple control method has a significant problem: due to differences in screen size, resolution, and user sliding operations of different devices, the default acceleration often cannot guarantee that the image will be perfectly aligned with the edge of the target page when it stops. Especially when the sliding distance is short, the target image moved at the default acceleration may still have some content that is not fully displayed when it stops, resulting in misaligned edges, which not only affects the user's visual experience, but may also reduce the user's satisfaction with the device operation.

[0063] Based on this, the embodiments of the present application provide an image display method, device, equipment, medium and program product, which can solve the problem of edge misalignment caused by insufficient sliding distance under the default first acceleration, while ensuring the smoothness of the sliding display and the user's visual experience and operational satisfaction, and achieving more precise and smoother image sliding control.

[0064] The image display method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0065] Figure 1 is a flow chart of a method for displaying an image provided by an embodiment of the present application, such as Figure 1 As shown, the method may include steps S110 to S140.

[0066] S110 , in response to a sliding display request of a target image, obtaining information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request.

[0067] Specifically, when a user requests a target image to be displayed in a sliding manner, information about the initial speed and sliding direction of the target image in the request may be captured first.

[0068] S120, calculating information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to stopping according to a preset first acceleration.

[0069] The first acceleration is a default preset acceleration.

[0070] The first total sliding distance is a distance from a sliding start position to a sliding stop position when assuming that the target image slides at a first acceleration.

[0071] Specifically, after capturing the initial speed and sliding direction information of the target image in the request, the total sliding distance corresponding to the target image decelerating from the initial speed to stopping according to the default first acceleration can be calculated. The total sliding distance can be called the first total sliding distance.

[0072] S130, when the first total sliding distance is less than a preset total sliding distance threshold, calculate a second acceleration, wherein a total sliding distance corresponding to the target image decelerating from an initial sliding speed to a stop according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is a distance value between an initial edge position of the target image and an edge position of the target page.

[0073] The preset total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page.

[0074] For example, before the target image slides, the left edge position and the right edge position of the target image are known, and the left edge position and the right edge position of the target page are also known. Therefore, the total distance that the target image needs to move when it moves to the left and moves until the left edge of the target image is aligned with the left edge of the target page can be calculated. This total distance can be used as the total sliding distance threshold when the target image slides to the left.

[0075] For another example, before the target image slides, the total distance that the target image needs to move when it moves to the right and moves until the right edge of the target image is aligned with the right edge of the target page can be calculated. This total distance can be used as the total sliding distance threshold when the target image slides to the right.

[0076] Specifically, if the distance from the start sliding position to the stop sliding position (the first total sliding distance) is less than the preset total sliding distance threshold when the target image slides at the first acceleration, it means that part of the target image is not displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved at the default first acceleration. At this time, the preset total sliding distance threshold can be used as the new total sliding distance of the target image, so as to calculate the second acceleration, and the total sliding distance corresponding to the subsequent target image decelerating from the initial sliding speed to the stop according to the second acceleration is the total sliding distance threshold.

[0077] S140: Based on the second acceleration, control the target image to slide and display in the target page along the sliding direction.

[0078] Specifically, based on the second acceleration, the target image may be controlled to slide and display in the target page according to the sliding direction input by the user.

[0079] The image display method provided by the embodiment of the present application first captures the information of the initial speed and sliding direction of the target image in the request when the user requests the sliding display of the target image, and then calculates the information of the total sliding distance corresponding to the deceleration of the target image from the initial speed to the stop according to the default first acceleration. If the total sliding distance is less than the preset total sliding distance threshold (the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page), it means that part of the target image is not displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved according to the default first acceleration. Then, the preset total sliding distance threshold can be used as the new total sliding distance of the target image, so as to calculate the second acceleration, and the total sliding distance corresponding to the subsequent target image decelerating from the initial sliding speed to the stop according to the second acceleration is the total sliding distance threshold. Then, based on the second acceleration, the target image can be controlled to slide and display in the target page according to the sliding direction input by the user. In the embodiment of the present application, when the edge alignment cannot be ensured by moving the target image according to the default first acceleration, the preset total sliding distance threshold is used as the new total sliding distance, and the appropriate second acceleration is recalculated. This can make the edge difference between the target image and the target page after stopping be 0, thereby ensuring that the target image is aligned with the edge of the target page when stopping, effectively solving the edge misalignment problem caused by insufficient sliding distance under the default first acceleration, while ensuring the smoothness of the sliding display and the user's visual experience and operation satisfaction, and achieving more precise and smoother image sliding control.

[0080] Figure 2 This is another flowchart of the image display method provided in the embodiment of the present application.

[0081] In some embodiments, Figure 2 As shown, before in step S110 responding to the sliding display request of the target image and acquiring the information of the initial sliding speed of the target image and the information of the sliding direction of the target image in the sliding display request, the method further includes steps S151 to S153.

[0082] S151, in response to a sliding operation of a touch element on a target page, obtaining information on a sliding speed of the touch element and information on a sliding direction of the touch element.

[0083] The touch element is an entity that performs a sliding operation, such as a finger, a stylus, etc.

[0084] Specifically, when the touch element slides on the target page, the sliding speed and the sliding direction of the touch element may be calculated after the touch element leaves the page.

[0085] S152, determining the sliding speed of the touch element as the initial sliding speed of the target image; and determining the sliding direction of the touch element as the sliding direction of the target image.

[0086] Specifically, the sliding speed of the touch element may be used as the initial sliding speed of the target image, and the sliding direction of the touch element may be used as the sliding direction of the target image.

[0087] S153: Generate a sliding display request for the target image based on the information of the initial sliding speed of the target image and the information of the sliding direction of the target image.

[0088] Specifically, a sliding display request of the target image may be generated based on information of the initial sliding speed of the target image and information of the sliding direction of the target image, so the sliding display request includes information of the initial sliding speed of the target image and information of the sliding direction of the target image.

[0089] The embodiment of the present application can instantly respond to the sliding operation of a touch element (such as a finger or a stylus) on a target page. By accurately acquiring the sliding speed and direction of the touch element and using it as the initial sliding speed and sliding direction of the target image, a more intuitive and smooth image sliding control effect is achieved, thereby enhancing the user experience.

[0090] Figure 3 This is another flowchart of the image display method provided in the embodiment of the present application.

[0091] In some embodiments, Figure 3 As shown, step S120 calculates information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to stopping according to a preset first acceleration, and may include step S121.

[0092] S121, dividing the square of the initial sliding velocity by twice the first acceleration to obtain a first total sliding distance.

[0093] The embodiment of the present application can quickly and accurately calculate the first total sliding distance corresponding to the start and stop of the sliding of the target image based on the initial sliding speed of the target image and the preset first acceleration through mathematical operations (i.e., dividing the square of the initial sliding speed by twice the first acceleration), thereby achieving precise control of the image sliding process.

[0094] Figure 4 This is another flowchart of the image display method provided in the embodiment of the present application.

[0095] In some embodiments, Figure 4As shown, in step S130, when the first total sliding distance is less than a preset total sliding distance threshold, before calculating the second acceleration, the method may further include steps S161 to S162.

[0096] S161, obtaining information about an initial position of a first edge of a target image and information about an initial position of a second edge of the target image, and obtaining information about a first edge position of a target page and information about a second edge position of the target page.

[0097] The position of the target image changes during the sliding display process, and the position of the target page remains fixed.

[0098] Specifically, the information of the initial positions of different edges of the target image and the information of the positions of different edges of the target page can be obtained. For example, the information of the initial position of the left edge of the target image, the information of the initial position of the right edge of the target image, and the information of the fixed position of the left edge of the target page and the fixed position of the right edge of the target page can be obtained.

[0099] S162, calculating the distance between the initial position of the first edge of the target image and the first edge position of the target page to obtain a first total sliding distance threshold; calculating the distance between the initial position of the second edge of the target image and the second edge position of the target page to obtain a second total sliding distance threshold.

[0100] Specifically, by calculating the distance between the initial position of the first edge of the target image and the first edge of the target page, the first total sliding distance threshold can be obtained. For example, by calculating the distance between the initial position of the left edge of the target image and the left edge of the target page, the first total sliding distance threshold can be obtained. At the same time, by calculating the distance between the initial position of the second edge of the target image and the second edge of the target page, the second total sliding distance threshold can be obtained. For example, by calculating the distance between the initial position of the right edge of the target image and the right edge of the target page, the second total sliding distance threshold can be obtained.

[0101] Step S130 calculates the second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, and may include steps S131 to S132.

[0102] S131: When the sliding direction is the first sliding direction and the first total sliding distance is less than a second total sliding distance threshold, calculate a second acceleration.

[0103] S132: When the sliding direction is the second sliding direction and the first total sliding distance is less than the first total sliding distance threshold, calculate a second acceleration.

[0104] Specifically, when the target image slides in different directions, the first total sliding distance may be compared with different total sliding distance thresholds.

[0105] For example, when the target image slides to the left and the first total sliding distance is less than the distance between the initial position of the right edge of the target image and the right edge position of the target page (the second total sliding distance threshold), it means that some content of the target image has not been displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved according to the default first acceleration. Therefore, the preset total sliding distance threshold can be used as the new total sliding distance of the target image to calculate the second acceleration.

[0106] For another example, when the target image slides to the right and the first total sliding distance is less than the distance between the initial position of the left edge of the target image and the left edge of the target page (the first total sliding distance threshold), it means that some content of the target image has not been displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved according to the default first acceleration. Therefore, the preset total sliding distance threshold can be used as the new total sliding distance of the target image to calculate the second acceleration.

[0107] The embodiment of the present application accurately calculates the distance between the edge of the target image and the edge of the target page, sets a total sliding distance threshold, and adjusts the acceleration (i.e., calculates a second acceleration) when the sliding does not reach the corresponding total sliding distance threshold, thereby ensuring that the target image can be more accurately aligned with the edge of the target page during the sliding display process, thereby ensuring the smoothness of the sliding display and the user's visual experience and operational satisfaction.

[0108] Figure 5 This is another flowchart of the image display method provided in the embodiment of the present application.

[0109] In some embodiments, Figure 5 As shown, step S130 calculates the second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, and may include step S131.

[0110] S131 , when the first total sliding distance is less than a preset total sliding distance threshold, divide the square of the initial sliding speed by twice the total sliding distance threshold to obtain a second acceleration.

[0111] The embodiment of the present application determines the second acceleration by dividing the square of the initial sliding speed by twice the total sliding distance threshold when the first total sliding distance does not reach the preset total sliding distance threshold, thereby achieving more precise and accurate sliding control, ensuring that the image can smoothly and accurately reach the target position during the display process, and improving the interactive experience and visual effect of the user interface.

[0112] Figure 6 This is another flowchart of the image display method provided in the embodiment of the present application.

[0113] In some embodiments, Figure 6 As shown, step S140 controls the target image to slide and display in the target page along the sliding direction based on the second acceleration, and may include steps S141 to S144.

[0114] S141, calculating the total time duration corresponding to the target image slowing down from the initial sliding speed to stopping.

[0115] Specifically, before sliding, the total time duration corresponding to the target image slowing down from the initial sliding speed to stopping may be calculated.

[0116] S142, determining multiple time points within the total duration according to preset time intervals.

[0117] Specifically, the total duration may be divided according to preset time intervals to obtain multiple time points t1, t2, t3, ..., tn. The preset time intervals may be set as required, and the present application embodiment does not limit this.

[0118] S143, calculating the sliding distance corresponding to the time point:

[0119] St=(2Vo-a×t)×t / 2

[0120] Wherein, Vo is the initial sliding velocity, a is the second acceleration, t is the time point, and St is the sliding distance corresponding to the time point t.

[0121] Specifically, the sliding distances St1, St2, St3, ..., Stn corresponding to the time points t1, t2, t3, ..., tn respectively can be calculated by the above formula.

[0122] S144, at the target time point, slidingly displaying the target image in the target page according to the sliding direction.

[0123] Specifically, when time point t1 arrives, the target image is slid from the initial position St1 in the sliding direction and displayed; when time point t2 arrives, the target image is slid from the initial position St2 in the sliding direction and displayed,..., when time point tn arrives, the target image is slid from the initial position Stn in the sliding direction and displayed.

[0124] The embodiment of the present application calculates the total time it takes for the target image to decelerate from an initial sliding speed to a stop, determines multiple time points within the time at preset time intervals, and then calculates the sliding distance corresponding to each time point, and finally slides the target image to a specified position for display at the corresponding time point, thereby providing a smoother and more natural image sliding experience and enhancing the interactivity and visual effects of the user interface.

[0125] Figure 7 This is another flowchart of the image display method provided in the embodiment of the present application.

[0126] In some embodiments, Figure 7 As shown, the image display method may further include step S170.

[0127] S170: When the first total sliding distance is equal to a preset total sliding distance threshold, based on the first acceleration, control the target image to slide and display in the target page along the sliding direction.

[0128] Specifically, when the first total sliding distance is equal to the preset total sliding distance threshold, it means that if the target image slides according to the first acceleration, it will stop exactly at the edge of the target page. For example, when the target page stops sliding to the right, the left edge of the target image will be aligned with the left edge of the target page. At this time, the default first acceleration can be used to control the sliding display of the target image. Therefore, it can be determined that the first acceleration is the second acceleration that actually controls the sliding of the target image next.

[0129] In the embodiment of the present application, when the first total sliding distance of the target image reaches a preset total sliding distance threshold, using the default first acceleration can ensure that the target image can accurately stop at the edge of the target page, thereby improving the accuracy of the image sliding display and the user experience.

[0130] In one example, when the first total sliding distance is greater than a preset total sliding distance threshold, the damping rebound processing flow is entered, which effectively avoids the target image from sliding out of the target page when the first total sliding distance exceeds the preset threshold, ensures the stability of the image display and the user's satisfaction with the operation, and provides users with a smoother and more controllable sliding experience.

[0131] In one example, if Figure 8 As shown, Figure 8It is a flow chart of when the target image starts to slide in the image display method provided in the embodiment of the present application. Before sliding, the initial position of the left edge of the target image, the initial position of the right edge of the target image, the position of the left edge of the target page, and the position of the right edge of the target page are all known, so the first total sliding distance threshold can be obtained by calculating the distance between the initial position of the left edge of the target image and the left edge position of the target page. At the same time, the second total sliding distance threshold is obtained by calculating the distance between the initial position of the right edge of the target image and the right edge position of the target page. By knowing the positions of the edges of the target image and the target page in advance, the embodiment of the present application can calculate the two key distance thresholds (the first total sliding distance threshold and the second total sliding distance threshold) when the target image starts to slide, and can more accurately control and manage the sliding behavior of the image, ensuring that the sliding process can be both edge-aligned and maintain smoothness during the sliding process.

[0132] In another example, before the target image slides to the right, by comparing the first total sliding distance with the first total sliding distance threshold, it can be determined whether the left edge of the target image and the left edge of the target page can be aligned when the target image is moved according to the default first acceleration, so as to determine whether the acceleration needs to be recalculated. Fig. 9 FIG. 1 is a flow chart of a target image sliding process in the image display method provided in an embodiment of the present application. Fig. 9 As shown, the target image can be controlled to slide and display in the target page along the sliding direction according to the determined acceleration. By comparing the first total sliding distance with the preset total sliding distance threshold, the embodiment of the present application can accurately determine whether the target image can be aligned with the edge of the target page when sliding under the default acceleration, thereby determining whether the acceleration needs to be adjusted, ensuring that the sliding process can be both edge-aligned and smooth during the sliding process.

[0133] Based on the same inventive concept, the present application also provides an image display device, such as Fig.10 As shown, the device 1000 may include an acquisition module 1010 , a calculation module 1020 and a control module 1030 .

[0134] An acquisition module 1010 is used to acquire information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request in response to a sliding display request of the target image;

[0135] The calculation module 1020 is used to calculate information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to a stop according to a preset first acceleration;

[0136] The calculation module 1020 is further configured to calculate a second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, wherein the total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page;

[0137] The control module 1030 is used to control the target image to slide and display in the target page along the sliding direction based on the second acceleration.

[0138] The image display device provided by the embodiment of the present application will first capture the information of the initial speed and sliding direction of the target image in the request when the user requests the target image to be displayed in a sliding manner, and then calculate the information of the total sliding distance corresponding to the target image decelerating from the initial speed to the stop according to the default first acceleration. If the total sliding distance is less than the preset total sliding distance threshold (the total sliding distance threshold is the distance value between the initial edge position of the target image and the edge position of the target page), it means that part of the target image is not displayed when it stops, that is, the edge alignment cannot be guaranteed when the target image is moved according to the default first acceleration. Then, the preset total sliding distance threshold can be used as the new total sliding distance of the target image, so as to calculate the second acceleration, and the total sliding distance corresponding to the subsequent target image decelerating from the initial sliding speed to the stop according to the second acceleration is the total sliding distance threshold. Then, based on the second acceleration, the target image can be controlled to slide and display in the target page according to the sliding direction input by the user. In the embodiment of the present application, when the edge alignment cannot be ensured by moving the target image according to the default first acceleration, the preset total sliding distance threshold is used as the new total sliding distance, and the appropriate second acceleration is recalculated. This can make the edge difference between the target image and the target page after stopping be 0, thereby ensuring that the target image is aligned with the edge of the target page when stopping, effectively solving the edge misalignment problem caused by insufficient sliding distance under the default first acceleration, while ensuring the smoothness of the sliding display and the user's visual experience and operation satisfaction, and achieving more precise and smoother image sliding control.

[0139] In some embodiments, before the acquisition module is used to respond to the sliding display request of the target image and acquire information about the initial sliding speed of the target image and information about the sliding direction of the target image in the sliding display request, the device further includes a determination module and a generation module:

[0140] The acquisition module is further used to acquire information about the sliding speed of the touch element and information about the sliding direction of the touch element in response to the sliding operation of the touch element on the target page;

[0141] A determination module, used to determine the sliding speed of the touch element as the initial sliding speed of the target image; determine the sliding direction of the touch element as the sliding direction of the target image;

[0142] The generating module is used to generate a sliding display request of the target image based on the information of the initial sliding speed of the target image and the information of the sliding direction of the target image.

[0143] In some embodiments, the calculation module is used to calculate information of a first total sliding distance corresponding to the target image decelerating from an initial sliding speed to stopping according to a preset first acceleration, which can be specifically used for:

[0144] The square of the initial sliding velocity is divided by twice the first acceleration to obtain the first total sliding distance.

[0145] In some embodiments, when the calculation module is used for the first sliding total distance being less than a preset sliding total distance threshold, before calculating the second acceleration, the device further includes:

[0146] The acquisition module is further used to acquire information about the initial position of the first edge of the target image and the initial position of the second edge of the target image, and acquire information about the first edge position of the target page and the second edge position of the target page;

[0147] The calculation module is further used to calculate the distance between the initial position of the first edge of the target image and the first edge position of the target page to obtain a first total sliding distance threshold; calculate the distance between the initial position of the second edge of the target image and the second edge position of the target page to obtain a second total sliding distance threshold;

[0148] The calculation module is used to calculate the second acceleration when the first sliding total distance is less than a preset sliding total distance threshold, and can be specifically used to:

[0149] When the sliding direction is the first sliding direction and the first total sliding distance is less than the second total sliding distance threshold, calculating the second acceleration;

[0150] When the sliding direction is the second sliding direction and the first total sliding distance is less than the first total sliding distance threshold, a second acceleration is calculated.

[0151] In some embodiments, the calculation module is used to calculate the second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, which can be specifically used to:

[0152] When the first total sliding distance is less than a preset total sliding distance threshold, the square of the initial sliding speed is divided by twice the total sliding distance threshold to obtain the second acceleration.

[0153] In some embodiments, the control module is used to control the target image to slide and display in the target page along the sliding direction based on the second acceleration, which can be specifically used for:

[0154] Calculate the total time it takes for the target image to decelerate from the initial sliding speed to stop;

[0155] Within the total duration, multiple time points are determined according to preset time intervals;

[0156] Calculate the sliding distance corresponding to the time point;

[0157] St=(2Vo-a×t)×t / 2

[0158] Wherein, Vo is the initial sliding velocity, a is the second acceleration, t is the time point, and St is the sliding distance corresponding to the time point t;

[0159] At the target time point, the target image is slid and displayed in the target page according to the sliding direction.

[0160] In some embodiments, it also includes:

[0161] The control module is further used to control the target image to slide and display in the target page along the sliding direction based on the first acceleration when the first total sliding distance is equal to a preset total sliding distance threshold.

[0162] Each module in the image display device provided in the embodiment of the present application can realize Figures 1 to 11 The functions of each step of the provided image display method and the ability to achieve corresponding technical effects are not described in detail here for the sake of brevity.

[0163] Fig.11 A schematic diagram of the hardware structure of an image display device provided in an embodiment of the present application is shown.

[0164] The image display device may include a processor 1101 and a memory 1102 storing computer program instructions.

[0165] Specifically, the processor 1101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0166] The memory 1102 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1102 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 1102 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1102 may be inside or outside the display device of the image. In a particular embodiment, the memory 1102 is a non-volatile solid-state memory.

[0167] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0168] The processor 1101 reads and executes the computer program instructions stored in the memory 1102 to implement any one of the image display methods in the above embodiments.

[0169] In one example, the image display device may further include a communication interface 1103 and a bus 1104. Fig.11 As shown, the processor 1101, the memory 1102, and the communication interface 1103 are connected via a bus 1104 and communicate with each other.

[0170] The communication interface 1103 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0171] The bus 1104 includes hardware, software or both, and couples the components of the display device of the image to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (Linear Predictive Coding, LPC) bus, a memory bus, a micro channel architecture (MicroChannel Architecture, MCA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) bus, a video electronics standard association local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 1104 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0172] The device can execute the image display method in the embodiment of the present application based on each unit / component in the image display device, thereby realizing the combination of Figures 1 to 7 Describes how the image is displayed.

[0173] In addition, in combination with the image display method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any image display method in the above embodiment is implemented.

[0174] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of implementing any one of the above-mentioned image display method embodiments.

[0175] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0176] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable Read Only Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0177] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0178] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0179] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for displaying an image, characterized in that: include: In response to a sliding display request of a target image, acquiring information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request; Calculate information of a first total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to a preset first acceleration; When the first total sliding distance is less than a preset total sliding distance threshold, a second acceleration is calculated, wherein a total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is a distance value between an initial edge position of the target image and an edge position of the target page; Based on the second acceleration, the target image is controlled to slide and display in the target page along the sliding direction.

2. The method according to claim 1, characterized in that: Before obtaining, in response to the sliding display request of the target image, information about the initial sliding speed of the target image and information about the sliding direction of the target image in the sliding display request, the method further includes: In response to a sliding operation of a touch element on a target page, acquiring information about a sliding speed of the touch element and information about a sliding direction of the touch element; Determining the sliding speed of the touch element as the initial sliding speed of the target image; determining the sliding direction of the touch element as the sliding direction of the target image; The slide display request of the target image is generated based on the information of the initial slide speed of the target image and the information of the slide direction of the target image.

3. The method according to claim 1, characterized in that The information of calculating a first total sliding distance corresponding to the deceleration of the target image from the initial sliding speed to the stop according to the preset first acceleration includes: The square of the initial sliding velocity is divided by twice the first acceleration to obtain a first total sliding distance.

4. The method according to claim 1, characterized in that: When the first total sliding distance is less than a preset total sliding distance threshold, before calculating the second acceleration, the method further includes: Acquire information about the initial position of a first edge of a target image and information about the initial position of a second edge of the target image, and acquire information about the position of a first edge of a target page and information about the position of a second edge of the target page; Calculate the distance between the initial position of the first edge of the target image and the first edge of the target page to obtain a first total sliding distance threshold; calculate the distance between the initial position of the second edge of the target image and the second edge of the target page to obtain a second total sliding distance threshold; The calculating the second acceleration when the first total sliding distance is less than a preset total sliding distance threshold comprises: When the sliding direction is a first sliding direction and the first total sliding distance is less than a second total sliding distance threshold, calculating a second acceleration; When the sliding direction is the second sliding direction and the first total sliding distance is less than a first total sliding distance threshold, a second acceleration is calculated.

5. The method according to claim 1, characterized in that The calculating the second acceleration when the first total sliding distance is less than a preset total sliding distance threshold comprises: When the first total sliding distance is less than a preset total sliding distance threshold, the square of the initial sliding speed is divided by twice the total sliding distance threshold to obtain a second acceleration.

6. The method according to claim 1, characterized in that The step of controlling the target image to slide and display in the target page according to the sliding direction based on the second acceleration includes: Calculate the total time duration corresponding to the target image slowing down from the initial sliding speed to stopping; Within the total duration, determining multiple time points according to preset time intervals; Calculate the sliding distance corresponding to the time point; St=(2Vo-a×t)×t / 2 Wherein, Vo is the initial sliding velocity, a is the second acceleration, t is the time point, and St is the sliding distance corresponding to the time point t; At the target time point, the target image is slid and displayed in the target page according to the sliding direction.

7. The method according to claim 1, characterized in that Also includes: When the first total sliding distance is equal to a preset total sliding distance threshold, based on the first acceleration, the target image is controlled to slide and display in the target page along the sliding direction.

8. An image display device, characterized in that: include: an acquisition module, configured to, in response to a sliding display request of a target image, acquire information of an initial sliding speed of the target image and information of a sliding direction of the target image in the sliding display request; A calculation module, used for calculating information of a first total sliding distance of the target image corresponding to the deceleration from the initial sliding speed to the stop according to a preset first acceleration; The calculation module is further configured to calculate a second acceleration when the first total sliding distance is less than a preset total sliding distance threshold, wherein a total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping according to the second acceleration is equal to the total sliding distance threshold, and the total sliding distance threshold is a distance value between an initial edge position of the target image and an edge position of the target page; The control module is used to control the target image to slide and display in the target page along the sliding direction based on the second acceleration.

9. An image display device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the image display method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the image display method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of a device, the device is enabled to perform the image display method according to any one of claims 1 to 7.