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

By calculating the total sliding distance of the target image and adjusting the acceleration, the problem of rigid image sliding display in the prior art is solved, and a smoother and more flexible sliding effect is achieved, improving the user experience.

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

Patent Information

Application Number
CN202411969865.9
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

The prior art lacks a smooth braking mechanism when controlling image sliding display, resulting in a stiff sliding effect and reducing user experience and satisfaction.

Method used

By calculating the total distance from the target image to deceleration according to the preset acceleration to stop, and when the distance is too large, the sum of the edge distance and the preset offset distance is determined as the total target sliding distance, and the new acceleration is calculated to achieve a smoother and more flexible image sliding display.

Benefits of technology

When the sliding distance is too large, the image will be avoided to completely slide out of the page, achieving a smoother and more flexible image sliding display effect, improving user experience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902680A_ABST
    Figure CN119902680A_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 and information of a sliding direction of a target image in a sliding display request in response to the sliding display request of the target image; calculating a first 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 total distance is greater than the edge distance, determining the sum of the edge distance and a preset offset distance as a target sliding total distance; calculating a second acceleration based on the target sliding total distance; 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 embodiment of the invention, a smoother and more flexible image sliding display effect can be realized while the image is prevented from completely sliding out of the page when the sliding distance is too large, and the user experience and satisfaction are improved.
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] When controlling the sliding display of an image, the prior art often uses a fixed acceleration value, but when the sliding distance exceeds the page range, the image may slide out of the field of view.

[0003] To address this problem, some existing technologies will adopt an emergency braking method to make the image stop instantly at the edge of the page when the sliding distance is too large, or make the image suddenly stop at a certain position in the target page. This processing method appears to be very stiff, not smooth, natural and flexible enough, and reduces the user experience and satisfaction.

[0004] Therefore, when the sliding distance is too large, the prior art lacks a smooth braking mechanism, resulting in a stiff sliding effect, which reduces 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 prevent the image from completely sliding out of the page when the sliding distance is too large, while achieving a smoother and more flexible image sliding display effect, thereby improving user experience and satisfaction.

