Display method and device, computer equipment, readable storage medium and program product
By receiving sliding commands in the LCD display and calculating the image display speed, dynamically adjusting the image display speed, and determining the target image based on the accumulated displacement value, the problem of insufficient correlation between the image display speed and the displacement value in the LCD sliding operation is solved, and the accuracy and fluency of image display are achieved.
Patent Information
- Application Number
- CN202411971619.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-30
AI Technical Summary
In liquid crystal displays (LCDs), the dynamic correlation between the image display speed and displacement value during the sliding operation is insufficient, resulting in the image switching being too fast or too slow, and it is impossible to adapt to the needs of different sliding operations, especially in scenarios where fast sliding or multiple reverse operations are performed.
By receiving the sliding start command, the image display speed is calculated, and the target image is determined based on the accumulated displacement value of the sliding stop command, dynamic adjustment of the image display speed and precise positioning of the target image are achieved.
It realizes dynamic adjustment of image display speed, adapts to different sliding operation needs, and solves the problem of inaccurate positioning of target images, ensuring the accuracy of display content.
Smart Images

Figure CN120066359A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of LCD display screens, and in particular, to a display method, device, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] In the field of liquid crystal displays (LCDs), sliding operations are widely used in scenarios such as image browsing and content switching, and their implementation is usually based on the detection of the sliding direction and displacement value.
[0003] However, the dynamic association between the image display speed and the displacement value during the sliding process is insufficient, and it is easy to have the situation of too fast or too slow image switching, which cannot meet the requirements of different sliding operations. These problems are particularly prominent in scenarios of rapid sliding or multiple reverse operations, resulting in inaccurate display content. Summary of the Invention
[0004] Based on this, it is necessary to provide a display method, device, computer device, computer-readable storage medium, and computer program product that can perform accurate display for the above technical problems.
[0005] In a first aspect, this application provides a display method, including:
[0006] Receiving a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value;
[0007] Calculating an image display speed according to the initial sliding displacement value, and displaying each image to be displayed on a target screen according to the image display speed;
[0008] If a sliding stop instruction is detected, determining a target image from each of the images to be displayed according to the cumulative sliding displacement value carried by the sliding stop instruction, and fixedly displaying the target image on the target screen.
[0009] In one of the embodiments, before the above-mentioned receiving the sliding start instruction, it further includes:
[0010] Obtaining the size of the target screen and the target display requirements;
[0011] Calculating the display ranges of different types of content in each image to be displayed and the overlapping areas between the different types of content according to the size and the target display requirements;
[0012] Adjusting different types of content in each of the images to be displayed and the overlapping areas between the different types of content according to the display ranges, so that each of the images to be displayed adapts to the target screen.
[0013] In one embodiment, before receiving the sliding start instruction, the following steps are further included:
[0014] Assign identifiers to each of the to-be-displayed images, and assign mapping coordinates to each of the to-be-displayed images according to the identifiers, where the mapping coordinates are used to represent the positions of each of the to-be-displayed images in other to-be-displayed images.
[0015] In one embodiment, determining the target image from each of the to-be-displayed images according to the cumulative sliding displacement value carried by the sliding stop instruction includes:
[0016] Determine the search direction of each of the to-be-displayed images according to the sliding direction and the identifier;
[0017] Calculate a reference coordinate according to the cumulative sliding displacement value;
[0018] Based on the reference coordinate, the search direction, and the mapping coordinates, determine the target image.
[0019] In one embodiment, calculating the reference coordinate according to the cumulative sliding displacement value includes:
[0020] Calculate a displacement speed according to the cumulative sliding displacement value;
[0021] Calculate a reference displacement amount according to the displacement speed;
[0022] Combine the reference displacement amount and the mapping coordinates to calculate the reference coordinate.
[0023] In one embodiment, before displaying each of the to-be-displayed images on the target screen according to the image display speed, the following steps are further included:
[0024] Predict the display positions of each of the to-be-displayed images on the target screen according to the sliding direction and the initial sliding displacement value;
[0025] Calculate the difference between the display position and a preset image switching position;
[0026] When the difference is not within a preset threshold range, adjust the image display speed.
[0027] In a second aspect, the present application further provides a display device, including:
[0028] An instruction receiving module, configured to receive a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value;
[0029] A first display module, configured to calculate an image display speed according to the initial sliding displacement value, and display each of the to-be-displayed images on a target screen according to the image display speed;
[0030] A second display module, configured to, if a sliding stop instruction is detected, determine a target image from each of the to-be-displayed images according to the cumulative sliding displacement value carried in the sliding stop instruction, and fixedly display the target image on the target screen.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the above embodiments are implemented.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0033] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0034] The above display method, device, computer device, computer-readable storage medium, and computer program product can dynamically adjust the image display speed by receiving a sliding start instruction and calculating the image display speed according to the initial sliding displacement value, so as to adapt to different sliding operation requirements. Then, the target image is determined according to the cumulative sliding displacement value in the sliding stop instruction and fixedly displayed on the target screen, which can solve the problem of inaccurate positioning of the target image. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a schematic flowchart of the display method in an embodiment;
[0037] Figure 2 It is a structural block diagram of the display device in an embodiment;
[0038] Figure 3 It is an internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] To make the objectives, technical solutions and advantages of this application more clear and understandable, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not used to limit this application.
[0040] In one embodiment, as Figure 1 shown, a display method is provided. In this embodiment, it is exemplified that this method is applied to a terminal. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0041] Step 102, receive a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value.
[0042] Among them, the sliding start instruction refers to an input signal sent by a user through a specific operation, such as touch screen sliding, knob rotation or button operation, etc., for starting the sliding process of an image. The sliding direction is used to indicate the direction of the user's sliding operation, and may include "left", "right" or other related directions.
[0043] Among them, the initial sliding displacement value is the displacement magnitude generated by the user's initial sliding operation, usually expressed in pixels, angles or other measurement units, and is used to determine the basis for speed calculation in the initial stage of sliding.
[0044] In an exemplary embodiment, when the user triggers a sliding instruction through operations such as touch screen sliding, knob rotation or button operation, after the system receives the instruction, it parses the sliding direction and the initial sliding displacement value.
[0045] Step 104, calculate the image display speed according to the initial sliding displacement value, and display each image to be displayed on the target screen according to the image display speed.
[0046] Among them, the image display speed refers to a dynamic parameter in which each image to be displayed is switched or moved on the screen at a certain speed during the sliding process. The calculation of the speed is usually completed through linear or non-linear function mapping according to the initial sliding displacement value and the system preset speed adjustment rule. For example, for a larger initial sliding displacement value, the system may set a higher display speed so that the images can be quickly switched to adapt to the user's sliding operation.
[0047] Among them, the images to be displayed refer to the set of images that need to be displayed on the target screen according to the user's sliding operation. Usually, these images have been pre-loaded in the system and are displayed according to the instructions of the sliding operation. Specifically, the images to be displayed are sequentially presented on the screen according to their positions in the image sequence.
[0048] Optionally, the initial sliding displacement value and the image display speed can be calculated through a preset mapping function. For example, the system can define a speed adjustment function based on the initial displacement value. Suppose the function is v = f(d), where v is the image display speed and d is the initial sliding displacement value. This function can be linear or non-linear, depending on the design requirements of the sliding process. The linear mapping relationship may be v = k*d, where k is a constant representing the speed adjustment factor; the non-linear mapping relationship can adopt forms such as exponential functions and logarithmic functions, so as to control the speed slower when the displacement value is small and make the speed faster when the displacement value is large, thus achieving different degrees of dynamic response.
[0049] Optionally, to ensure the smoothness of image sliding, the system also needs to consider the screen refresh rate, image update frequency, and other hardware limitations. Usually, when the initial displacement value is small, the image display speed is relatively slow, and the user can achieve a smooth image transition through more precise control; when the initial displacement value is large, the image display speed is faster, aiming to accelerate the response to the user's sliding operation.
[0050] Optionally, the system first calculates a speed-related parameter based on the initial sliding displacement value and the sliding direction, which reflects the rate at which the image moves on the screen, that is, the image display speed. Then, the system adjusts the display frame rate of the image according to the image display speed to ensure smooth image switching. To ensure the smoothness of image sliding, the system will monitor the display effect in real time, including the coherence of image switching and the refresh rate of the target screen. For example, if the display effect is not smooth, the system will adjust the interval time of image rendering to adapt to the display capabilities of the screen and avoid image jitter or stuttering. In addition, the system will also monitor the performance during the image loading and display process to ensure that the image display does not have delays or errors.
[0051] Step 106, if a sliding stop instruction is detected, determine the target image from each image to be displayed according to the cumulative sliding displacement value carried by the sliding stop instruction, and fixedly display the target image on the target screen.
[0052] The system detects a sliding stop instruction, and the cumulative sliding displacement value carried by the sliding stop instruction is used to determine the final target image of the user's sliding operation. The cumulative sliding displacement value is the cumulative result of the displacement magnitude generated by the user during the entire sliding process, and is usually used to calculate the position of the target image in the image sequence after the sliding ends.
[0053] The positioning of the target image is determined by the cumulative displacement value of the sliding operation, and the images are stored according to coordinates. In the system, all images have a unique coordinate position, and these coordinates reflect the position of the images in the display area. For example, if the position of each image on the screen is represented by a horizontal coordinate and a vertical coordinate, the system will calculate the coordinate position corresponding to this displacement value based on the cumulative sliding displacement value and the sliding direction. This coordinate value corresponds one-to-one with the actual position of the image in the display area, thereby determining the target image.
[0054] Exemplarily, assume that the image storage of the system is arranged in sequence and each image has a fixed horizontal coordinate position. For example, if the image set of the system is arranged in horizontal order, then whenever the cumulative sliding displacement value increases, the system will calculate the corresponding horizontal coordinate according to the magnitude of the displacement value and determine the position of the target image. If the cumulative sliding displacement value has exceeded the starting position of the current displayed image, the system will continue to update the display position of the image according to the sliding direction until the target image is located. In this way, at the end of the sliding, the user will see the image at the corresponding position, and the system will fix and display this image on the target screen.
[0055] In the above display method, by receiving the sliding start instruction and calculating the image display speed according to the initial sliding displacement value, the dynamic adjustment of the image display speed can be realized, so as to adapt to different sliding operation requirements. Then, according to the cumulative sliding displacement value in the sliding stop instruction, the target image is determined and fixedly displayed on the target screen, which can solve the problem of inaccurate positioning of the target image.
[0056] In one embodiment, before receiving the sliding start instruction, it further includes: obtaining the size of the target screen and the target display requirements; calculating the display range of different types of content in each image to be displayed and the overlapping area between different types of content according to the size and the target display requirements; adjusting different types of content in each image to be displayed and the overlapping area between different types of content according to the display range, so that each image to be displayed adapts to the target screen.
[0057] Before receiving the sliding start instruction, the system needs to first obtain and analyze the size and display requirements of the target screen. This process ensures that during the subsequent image sliding process, the images can be appropriately adjusted and displayed according to the actual size and requirements of the screen.
[0058] First, the system obtains the physical size and resolution of the target screen from the system configuration. This information is crucial for the subsequent display of images because it directly affects the display area and ratio of the images.
[0059] Next, the system calculates the display range of the image to be displayed based on the size of the target screen and the set display requirements. In this step, the system divides the target screen into different display areas and determines the range of areas where each type of content, such as text, icons, pictures, etc., should be displayed according to the content type of the image. These calculations not only consider the size of the image itself but also include the adaptation of the image to the screen edge, the alignment of the content, and the possible scaling ratio, etc.
[0060] In addition, the system also needs to consider the overlapping areas between different types of content. The overlapping area refers to the overlapping areas that may occur on the screen for different image contents, and these overlapping areas are usually formed when multiple images are displayed simultaneously. Based on this, the system calculates the size and position of the overlapping areas to ensure that these areas do not cause visual chaos or incomplete display problems during the sliding process. For example, if there is an overlap in the image content, the system needs to dynamically adjust the display range or the transparency of the image, etc., to avoid the overlap of the content affecting the user experience.
[0061] Finally, the system adjusts the content and its overlapping areas in the image to be displayed according to the calculated display range to ensure that all images can adapt to the display area of the target screen. During this process, the system will consider factors such as image scaling, cropping, and moving to ensure that the image can be properly displayed on the screen in any state.
[0062] In the above embodiment, before receiving the sliding start instruction, the system has completed the calculation and adjustment of the image content to be displayed according to the size and display requirements of the target screen. This provides a basis for the subsequent smooth sliding and display of the image and ensures that the image content can be reasonably laid out and displayed on the screen.
[0063] In one embodiment, before receiving the sliding start instruction, it further includes: assigning identifiers to each image to be displayed and assigning mapping coordinates to each image to be displayed according to the identifiers, where the mapping coordinates are used to represent the position of each image to be displayed in other images to be displayed.
[0064] First, the system assigns an identifier to each image to be displayed. This identifier is used to uniquely identify each image and ensure that each image can be accurately referenced and operated on during subsequent processing. The identifier is usually a number, letter, or other unique symbol.
[0065] Next, according to the identifier of each image, the system assigns mapping coordinates to each image to be displayed. The mapping coordinates are used to represent the position of each image to be displayed in other images to be displayed. Specifically, the mapping coordinates are a coordinate system that describes the relative position of the image in the display area, usually two-dimensional, including horizontal coordinates and vertical coordinates. These coordinates provide a spatial positioning for the image, enabling each image to be accurately displayed on the target screen according to its identifier and position.
[0066] Exemplarily, assume there are five images to be displayed. The mapping coordinates of the first image to be displayed are (0, 0), with a width of 300 px and a height of 200 px; the second image to be displayed has mapping coordinates of (300, 0), with a width of 300 px and a height of 200 px; the third image to be displayed has mapping coordinates of (600, 0), with a width of 300 px and a height of 200 px; the fourth image to be displayed has mapping coordinates of (0, 200), with a width of 300 px and a height of 200 px; the fifth image to be displayed has mapping coordinates of (300, 200), with a width of 300 px and a height of 200 px. Through these mapping coordinates, the positions of each image can be accurately located on the screen to ensure that they are correctly arranged within the target display area.
[0067] If the coordinates and sizes of two images overlap, the system can calculate the overlapping area by comparing their mapping coordinates. For example, if the coordinates of the first image are (0, 0) and the coordinates of the fourth image are (0, 200), there is a vertical overlapping area between them, and the system can process it accordingly.
[0068] In one embodiment, determining the target image from each image to be displayed according to the cumulative sliding displacement value carried in the sliding stop instruction includes: determining the search direction of each image to be displayed according to the sliding direction and the identifier; calculating the reference coordinate according to the cumulative sliding displacement value; and determining the target image based on the reference coordinate, the search direction, and the mapping coordinate.
[0069] First, the system determines the search direction of the image according to the sliding direction and the identifier of each image to be displayed. The sliding direction determines the operation trajectory of the user, and the identifier ensures that each image can be uniquely identified and located. According to the sliding direction, if the user swipes to the right, the system processes the images sequentially from left to right; otherwise, it processes the images from right to left.
[0070] Next, the system calculates the reference coordinate according to the cumulative sliding displacement value. The cumulative sliding displacement value is the total displacement generated during the user's sliding process, and the system calculates the final position of the image in the display area based on this value. The reference coordinate is the basis for adjusting the image position during the calculation process.
[0071] Furthermore, the process of calculating the reference coordinate according to the cumulative sliding displacement value includes: calculating the displacement speed according to the cumulative sliding displacement value; calculating the reference displacement amount according to the displacement speed; and calculating the reference coordinate by combining the reference displacement amount and the mapping coordinate.
[0072] The displacement speed refers to the moving distance of the image per unit time during the sliding process. It can be obtained by dividing the total displacement of the sliding by the sliding time. The displacement speed reflects the speed of the user's sliding operation and plays a key role in the subsequent calculation of the image position.
[0073] Next, based on the calculated displacement speed, the system further calculates the reference displacement amount. The reference displacement amount represents the specific distance that the image should move at a given sliding speed. The reference displacement amount determines the position change of the target image on the screen. For example, the faster the sliding speed, the greater the reference displacement amount will be accordingly.
[0074] Finally, by combining the reference displacement amount with the mapping coordinates of the image, the system calculates the final reference coordinates. The mapping coordinates represent the initial position of the image in the display area, while the reference coordinates are the new positions obtained through displacement calculation, representing the final positioning of the image during the sliding process. At this time, the reference coordinates ensure the accurate positioning of the image during the sliding operation and avoid any misalignment.
[0075] Based on the reference coordinates, the search direction, and the mapping coordinates of each image to be displayed, the system finally determines the position of the target image. The target image is the image finally displayed in the image sequence according to the user's sliding operation. Through this process, the system can accurately calculate the target image and display it fixedly on the screen.
[0076] Exemplarily, assuming that when the user swipes right, the system calculates the displacement speed of the image as 50 pixels per second and the cumulative sliding displacement value as 300 pixels. In this case, the system calculates the reference displacement amount as 150 pixels based on the displacement speed and, in combination with the mapping coordinates (assumed to be (0, 0)), finally obtains the reference coordinates as (150, 0). Therefore, the target image will be positioned at the reference coordinates (150, 0), thus realizing the precise switching and display of the image.
[0077] In one embodiment, before displaying each image to be displayed on the target screen according to the image display speed, it further includes: predicting the display position of each image to be displayed on the target screen according to the sliding direction and the initial sliding displacement value; calculating the difference between the display position and the preset image switching position; when the difference does not fall within the preset threshold range, adjusting the image display speed.
[0078] Among them, the preset image switching position refers to the target position set by the system for image switching or updating during the image sliding process. Exemplarily, when the image sliding reaches the target position, for example, when the right edge of the current image reaches the right boundary of the screen, the system will trigger image switching, that is, replace the current image with the next image. This position is usually calculated by the system according to factors such as the sliding speed, direction, and image arrangement.
[0079] Predict the display positions of each image to be displayed on the target screen according to the sliding direction and the initial sliding displacement value. The sliding direction determines the trajectory of the user's operation, and the initial sliding displacement value provides a reference for the starting position of the image sliding. Based on this, the system predicts the possible positions of the image on the target screen.
[0080] Next, the system calculates the difference between the display position and the preset image switching position. The display position is the current position of the predicted image on the screen, and the preset image switching position is the ideal position calculated by the system according to the predetermined rules, usually the target position set according to the user's sliding operation and the timing of image switching. By calculating the difference between the two, the system can understand the deviation between the current display position and the target position.
[0081] When the difference does not fall within the preset threshold range, the system will determine that the deviation of the image display position is large, which may cause the image switching to be unsmooth or the position to be inaccurate. Therefore, the system adjusts the image display speed. Specifically, the system dynamically adjusts the moving speed of the image according to the calculated difference value, so that the image can reach the preset switching position more quickly or smoothly. In this way, the system can avoid display inconsistencies caused by excessive position differences, thereby improving the smoothness and accuracy of image switching.
[0082] Exemplarily, assume that the system predicts the display position of a certain image to be displayed as (200, 0), and the preset image switching position is (250, 0). The calculated difference is 50 pixels. If this difference exceeds the threshold range set by the system, for example, 50 pixels exceeds the preset maximum deviation range, the system will adjust the image display speed according to this difference. For example, if the difference is too large, the system may increase the moving speed of the image and quickly move the image to the target position; if the difference is small, the system will moderately slow down the image display speed to ensure a smooth transition. Through this adjustment, the system can achieve a more accurate and smooth image switching effect.
[0083] In one embodiment, if a reverse sliding instruction is detected, the system will adjust the sliding logic of the image according to the current sliding state and the characteristics of the reverse operation, including recalculating the sliding target, updating the sliding direction, and correcting the existing sliding displacement value and speed, so as to achieve the response to the reverse operation and a smooth transition.
[0084] Specifically, when the system detects a reverse sliding instruction, it will first stop the current sliding operation and clear the accumulated sliding displacement value and related speed parameters of the current sliding operation. The system will recalculate the search direction of the sliding target image according to the reverse sliding direction. For example, if the current sliding direction is "right" and the reverse sliding instruction indicates "left", the system will adjust the search direction to "from right to left" and reorder the image processing order.
[0085] Next, the system recalculates the reference coordinates based on the sliding displacement value carried by the reverse sliding instruction, combined with the mapping coordinates and search direction of the current image. The calculation of the reference coordinates includes combining the speed parameter of the reverse sliding, calculating the reference displacement, and synthesizing the reference displacement with the initial mapping coordinates of the current image to determine the new reference coordinates.
[0086] Furthermore, if the sliding displacement value carried by the reverse sliding instruction is small, the system may trigger a partial reverse adjustment, that is, only correcting the reference position of the target image without completely clearing the previous sliding accumulated value; if the displacement value carried by the reverse sliding instruction is large, the system will completely clear the previous sliding information and redetermine the display position of the target image based on the reverse operation.
[0087] Finally, the system dynamically adjusts the image display speed and updates the image sliding animation effect according to the characteristics of the reverse sliding, ensuring that the image display process remains smooth and accurate after the reverse sliding. For example, the system may use a predictive docking algorithm to determine the final docking point of the reverse sliding in advance, thereby optimizing the sliding transition effect and avoiding abrupt switching or incoherent display of the image.
[0088] Through such logic, the system can quickly respond to user operations when a reverse sliding instruction is detected, dynamically adjust the display logic and sliding status of the image, and achieve smooth switching and precise positioning of the image.
[0089] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0090] Based on the same inventive concept, an embodiment of the present application further provides a display device for implementing the display method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the display device provided below can refer to the limitations on the display method in the above text, and will not be repeated here.
[0091] In an exemplary embodiment, as Figure 2 shown, a display device is provided, including: an instruction receiving module 210, a first display module 220, and a second display module 230, where:
[0092] The instruction receiving module 210 is configured to receive a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value.
[0093] The first display module 220 is configured to calculate an image display speed according to the initial sliding displacement value, and display each image to be displayed on a target screen according to the image display speed.
[0094] The second display module 230 is configured to, if a sliding stop instruction is detected, determine a target image from each image to be displayed according to the cumulative sliding displacement value carried by the sliding stop instruction, and fixedly display the target image on the target screen.
[0095] In a rational embodiment, the above device further includes an adjustment module, and the adjustment module includes:
[0096] An acquisition unit, configured to acquire the size of the target screen and the target display requirement.
[0097] A calculation unit, configured to calculate the display range of different types of content in each image to be displayed and the overlapping area between different types of content according to the size and the target display requirement.
[0098] A size adjustment unit, configured to adjust different types of content in each image to be displayed and the overlapping area between different types of content according to the display range, so that each image to be displayed adapts to the target screen.
[0099] In an embodiment, the above device further includes
[0100] An allocation unit, configured to allocate an identifier to each image to be displayed, and allocate a mapping coordinate to each image to be displayed according to the identifier, and the mapping coordinate is used to represent the position of each image to be displayed in other images to be displayed.
[0101] In an embodiment, the above second display module 230 further includes:
[0102] A direction determination unit, configured to determine the search direction of each image to be displayed according to the sliding direction and the identifier.
[0103] A coordinate calculation unit, configured to calculate a reference coordinate according to the cumulative sliding displacement value.
[0104] An image search unit, configured to determine a target image based on the reference coordinate, the search direction, and the mapped coordinate.
[0105] In one embodiment, the above-mentioned coordinate calculation unit includes:
[0106] A speed calculation sub-unit, configured to calculate a displacement speed according to the cumulative sliding displacement value.
[0107] A displacement calculation sub-unit, configured to calculate a reference displacement amount according to the displacement speed.
[0108] A reference coordinate calculation unit, configured to calculate a reference coordinate by combining the reference displacement amount and the mapped coordinate.
[0109] In one embodiment, the above-mentioned device further includes a speed adjustment module, and the speed adjustment module includes:
[0110] A prediction unit, configured to predict the display position of each image to be displayed on the target screen according to the sliding direction and the initial sliding displacement value.
[0111] A difference calculation unit, configured to calculate the difference between the display position and the preset image switching position.
[0112] A speed adjustment unit, configured to adjust the image display speed when the difference does not fall within the preset threshold range.
[0113] Each module in the above-mentioned display device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in the form of hardware or be independent of it, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0114] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 3As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image data to be displayed. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a display method.
[0115] Those skilled in the art can understand that Figure 3 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the steps of the method in any one of the above embodiments.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps of the method in any one of the above embodiments.
[0118] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, it implements the steps of the method in any one of the above embodiments.
[0119] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0120] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0121] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A display method, characterized in that: The method comprises: receiving a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value; Calculating an image display speed according to the initial sliding displacement value, and displaying each image to be displayed on a target screen according to the image display speed; If a slide stop instruction is detected, a target image is determined from the images to be displayed according to the accumulated slide displacement value carried in the slide stop instruction, and the target image is fixedly displayed on the target screen.
2. The method according to claim 1, characterized in that Before receiving the sliding start instruction, the method further includes: Obtaining the size of the target screen and target display requirements; Calculating, according to the size and the target display requirement, display ranges of different types of content in each image to be displayed and overlapping areas between the different types of content; According to the display range, different types of content in each of the images to be displayed and overlapping areas between the different types of content are adjusted to make each of the images to be displayed fit the target screen.
3. The method according to claim 1, characterized in that The receiving of the sliding start instruction also includes: An identifier is assigned to each of the images to be displayed, and mapping coordinates are assigned to each of the images to be displayed according to the identifier, wherein the mapping coordinates are used to indicate the position of each of the images to be displayed in other images to be displayed.
4. The method according to claim 3, characterized in that The step of determining a target image from each of the images to be displayed according to the accumulated sliding displacement value carried by the sliding stop instruction comprises: Determining a search direction of each of the images to be displayed according to the sliding direction and the identifier; Calculating reference coordinates according to the accumulated sliding displacement value; The target image is determined based on the reference coordinates, the search direction, and the mapping coordinates.
5. The method according to claim 3, characterized in that: The calculating the reference coordinate according to the accumulated sliding displacement value comprises: Calculating the displacement speed according to the accumulated sliding displacement value; Calculating a reference displacement according to the displacement speed; The reference coordinates are calculated by combining the reference displacement and the mapping coordinates.
6. The method according to claim 1, characterized in that The step of displaying each image to be displayed before the target screen according to the image display speed further comprises: Predicting a display position of each to-be-displayed image in the target screen according to the sliding direction and the initial sliding displacement value; Calculating the difference between the display position and a preset image switching position; When the difference does not fall within a preset threshold range, the image display speed is adjusted.
7. A display device, characterized in that: The device comprises: An instruction receiving module, used for receiving a sliding start instruction; the sliding start instruction carries a sliding direction and an initial sliding displacement value; A first display module, for calculating an image display speed according to the initial sliding displacement value, and displaying each image to be displayed on a target screen according to the image display speed; The second display module is used to determine a target image from each of the images to be displayed according to the accumulated sliding displacement value carried by the sliding stop instruction if a sliding stop instruction is detected, and fixedly display the target image on the target screen.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.