[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, obtaining information of an initial sliding speed and a sliding direction of the target image in the sliding display request;

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

[0009] In the case where the first total distance is greater than the edge distance, determining the sum of the edge distance and the preset offset distance as the target total sliding distance, wherein the edge distance is the distance between the initial position of the first edge of the target image and the first edge position of the target page, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page;

[0010] Calculating a second acceleration based on the target total sliding distance;

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

[0012] In a possible embodiment of the first aspect, calculating the second acceleration based on the target total sliding distance includes:

[0013] The second acceleration is obtained by dividing the square of the initial sliding velocity by twice the target sliding distance.

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

[0015] When the first edge of the target image slides along the sliding direction and stops at the Nth first-type preset position, determining the distance between the Nth first-type preset position and the first edge position of the target page as the first distance, wherein the first-type preset position is located in the target page, the distance between the first first-type preset position and the initial position of the first edge of the target image is equal to the target sliding distance, and N is a positive integer;

[0016] When the first distance is greater than the preset shortest distance, the first edge of the target image is controlled to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position, wherein the second type of preset position is located outside the target page, and the distance between the second type of preset position and the first edge position of the target page is a second distance and the second distance is less than the first distance;

[0017] When the second distance is greater than the preset shortest distance, the first edge of the target image is controlled to slide and display along the sliding direction and stop at the N+1th first-category preset position, wherein the distance between the N+1th first-category preset position and the first edge position of the target page is less than the second distance;

[0018] When the first distance or the second distance is less than or equal to the preset shortest distance, the first edge of the target image is controlled to slide and display and stop at the first edge position of the target page.

[0019] In a possible embodiment of the first aspect, when the first distance is greater than the preset shortest distance, controlling the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position includes:

[0020] When the first distance is greater than the preset shortest distance, based on a preset first rebound acceleration, controlling the first edge of the target image to slide in the opposite direction of the sliding direction to the first edge position of the target page;

[0021] Based on the preset second rebound acceleration, the first edge of the target image is controlled to slide from the first edge position of the target page in a direction opposite to the sliding direction with deceleration and stop at a second type of preset position.

[0022] In a possible embodiment of the first aspect, when the second distance is greater than the preset shortest distance, controlling the first edge of the target image to slide along the sliding direction and stop at the N+1th first-type preset position includes:

[0023] When the second distance is greater than the preset shortest distance, based on a preset third rebound acceleration, controlling the first edge of the target image to slide rapidly along the sliding direction to the first edge position of the target page;

[0024] Based on the preset fourth rebound acceleration, the first edge of the target image is controlled to slide at a reduced speed from the first edge position of the target page along the sliding direction and stop at the N+1th first-type preset position.

[0025] In a possible embodiment of the first aspect, when the first distance or the second distance is less than or equal to the preset shortest distance, controlling the first edge of the target image to slide and display and stop at the first edge position of the target page includes:

[0026] When the first distance or the second distance is less than or equal to the preset shortest distance, based on the preset speed, the first edge of the target image is controlled to slide uniformly and stop at the first edge position of the target page.

[0027] In a possible embodiment of the first aspect, when the first edge of the target image slides along the sliding direction and stops at the Nth first-category preset position, before determining that the distance between the Nth first-category preset position and the first edge position of the target page is the first distance, the method further includes:

[0028] When a first edge of the target image slides to a first first-type preset position along the sliding direction, obtaining information on a preset total number of times of crossing the edge;

[0029] Calculate the preset shortest distance based on the total number of times the edge is crossed;

[0030]

[0031] Wherein, dmin is the preset shortest distance, dmax is the preset offset distance, m is the total number of edge crossings, and m is an integer greater than 1.

[0032] In a possible embodiment of the first aspect,

[0033]

[0034] Wherein, d2 is the second distance, and d1 is the first distance.

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

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

[0037] A calculation module, used for calculating a first total distance corresponding to the target image decelerating from an initial sliding speed to a stop according to a preset first acceleration;

[0038] a determination module, configured to determine, when the first total distance is greater than the edge distance, that the sum of the edge distance and the preset offset distance is the target sliding total distance, wherein the edge distance is the distance between the initial position of the first edge of the target image and the position of the first edge of the target page, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page;

[0039] The calculation module is further used to calculate the second acceleration based on the total sliding distance of the target;

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] The image display method, device, equipment, medium and program product of the embodiment of the present application, when receiving a sliding display request of the target image, obtains the information of the initial sliding speed and the sliding direction of the target image in the sliding display request. Then, before controlling the sliding display of the target image, the first total distance of the target image sliding from the initial sliding speed to the stop according to the default first acceleration can be calculated. If the first total distance is greater than the edge distance between the initial position of the first edge of the target image and the first edge position of the target page, it means that the first total distance is too large. At this time, the sum of the edge distance and the preset offset distance can be determined as the target sliding total distance, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page, so as to ensure that the target image will not completely slide out of the page after sliding the target sliding distance. Then, based on the target sliding total distance, a new second acceleration can be calculated. The second acceleration can make the sliding speed change of the image smoother and achieve a natural deceleration effect. Therefore, after calculating the new second acceleration, the target image can be controlled to slide and display in the target page with uniform deceleration along the sliding direction based on the second acceleration. This can prevent the image from completely sliding out of the page when the sliding distance is too large, while achieving a smoother and more flexible image sliding display effect, thereby improving user experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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.

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

[0047] Figure 2 This is a schematic diagram of the image display method provided in the embodiment of the present application before the target image starts to slide;

[0048] Figure 3 It is a schematic diagram of a target image sliding process in the image display method provided in an embodiment of the present application;

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

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

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

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

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

[0054] Fig. 9 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] When controlling the sliding display of an image, related technologies often use a fixed acceleration value, but when the sliding distance exceeds the page range, the image may slide out of the field of view.

[0061] In order to deal with this problem, some related technologies will use emergency braking to make the image stop instantly at the edge of the page when the sliding distance is too large, or make the image stop suddenly at a certain position in the target page. This processing method is very rigid, not smooth, natural and flexible, and reduces the user experience and satisfaction. Therefore, when the sliding distance is too large, the related technology lacks a smooth braking mechanism, resulting in a rigid sliding effect, which reduces the user experience and satisfaction.

[0062] In addition, the relevant technology lacks a sophisticated rebound mechanism, which affects the smoothness, naturalness and user experience of sliding.

[0063] Based on this, the embodiments of the present application provide an image display method, device, equipment, medium and program product, which can prevent the image from completely sliding out of the page when the sliding distance is too large, while achieving a smoother and more flexible image sliding display effect, improving user experience and satisfaction, and also providing a fine rebound mechanism when the sliding distance is too large, further improving the smoothness, naturalness and user experience of the sliding display.

[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 S150.

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

[0067] The sliding display request of the target image is a request issued by the user for sliding display of the target image in the target page. The user can generate the sliding display request by voice or by sliding a finger in the target page.

[0068] Specifically, when a sliding display request for a target image sent by a user is received, information about the initial sliding speed and sliding direction of the target image in the sliding display request can be obtained. For example, when a user slides a finger on a target page, the finger sliding speed and finger sliding direction can be calculated, where the finger sliding speed is the initial sliding speed of the target image, and the finger sliding direction is the sliding direction of the target image.

[0069] S120, calculating a first total distance corresponding to a speed at which the target image decelerates from an initial sliding speed to a stop according to a preset first acceleration.

[0070] The preset first acceleration is a default acceleration set in advance. The magnitude of the first acceleration can be set according to user needs, and the embodiment of the present application does not limit this.

[0071] Specifically, before controlling the target image to slide, the total distance that the target image can slide from the initial sliding speed to stop can be calculated using the default first acceleration, and the total distance can be referred to as the first total distance.

[0072] For example, the square of the initial sliding velocity may be divided by twice the first acceleration to obtain the first total distance.

[0073] S130, when the first total distance is greater than the edge distance, determine the sum of the edge distance and the preset offset distance as the total target sliding distance, wherein the edge distance is the distance between the initial position of the first edge of the target image and the first edge position of the target page, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page.

[0074] The edge distance is the distance between the initial position of the first edge of the target image and the first edge position of the target page. Figure 2 As shown, before the target image slides, if the sliding direction is to the left, the right edge of the target page is the first edge of the target page, the right edge of the target image is the first edge of the target image, and the edge distance is the distance between the position of the right edge of the target page and the initial position of the right edge of the target image.

[0075] For another example, when the sliding direction is to the right, the left edge of the target page is the first edge of the target page, the left edge of the target image is the first edge of the target image, and the edge distance is the distance between the position of the left edge of the target page and the initial position of the left edge of the target image.

[0076] The offset distance is smaller than the distance between the first edge of the target page and the second edge of the target page, that is, the preset offset distance is smaller than the width of the target page. The offset distance can be flexibly set according to user needs, and the embodiment of the present application does not limit this.

[0077] For more details, please refer to Figure 2 If the first total distance calculated by the default first acceleration is greater than the edge distance, it means that if the target image is controlled to slide according to the default first acceleration, the target image will continue to slide after the content of the target image is fully displayed in the target page. In this case, the acceleration needs to be recalculated. When calculating the new acceleration, the sum of the edge distance and the preset offset distance can be first determined as the total target sliding distance.

[0078] S140, calculating a second acceleration based on the target total sliding distance.

[0079] Specifically, the target total sliding distance may be used as the total sliding distance corresponding to the target image decelerating from the initial sliding speed to stopping, and a new acceleration may be calculated, which may be called a second acceleration, to achieve a smoother and more flexible image sliding display effect.

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

[0081] Specifically, after the new second acceleration is calculated, the target image can be controlled to slide and display in the target page along the sliding direction based on the second acceleration. Figure 3 As shown, after the second acceleration is calculated, the target image can be controlled to start sliding.

[0082] According to the image display method provided by the embodiment of the present application, when receiving a sliding display request of the target image, the information of the initial sliding speed and the sliding direction of the target image in the sliding display request are obtained. Then, before controlling the sliding display of the target image, the first total distance of the target image sliding from the initial sliding speed to the stop according to the default first acceleration can be calculated. If the first total distance is greater than the edge distance between the initial position of the first edge of the target image and the first edge position of the target page, it means that the first total distance is too large. At this time, the sum of the edge distance and the preset offset distance can be determined as the target sliding total distance, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page, so as to ensure that the target image will not completely slide out of the page after sliding the target sliding distance. Then, based on the target sliding total distance, a new second acceleration can be calculated. The second acceleration can make the sliding speed change of the image smoother and achieve a natural deceleration effect. Therefore, after calculating the new second acceleration, the target image can be controlled to slide and display in the target page with uniform deceleration along the sliding direction based on the second acceleration. This can prevent the image from completely sliding out of the page when the sliding distance is too large, while achieving a smoother and more flexible image sliding display effect, thereby improving user experience and satisfaction.

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

[0084] In some embodiments, Figure 4 As shown, step S140 calculates the second acceleration based on the target total sliding distance, and may include step S141.

[0085] S141, dividing the square of the initial sliding speed by twice the target sliding distance to obtain a second acceleration.

[0086] Specifically, the second acceleration may be calculated by dividing the square of the initial sliding speed by twice the target sliding distance.

[0087] The embodiment of the present application determines the second acceleration based on the total target sliding distance through a specific calculation method, which is more accurate and efficient, facilitates rapid adjustment of the acceleration during image sliding, and optimizes the user experience.

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

[0089] In some embodiments, Figure 5 As shown, the image generation method may further include steps S160 to S190.

[0090] S160, when the first edge of the target image slides along the sliding direction and stops at the Nth first-category preset position, determine that the distance between the Nth first-category preset position and the first edge position of the target page is the first distance, wherein the first-category preset position is located within the target page, and the distance between the first first-category preset position and the initial position of the first edge of the target image is equal to the target sliding distance, and N is a positive integer.

[0091] Among them, the preset position located in the target page can be called a first type of preset position.

[0092] The distance between the first first-type preset position and the initial position of the first edge of the target image is equal to the target sliding distance, that is, the first first-type preset position is the stop position of the target image sliding along the sliding direction according to the second acceleration.

[0093] Specifically, when the first edge of the target image slides along the sliding direction and stops at a first type of preset position in the target page, the distance between the first type of preset position and the first edge position of the target page may be referred to as a first distance.

[0094] For example, when the first edge of the target image slides along the sliding direction and stops at the first first-category preset position, the distance between the first first-category preset position and the first edge position of the target page can be determined as the first distance. Then, when the first edge of the target image slides along the sliding direction and stops at the second first-category preset position, the distance between the second first-category preset position and the first edge position of the target page can be determined as the first distance. This cycle is repeated.

[0095] S170, when the first distance is greater than the preset minimum distance, control the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position, wherein the second type of preset position is located outside the target page, and the distance between the second type of preset position and the first edge position of the target page is a second distance and the second distance is less than the first distance.

[0096] Among them, the preset position outside the target page can be called the second type of preset position.

[0097] Specifically, when the first distance is greater than the preset shortest distance, the first edge of the target image can continue to be controlled to slide from the inside of the target page to the outside of the target page. Specifically, the first edge of the target image can be controlled to slide in the opposite direction of the sliding direction and stop at a second type of preset position outside the target page, and the distance between the second type of preset position and the first edge of the target page can be called a second distance, which is smaller than the first distance. In other words, with the first edge of the target page as the central axis, the target image can slide from a side position farther from the central axis to a side position closer to the central axis.

[0098] S180, when the second distance is greater than the preset shortest distance, control the first edge of the target image to slide along the sliding direction and stop at the N+1th first-category preset position, wherein the distance between the N+1th first-category preset position and the first edge position of the target page is less than the second distance.

[0099] Specifically, when the second distance is greater than the preset minimum distance, the first edge of the target image can continue to be controlled to slide from outside the target page to inside the target page. Specifically, the first edge of the target image can be controlled to slide along the sliding direction and stop at the N+1th first-category preset position, and the distance between the N+1th first-category preset position and the first edge position of the target page is less than the second distance.

[0100] S190, when the first distance or the second distance is less than or equal to the preset shortest distance, controlling the first edge of the target image to slide and display and stop at the first edge position of the target page.

[0101] Specifically, when the first distance is less than or equal to the preset shortest distance or the second distance is less than or equal to the preset shortest distance, the first edge of the target image can be controlled to slide and display and stop at the first edge position of the target page, thereby ending the rebound sliding process, and the edge of the target image can be aligned with the edge of the target page after the rebound sliding process ends.

[0102] The embodiment of the present application can control the rebound sliding of the target image inside and outside the target page by intelligently adjusting the sliding direction and different preset positions of the image, and ultimately accurately align the edge of the image with the edge of the target page, thereby improving the smoothness and visual effect of the user experience.

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

[0104] In some embodiments, Figure 6As shown, step S170 controls the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position when the first distance is greater than the preset shortest distance, which may include steps S171 and S172.

[0105] S171, when the first distance is greater than the preset shortest distance, based on a preset first rebound acceleration, controlling the first edge of the target image to slide in an opposite direction to the sliding direction to a first edge position of the target page.

[0106] Specifically, when the first distance is greater than the preset shortest distance, the first edge of the target image can be controlled to slide in the opposite direction of the sliding direction to the first edge of the target page. That is, based on the preset first rebound acceleration, the first edge of the target image can be controlled to slide in the opposite direction of the sliding direction to the first edge of the target page.

[0107] S172: Based on a preset second rebound acceleration, control the first edge of the target image to slide in a direction opposite to the sliding direction from the first edge position of the target page to slow down and stop at a second type of preset position.

[0108] Specifically, when the first distance is greater than the preset shortest distance, the first edge of the target image may be controlled to slide in an accelerated manner in the opposite direction of the sliding direction to the first edge position of the target page, and then decelerated to slide to the second type of preset position. Specifically, based on a preset first rebound acceleration, the first edge of the target image may be controlled to slide in an accelerated manner in the opposite direction of the sliding direction to the first edge position of the target page, and then based on a preset second rebound acceleration, the first edge of the target image may be controlled to slide in an accelerated manner in the opposite direction of the sliding direction from the first edge position of the target page to the second type of preset position.

[0109] In the embodiment of the present application, when the first distance is greater than the preset minimum distance, when the first edge of the target image is controlled to slide in the opposite direction of the sliding direction and displayed to the second type of preset position, specifically by introducing the first rebound acceleration and the second rebound acceleration, the sliding image is first accelerated with the first rebound acceleration so that the first edge of the target image slides to the first edge of the target page, and then the first edge of the sliding target image is decelerated with the second rebound acceleration to the second type of preset position, thereby achieving a more delicate and natural image rebound effect and improving the user experience.

[0110] In some embodiments, you can continue to see Figure 6 In step S180, when the second distance is greater than the preset shortest distance, the first edge of the target image is controlled to slide along the sliding direction and stop at the N+1th first type preset position, which may include steps S181 and S182.

[0111] S181, when the second distance is greater than the preset shortest distance, based on a preset third rebound acceleration, controlling the first edge of the target image to slide rapidly along the sliding direction to the first edge position of the target page.

[0112] Specifically, when the second distance is greater than the preset shortest distance, the first edge of the target image can be controlled to slide rapidly along the sliding direction to the first edge of the target page. That is, based on the preset third rebound acceleration, the first edge of the target image can be controlled to slide rapidly along the sliding direction to the first edge of the target page.

[0113] S182: Based on a preset fourth rebound acceleration, control the first edge of the target image to slide deceleratedly from the first edge position of the target page along the sliding direction and stop at the N+1th first-type preset position.

[0114] Specifically, when the second distance is greater than the preset shortest distance, the first edge of the target image may be controlled to slide in an accelerated manner along the sliding direction to the first edge position of the target page, and then decelerated to slide to the N+1th first-category preset position. Specifically, based on the preset third rebound acceleration, the first edge of the target image may be controlled to slide in an accelerated manner along the sliding direction to the first edge position of the target page, and then based on the preset fourth rebound acceleration, the first edge of the target image may be controlled to slide in a decelerated manner from the first edge position of the target page to the N+1th first-category preset position along the sliding direction.

[0115] It should be noted that the magnitudes of the first rebound acceleration, the second rebound acceleration, the third rebound acceleration and the fourth rebound acceleration can be flexibly set according to user requirements, and the embodiments of the present application are not limited to this.

[0116] In the embodiment of the present application, when the second distance is greater than the preset minimum distance, when the first edge of the target image is controlled to slide along the sliding direction to be displayed to the second type of preset position, specifically by introducing a third rebound acceleration and a fourth rebound acceleration, the sliding image is first accelerated with the third rebound acceleration so that the first edge of the target image slides to the first edge of the target page, and then the first edge of the sliding target page is decelerated with the fourth rebound acceleration to the N+1th first type preset position, thereby further achieving a more delicate and natural image rebound effect and improving the user experience.

[0117] In an example, the displacement of the first edge of the target image in the stage of gradually sliding from the first edge away from the target page to the first edge of the target page is determined according to the rule St=Sp+Sn-A1*t*t / 2, wherein A1 is the rebound acceleration, Sp represents the first edge position of the target page, Sn represents the preset position of the first edge of the target page before sliding, Sp+Sn represents the distance between the first edge position of the target image and the first edge position of the target page before sliding, t is the time point, St is the real-time distance between the first edge of the target image and the first edge of the target page when the time point is t, in this stage Sn is the starting point, Sp is the end point, and the image moves with uniform acceleration based on the rebound acceleration A1. Then, when the first edge of the target image is away from the first edge of the target page, the displacement can be determined according to the rule St=Sp-t*sqrt((abs(A2*Sn) / 2)-A2*t*t / 2, where Sp is the starting point and Sn is the end point in this stage, and the image moves with uniform deceleration based on the rebound acceleration A2. The embodiment of the present application can control the sliding displacement of the first edge of the target image relative to the first edge of the target page at different time points t through an accurate mathematical formula (involving parameters such as rebound acceleration, time point and position), and can achieve a smooth, dynamic and elastic visual effect, thereby enhancing the user experience.

[0118] In some embodiments, you can continue to see Figure 6 , step S190 controls the first edge of the target image to slide and display and stop at the first edge position of the target page when the first distance or the second distance is less than or equal to the preset shortest distance, which may include step S191.

[0119] S191, when the first distance or the second distance is less than or equal to the preset shortest distance, based on a preset speed, controlling the first edge of the target image to slide uniformly and stop at the first edge position of the target page.

[0120] Specifically, when the first distance or the second distance is less than or equal to the preset minimum distance, it indicates that the rebound sliding processing flow is about to end. At this time, based on the preset speed, the first edge of the target image can be controlled to slide uniformly to the first edge position of the target page, thereby ending the rebound sliding processing flow and enabling the first edge of the target image to be aligned with the first edge of the target page after the rebound sliding processing flow ends.

[0121] The embodiment of the present application ensures that the rebound sliding process ends smoothly and accurately by uniformly sliding the first edge of the target image to the first edge of the target page at a preset speed when the distance between the first edge of the target image and the first edge of the target page reaches or is less than a preset minimum distance, and at the same time perfectly aligns the first edge of the target image with the first edge of the target page, thereby achieving a smoother and more flexible image sliding display effect and improving user experience and satisfaction.

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

[0123] In some embodiments, Figure 7 As shown, in step S160, when the first edge of the target image slides along the sliding direction and stops at the Nth first-category preset position, before determining that the distance between the Nth first-category preset position and the first edge position of the target page is the first distance, the image generation method may further include steps S210 and S220.

[0124] S210: When a first edge of a target image slides along a sliding direction and stops at a first first-type preset position, obtain information on a preset total number of times of crossing the edge.

[0125] Among them, the total number of edge crossings can be flexibly set according to user needs, and the embodiments of the present application do not limit this.

[0126] Specifically, since the first first-category preset position is the initial stop position of the first edge of the target image when it slides along the sliding direction at the second acceleration, when the first edge of the target image slides along the sliding direction to the first first-category preset position, the rebound sliding processing flow is triggered: first, the information on the total number of edge crossings set in advance is obtained.

[0127] S220, calculating a preset shortest distance based on information on the total number of times the edge is crossed.

[0128]

[0129] Wherein, dmin is the preset shortest distance, dmax is the preset offset distance, m is the total number of edge crossings, and m is an integer greater than 1.

[0130] Specifically, the preset minimum distance dmin can be calculated by formula 1, and then during the rebound display of the target image, as long as the distance between the stop position of the first edge of the target image and the first edge position of the target page is less than or equal to the preset minimum distance dmin, it means that the rebound processing flow is about to end. At this time, the first edge of the target image can be controlled to slide to the first edge of the target page at a uniform speed, so that the first edge of the target image is perfectly aligned with the first edge of the target page.

[0131] The embodiment of the present application allows for flexible calculation of the preset minimum distance based on the total number of edge crossings customized by the user, so that during the rebound sliding process of the target image, when the distance between the stop position of the first edge of the target image and the first edge position of the target page is less than or equal to the preset minimum distance dmin, the first edge of the target image can be timely controlled to slide to the first edge of the target page at a uniform speed, thereby achieving perfect alignment of the edges, enhancing the smoothness of the operation and the personalization of the user experience.

[0132] In some embodiments,

[0133]

[0134] Wherein, d2 is the second distance, and d1 is the first distance.

[0135] Specifically, the second distance d2 is smaller than the first distance d1, and the second distance d2 can be obtained by multiplying the first distance d1 by a preset coefficient, and the preset coefficient can be a coefficient less than 1. For example, if the total number of edge crossings m is 4, the preset coefficient is 3 / 4. For another example, if the total number of edge crossings m is 3, the preset coefficient is 2 / 3.

[0136] In the embodiment of the present application, a preset coefficient less than 1 is multiplied by the first distance d1 to calculate the second distance d2, and the preset coefficient is associated with the total number of edge crossings m. When the value of the total number of edge crossings m changes, the preset coefficient can be flexibly changed, thereby accurately controlling the degree of reduction of the second distance d2 relative to the first distance d1. This design provides higher flexibility and configurability, so that the relationship between the first distance and the second distance can be more accurately set and controlled in different application scenarios or user preferences, thereby optimizing the effect of image rebound display.

[0137] It should be noted that the embodiment of the present application can customize the number of times m that the first edge of the target image passes the first edge of the page, the rebound acceleration, and the preset speed at the end of the rebound process. In other words, each time the first edge of the target image passes the first edge of the target page, the maximum distance that can be reached between the first edge of the target image and the first edge of the target page is smaller than the previous distance.

[0138] Based on the same inventive concept, the embodiment of the present application also provides an image generation device, such as Figure 8 As shown, the device 800 may include an acquisition module 810 , a calculation module 820 , a determination module 830 and a control module 840 .

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

[0140] A calculation module 820, configured to calculate a first total distance corresponding to the target image decelerating from an initial sliding speed to a stop according to a preset first acceleration;

[0141] A determination module 830 is used to determine, when the first total distance is greater than the edge distance, that the sum of the edge distance and the preset offset distance is the target sliding total distance, wherein the edge distance is the distance between the initial position of the first edge of the target image and the position of the first edge of the target page, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page;

[0142] The calculation module 820 is further used to calculate a second acceleration based on the target total sliding distance;

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

[0144] In some embodiments, the calculation module is used to calculate the second acceleration based on the target total sliding distance, which can be specifically used for:

[0145] The second acceleration is obtained by dividing the square of the initial sliding velocity by twice the target sliding distance.

[0146] In some embodiments, the apparatus may further include:

[0147] The determination module is further used to determine, when the first edge of the target image slides along the sliding direction and stops at the Nth first-type preset position, that the distance between the Nth first-type preset position and the first edge position of the target page is a first distance, wherein the first-type preset position is located in the target page, and the distance between the first first-type preset position and the initial position of the first edge of the target image is equal to the target sliding distance, and N is a positive integer;

[0148] The control module is further used to control the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position when the first distance is greater than the preset shortest distance, wherein the second type of preset position is located outside the target page, and the distance between the second type of preset position and the first edge position of the target page is a second distance and the second distance is less than the first distance;

[0149] The control module is further used to control the first edge of the target image to slide and display along the sliding direction and stop at the N+1th first-category preset position when the second distance is greater than the preset shortest distance, wherein the distance between the N+1th first-category preset position and the first edge position of the target page is less than the second distance;

[0150] The control module is further used to control the first edge of the target image to slide and display and stop at the first edge position of the target page when the first distance or the second distance is less than or equal to the preset shortest distance.

[0151] In some embodiments, the control module is used to control the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at the second type of preset position when the first distance is greater than the preset shortest distance. Specifically, it can be used for:

[0152] When the first distance is greater than the preset shortest distance, based on a preset first rebound acceleration, controlling the first edge of the target image to slide in the opposite direction of the sliding direction to the first edge position of the target page;

[0153] Based on the preset second rebound acceleration, the first edge of the target image is controlled to slide from the first edge position of the target page in a direction opposite to the sliding direction with deceleration and stop at a second type of preset position.

[0154] In some embodiments, the control module is used to control the first edge of the target image to slide and display along the sliding direction and stop at the N+1th first-type preset position when the second distance is greater than the preset shortest distance. Specifically, it can be used to:

[0155] When the second distance is greater than the preset shortest distance, based on a preset third rebound acceleration, controlling the first edge of the target image to slide rapidly along the sliding direction to the first edge position of the target page;

[0156] Based on the preset fourth rebound acceleration, the first edge of the target image is controlled to slide at a reduced speed from the first edge position of the target page along the sliding direction and stop at the N+1th first-type preset position.

[0157] In some embodiments, the control module is used to control the first edge of the target image to slide and display and stop at the first edge position of the target page when the first distance or the second distance is less than or equal to the preset shortest distance. Specifically, it can be used to:

[0158] When the first distance or the second distance is less than or equal to the preset shortest distance, based on the preset speed, the first edge of the target image is controlled to slide uniformly and stop at the first edge position of the target page.

[0159] In some embodiments, the determining module is used to determine that when the first edge of the target image slides along the sliding direction and stops at the Nth first-category preset position, before determining that the distance between the Nth first-category preset position and the first edge position of the target page is the first distance, the device may also include:

[0160] The acquisition module is further used to acquire information of a preset total number of times of crossing the edge when the first edge of the target image slides to the first first-type preset position along the sliding direction;

[0161] The calculation module is also used to calculate the preset shortest distance according to the information of the total number of times the edge is crossed;

[0162]

[0163] Wherein, dmin is the preset shortest distance, dmax is the preset offset distance, m is the total number of edge crossings, and m is an integer greater than 1.

[0164] In some embodiments,

[0165]

[0166] Wherein, d2 is the second distance, and d1 is the first distance.

[0167] Each module in the image generation device provided in the embodiment of the present application can realize Figures 1 to 7 The functions of each step of the provided image generation method and the ability to achieve the corresponding technical effects are described briefly and will not be repeated here.

[0168] Fig. 9 A schematic diagram of the hardware structure of an image generating device provided in an embodiment of the present application is shown.

[0169] The image generating device may include a processor 901 and a memory 902 storing computer program instructions.

[0170] Specifically, the processor 901 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.

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

[0172] 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.

[0173] The processor 901 reads and executes computer program instructions stored in the memory 902 to implement any one of the image generation methods in the above embodiments.

[0174] In one example, the image generation device may further include a communication interface 903 and a bus 904. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 904 and communicate with each other.

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

[0176] The bus 904 includes hardware, software or both, coupling the components of the image generation device to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (Linear Predictive Coding, LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a 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 904 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.

[0177] The device can execute the image generation method in the embodiment of the present application based on each unit / component in the image generation device, thereby realizing the combination of Figures 1 to 7 Describes the method used to generate the image.

[0178] In addition, in combination with the image generation 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 a processor, any image generation method in the above embodiment is implemented.

[0179] 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 generation method embodiments.

[0180] 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.

[0181] 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.

[0182] 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.

[0183] 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.

[0184] 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, obtaining information about an initial sliding speed and a sliding direction of the target image in the sliding display request; Calculating a first total distance corresponding to the target image decelerating from the initial sliding speed to stopping according to a preset first acceleration; In the case where the first total distance is greater than the edge distance, determining the sum of the edge distance and the preset offset distance as the target sliding total distance, wherein the edge distance is the distance between the initial position of the first edge of the target image and the first edge position of the target page, and the preset offset distance is less than the distance between the first edge of the target page and the second edge of the target page; Calculating a second acceleration based on the target total sliding distance; 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 The calculating the second acceleration based on the target total sliding distance includes: The second acceleration is obtained by dividing the square of the initial sliding speed by twice the target sliding distance.

3. The method according to claim 1 or 2, characterized in that: Also includes: In a case where the first edge of the target image slides along the sliding direction and stops at the Nth first-type preset position, determining the distance between the Nth first-type preset position and the first edge position of the target page as a first distance, wherein the first-type preset position is located in the target page, the distance between the first first-type preset position and the initial position of the first edge of the target image is equal to the target sliding distance, and N is a positive integer; When the first distance is greater than the preset shortest distance, controlling the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position, wherein the second type of preset position is located outside the target page, and the distance between the second type of preset position and the first edge position of the target page is a second distance, and the second distance is less than the first distance; When the second distance is greater than the preset shortest distance, controlling the first edge of the target image to slide and display along the sliding direction and stop at the N+1th first-category preset position, wherein the distance between the N+1th first-category preset position and the first edge position of the target page is less than the second distance; When the first distance or the second distance is less than or equal to the preset shortest distance, the first edge of the target image is controlled to slide and display and stop at the first edge position of the target page.

4. The method according to claim 3, characterized in that: When the first distance is greater than the preset shortest distance, controlling the first edge of the target image to slide and display in the opposite direction of the sliding direction and stop at a second type of preset position includes: When the first distance is greater than the preset shortest distance, based on a preset first rebound acceleration, controlling the first edge of the target image to slide in the opposite direction of the sliding direction to the first edge position of the target page; Based on the preset second rebound acceleration, the first edge of the target image is controlled to slide from the first edge position of the target page in a direction opposite to the sliding direction with a reduced speed and stop at a second type of preset position.

5. The method according to claim 4, characterized in that When the second distance is greater than the preset shortest distance, controlling the first edge of the target image to slide and display along the sliding direction and stop at the N+1th first-type preset position includes: When the second distance is greater than the preset shortest distance, based on a preset third rebound acceleration, controlling the first edge of the target image to slide along the sliding direction to the first edge position of the target page at an accelerated speed; Based on the preset fourth rebound acceleration, the first edge of the target image is controlled to slide along the sliding direction from the first edge position of the target page with deceleration and stop at the N+1th first-type preset position.

6. The method according to claim 3, characterized in that When the first distance or the second distance is less than or equal to the preset shortest distance, controlling the first edge of the target image to slide and display and stop at the first edge position of the target page includes: When the first distance or the second distance is less than or equal to the preset shortest distance, based on a preset speed, the first edge of the target image is controlled to slide and display at a uniform speed and stop at the first edge position of the target page.

7. The method according to claim 3, characterized in that In the case where the first edge of the target image slides along the sliding direction and stops at the Nth first-type preset position, before determining that the distance between the Nth first-type preset position and the first edge position of the target page is the first distance, the method further includes: When the first edge of the target image slides to a first first-type preset position along the sliding direction, obtaining information on a preset total number of times of crossing the edge; Calculate the preset shortest distance according to the total number of edge crossings; Wherein, dmin is the preset shortest distance, dmax is the preset offset distance, m is the total number of edge crossings, and m is an integer greater than 1.

8. The method according to claim 7, characterized in that Wherein, d2 is the second distance, and d1 is the first distance.

9. 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 about an initial sliding speed and a sliding direction of the target image in the sliding display request; A calculation module, used for calculating a first total distance corresponding to the target image decelerating from the initial sliding speed to stopping according to a preset first acceleration; a determination module, configured to determine, when the first total distance is greater than an edge distance, that the sum of the edge distance and a preset offset distance is the target sliding total distance, wherein the edge distance is the distance between an initial position of a first edge of a target image and a first edge position of a target page, and the preset offset distance is less than a distance between a first edge of the target page and a second edge of the target page; The calculation module is further used to calculate a second acceleration based on the target total sliding distance; 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.

10. 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 8 is implemented.

11. 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 8 is implemented.

12. 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 8.