Interface control method, device, storage medium and terminal

By receiving and processing element movement instructions on the interactive tablet and adjusting its display position when the target element approaches the interface boundary, the problem of data loss caused by elements exceeding the interface boundary is solved, and the user interaction experience is improved.

CN119739302APending Publication Date: 2025-04-01GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311247752.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing interactive tablets are prone to exceed the display interface boundary during element movement, resulting in data loss and restrict user operations, affecting the interactive experience.

Method used

By receiving element movement instructions for target elements in the target interface, the target element is controlled to move, and detect whether it is moved to the display boundary. If it is moved to the boundary, the display position of the target element is adjusted so that it is always in the interface.

Benefits of technology

It effectively avoids data loss problems when the target element is moved outside the interface, and at the same time improves the user's interactive experience and provides positive feedback by automatically adjusting the element position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739302A_ABST
    Figure CN119739302A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an interface control method, device, storage medium and terminal, the method comprising: receiving an element movement instruction for a target element in a target interface, controlling the target element to move the element based on the element movement instruction, and detecting whether the target element moves to the display boundary of the target interface, if the target element moves to the display boundary of the target interface, adjusting the display position of the target element so that the target element is displayed in the target interface. The embodiment of the present application can control the target element to always be displayed in the target interface, avoiding the problem of data loss of the target element caused by the target element moving outside the target interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of interface interaction technology, and in particular to an interface control method, device, storage medium and terminal. Background Art

[0002] In the related art, the interactive tablet supports the user to perform touch operations through fingers or stylus. Specifically, the touch operation may include a variety of editing operations such as writing operation, deletion operation, insertion operation, drawing operation, etc. Since the interactive tablet supports writing operation, the smaller interactive tablet is more convenient for users to carry, and it is convenient for users to write and record text or pictures at any time, which brings great convenience to the user's life. Summary of the invention

[0003] The embodiments of the present application provide an interface control method, device, computer storage medium and terminal, which can control the target element to always be displayed in the target interface, avoiding the problem of data loss of the target element due to the target element moving outside the target interface. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides an interface control method, the method comprising:

[0005] Receive an element movement instruction for a target element in a target interface;

[0006] Controlling the target element to move the element based on the element movement instruction, and detecting whether the target element moves to the display boundary of the target interface;

[0007] If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed within the target interface.

[0008] In a second aspect, an embodiment of the present application provides an interface control device, the device comprising:

[0009] An instruction acquisition module, used for receiving an element movement instruction for a target element in a target interface;

[0010] An element movement module, used to control the target element to move based on the element movement instruction, and to detect whether the target element moves to the display boundary of the target interface;

[0011] The element adjustment module is used to adjust the display position of the target element if the target element moves to the display boundary of the target interface so that the target element is displayed within the target interface.

[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, which has a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0013] In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a memory and a processor; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the memory and executing the above-mentioned method steps.

[0014] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0015] In an embodiment of the present application, an element movement instruction for a target element in a target interface is received, the target element is controlled to move the element based on the element movement instruction, and whether the target element moves to the display boundary of the target interface is detected. If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. When the embodiment of the present application moves the target element in the target interface, if it is detected that the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. Therefore, the embodiment of the present application can control the target element to always be displayed in the target interface, avoiding the problem of data loss of the target element caused by the target element moving outside the target interface; at the same time, when the target element moves to the display boundary, the over-boundary behavior of the target element will be automatically detected, and the display position of the target element will be automatically adjusted. The adjustment operation is a positive feedback to the user's operation behavior, which can further improve the user's interactive experience during the operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 is a scene schematic diagram of an interface control method provided in an embodiment of the present application;

[0018] Figure 2 It is a flowchart of an interface control method provided in an embodiment of the present application;

[0019] Figure 3 It is a flowchart of another interface control method provided in an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of a target element after rotation provided in an embodiment of the present application;

[0021] Figure 5is a schematic diagram of another target element after rotation provided in an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of another target element after rotation provided in an embodiment of the present application;

[0023] Figure 7 is a schematic diagram of the rebound of a target element provided in an embodiment of the present application;

[0024] Figure 8 is a schematic diagram of the rebound of another target element provided in an embodiment of the present application;

[0025] Fig. 9 is a schematic diagram of the rebound of another target element provided in an embodiment of the present application;

[0026] Fig.10 It is a flowchart of another interface control method provided in an embodiment of the present application;

[0027] Fig.11 is a structural schematic diagram of an interface control device provided in an embodiment of the present application;

[0028] Fig.12 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0030] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0031] In the related art, since the interactive tablet supporting writing function only supports single-sided writing, but not unlimited page writing, when moving elements in the display interface in the interactive tablet, the elements may be moved outside the current display interface. If the elements are moved outside the current display interface, the data of some elements outside the current display interface will be lost. In order to avoid the situation that the elements are blocked by the interface when they are moved, so that the user cannot see some data of the elements, and to prevent the loss of some data of the elements outside the display interface, the existing interactive tablets often adopt a strategy of limiting the movable range of the elements, that is, prohibiting the elements from moving beyond the boundaries of the display interface, and prohibiting the elements from exceeding the boundaries of the display interface when they are created; however, this type of existing strategy will bring many restrictions to user operations, resulting in a bad interactive experience; therefore, for interactive tablets that do not support unlimited page writing, how to avoid losing element data and improve the user's interactive experience during the element movement process is a technical problem that needs to be solved urgently.

[0032] The present application is described in detail below with reference to specific embodiments.

[0033] See also Figure 1 , is a schematic diagram of a scenario of an interface control method provided in an embodiment of the present application. Figure 1 As shown, the terminal provides a human-computer interaction interface, and the user can perform interactive operations in the human-computer interaction interface. For example, Figure 1 The human-computer interaction interface shown may be a writing interface, and the user may perform writing operations in the writing interface.

[0034] It should be noted that the terminal to which the interface control method provided in the embodiment of the present application is applied includes but is not limited to mobile phones, personal computers, laptops, interactive tablets and other terminal devices with display functions. Optionally, the terminal has a touch screen, and operations can be performed on the touch screen by a writing pen, a user's finger, etc.

[0035] An interactive tablet can be an integrated device that uses touch technology to control the content displayed on the display screen and realize human-computer interaction operations.

[0036] Typically, the interactive tablet is installed with at least one operating system, wherein the operating system includes but is not limited to Android system, Linux system, Windows system and Huawei Hongmeng system, which is used to control and coordinate the interactive tablet and external devices, so that various independent hardware in the interactive tablet can work in coordination as a stable whole, and the architectural level where the operating system is located is defined as the system layer. On the basis of the system layer, the interactive tablet is installed with applications developed to meet different fields and different problems of users, and the corresponding architectural level is the application layer. In the description of the specific embodiment of this scheme, the interactive tablet can install at least one application with a writing function. Among them, the application with a writing function can be an application that comes with the operating system, and it can also be an application downloaded from a third-party device or server. Optionally, in addition to the writing function based on touch operation, the application also has other editing functions, such as deletion function, inserting tables, inserting pictures, illustration graphics, drawing tables, drawing graphics and other functions.

[0037] The interactive tablet includes at least one display screen. For example, the interactive tablet is equipped with a display screen with a touch function, and the display screen with a touch function can be an infrared display screen, a capacitive display screen, a resistive display screen, an electromagnetic display screen, or a pressure-sensitive display screen. On the display screen with a touch function, the user can touch the display screen with a finger or a writing pen to achieve touch operation. Correspondingly, the interactive tablet detects the touch position and responds according to the touch position to achieve the touch function. When the touch sensing modules used on the display screen with a touch function are different, the original touch signals collected by the touch sensing modules are different, and the converted touch signals are not completely the same.

[0038] For an infrared display screen, the touch sensing module is an infrared touch frame, and the touch signal collected by it may include a signal indicating that the infrared rays are blocked, and the converted touch signal may include a position touch signal, and the position touch signal may include the X coordinate and Y coordinate of the touch position. For a capacitive display screen, the touch sensing module is a capacitive touch panel, and the touch signal collected by it may include the current flowing through each electrode of the touch screen, and the converted touch signal may include a position touch signal, and the position touch signal may include the X coordinate and Y coordinate of the touch position. For a resistive display screen, the touch sensing module is a resistive touch panel, and the touch signal collected by it may include the voltage of the touch position, and the converted touch signal may include a position touch signal, and the position touch signal may include the X coordinate and Y coordinate of the touch position. For an electromagnetic display screen, the touch sensing module is an electromagnetic panel, and the touch signal collected by it may include the change in magnetic flux and the frequency of the received electromagnetic signal, and the converted touch signal may include a position touch signal corresponding to the change in magnetic flux and a pressure signal corresponding to the frequency, and the position touch signal may include the X coordinate and Y coordinate of the touch position; the pressure signal may include a pressure value. For a pressure-sensitive display screen, the touch sensing module is a pressure sensor, and the touch signal collected by the touch sensing module may include a pressure signal. The converted touch signal may include a position touch signal, and the position touch signal may include an X coordinate and a Y coordinate of the touch position.

[0039] In an embodiment of the present application, an element movement instruction for a target element in a target interface is received, the target element is controlled to move the element based on the element movement instruction, and it is detected whether the target element moves to the display boundary of the target interface. If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. When the embodiment of the present application moves the target element in the target interface, if it is detected that the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. Therefore, the embodiment of the present application can control the target element to always be displayed in the target interface, avoiding the problem of data loss of the target element caused by the target element moving outside the target interface.

[0040] In the following method embodiments, for the sake of convenience, only the execution subject of each step is introduced and described as the terminal.

[0041] See also Figure 2 , is a flow chart of an interface control method provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0042] S201, receiving an element movement instruction for a target element in a target interface.

[0043] It is easy to understand that the target interface may refer to a display interface in the terminal that supports editing operations. The editing operations may include writing operations and other editing operations. Other editing operations may refer to operations such as inserting a table, inserting a document, inserting a picture, and drawing operations.

[0044] The target element may refer to the editing object corresponding to the editing operation in the target interface. Specifically, when the editing operation is a writing operation, the target element may be the writing handwriting. When the editing operation is the other editing operations mentioned above, the target element may refer to the editing object such as a table, a picture, etc.

[0045] The element movement instruction may refer to an operation instruction acting on a target element to control the movement of the target element. Specifically, when the target element is dragged and moved, the element movement instruction is an element drag instruction; when the target element is controlled to rotate, the element movement instruction is an element rotation instruction.

[0046] In some embodiments, when the user performs a move operation on the target element in the target interface, the terminal may receive an element move instruction formed by the move operation. For example, when the move operation is a translation operation, the terminal may receive an element translation instruction formed by the translation operation. When the move operation is a rotation operation, the terminal may receive an element rotation instruction formed by the rotation operation.

[0047] S202: Control the target element to move based on the element movement instruction, and detect whether the target element moves to the display boundary of the target interface.

[0048] In some embodiments, while the terminal performs an operation of controlling the target element to move the element based on the element movement instruction, the terminal may perform an operation of detecting whether the target element has moved to the display boundary of the target interface. Specifically, the element movement mode corresponding to this implementation mode may be an element translation mode. That is, while the terminal controls the target element to translate the element according to the element movement instruction, it simultaneously detects whether the target element has moved to the display boundary of the target interface.

[0049] In some other embodiments, after the terminal executes an operation of controlling the target element to move the element based on the element movement instruction, the terminal may execute an operation of monitoring whether the target element moves to the display boundary of the target interface. Specifically, the element movement mode corresponding to this implementation mode may be an element rotation mode. That is, the terminal controls the target element to rotate the element according to the element movement instruction, and after the target element completes the element rotation, detects whether the target element moves to the display boundary of the target interface.

[0050] Controlling the target element to move the element based on the element movement instruction can be understood as determining the target position of the target element after the movement according to the element movement instruction, and moving the target element from the initial position to the target position for display. Optionally, both the target position and the initial position can be represented by coordinates. When the element movement mode is the element translation mode, since the translation is an operation in which the user circles the target element for translation, the target position of the target element is constantly changing before a movement operation is completed. When the element movement mode is the element rotation mode, the target position of the target element is a fixed value.

[0051] Detecting whether the target element has moved to the display boundary of the target interface can be understood as detecting the coordinates of the edge points of the target element, obtaining the coordinates of the display boundary of the target interface, comparing the coordinates of the edge points with the coordinates of the display boundary, and determining whether the target element has moved to the display boundary of the target interface. Among them, the coordinates of the edge points of the target element may refer to the coordinates of the edge points of the target element in the reference coordinate system. The reference coordinate system may refer to a coordinate system with the horizontal boundary and the vertical boundary of the target interface as coordinate axes. The coordinates of the display boundary of the target interface may also refer to the coordinates of the display boundary of the target interface in the reference coordinate system. The display boundary of the target interface may be composed of multiple edge points, and the coordinates of the display boundary of the target interface obtained are the coordinates of these edge points. The target element may also have multiple edge points, and if the coordinates of at least one edge point of the target element are the same as the coordinates of any edge point of the display boundary, or the coordinates of at least one edge point of the target element exceed the coordinate range corresponding to the coordinates of the display boundary, it can be determined that the target element has moved to the display boundary of the target interface.

[0052] S203: If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed within the target interface.

[0053] In some embodiments, if the target element moves to the display boundary of the target interface, the designated position of the target element can be determined, and the target element can be adjusted to the designated position for display so that the target element is displayed within the target interface.

[0054] Among them, the designated position may be a coordinate position determined according to the reference coordinates when the target element moves to the display boundary of the target interface. When the target element moves to the horizontal display boundary of the target interface, the designated position may be the coordinate position obtained by changing the vertical coordinate in the reference coordinates and keeping the horizontal coordinate of the reference coordinates unchanged. When the target element moves to the vertical display boundary of the target interface, the designated position may be the coordinate position obtained by changing the horizontal coordinate in the reference coordinates and keeping the vertical coordinate of the reference coordinates unchanged. When the target element moves to the horizontal display boundary of the target interface, and the target element moves to the vertical display boundary of the target interface, the coordinate position obtained by changing the vertical and horizontal coordinates in the reference coordinates.

[0055] The above-mentioned change of the ordinate and / or abscissa in the reference coordinates may be obtained by adding the ordinate and / or abscissa to a preset value to obtain a new ordinate and / or abscissa, or by subtracting the ordinate and / or abscissa from the preset value to obtain a new ordinate and / or abscissa; the selection of addition operation or subtraction operation may be determined by exceeding the upper horizontal display boundary or the lower horizontal display boundary, or by exceeding the left vertical display boundary or the right vertical display boundary. When the element movement mode is the element translation mode, the preset value may be a fixed value. When the element movement mode is the element rotation mode, the preset value may be determined according to the distance that the target element exceeds the display boundary.

[0056] In an embodiment of the present application, an element movement instruction for a target element in a target interface is received, the target element is controlled to move the element based on the element movement instruction, and whether the target element moves to the display boundary of the target interface is detected. If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. When the embodiment of the present application moves the target element in the target interface, if it is detected that the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed in the target interface. Therefore, the embodiment of the present application can control the target element to always be displayed in the target interface, avoiding the problem of data loss of the target element caused by the target element moving outside the target interface; at the same time, when the target element moves to the display boundary, the over-boundary behavior of the target element will be automatically detected, and the display position of the target element will be automatically adjusted. The adjustment operation is a positive feedback to the user's operation behavior, which can further improve the user's interactive experience during the operation.

[0057] See also Figure 3 , is a flow chart of an interface control method provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps:

[0058] S301, receiving an element movement instruction for a target element in a target interface.

[0059] Specifically, see Figure 2 The description of S201 in the illustrated embodiment will not be repeated here.

[0060] S302: Control the target element to move the element based on the element movement instruction.

[0061] In some embodiments, controlling the target element to move the element based on the element movement instruction can be understood as determining the target position of the target element after the movement according to the element movement instruction, and moving the target element from the initial position to the target position for display. Optionally, both the target position and the initial position can be represented by coordinates. When the element movement mode is the element translation mode, since the translation is an operation in which the user circles the target element for translation, the target position of the target element is constantly changing before a movement operation ends. When the element movement mode is the element rotation mode, the target position of the target element is a fixed value.

[0062] S303: Obtain the element moving direction of the target element.

[0063] In some embodiments, when the element movement mode corresponding to the element movement instruction applied is the element translation mode, the step of obtaining the element movement direction of the target element is executed, which may specifically include: obtaining the first center coordinates of the center point of the target element in an initial stationary state, obtaining the second center coordinates of the center point of the target element in a moving state, and determining the element movement direction of the target element based on the target direction of the direction coordinates that change in the second center coordinates relative to the first center coordinates.

[0064] The initial static state refers to the static state of the target element before it moves. Obtaining the first center coordinates of the center point of the target element in the initial static state can be understood as obtaining the first center coordinates of the center point of the target element in the static state before it moves.

[0065] Acquiring the second center coordinates of the center point of the target element in the moving state can be understood as acquiring the second center coordinates of the center point of the target element in the moving process. Since the target element is constantly moving from one position to another during the moving process, the second center coordinates are also changing coordinates during the moving process.

[0066] It should be noted that the first center coordinate and the second center coordinate may be coordinates measured in the same reference coordinate system. The reference coordinate system may refer to a coordinate system with the vertex at the lower left corner of the target interface as the origin and the horizontal boundary of the target interface and the vertical boundary of the target interface intersecting with the vertex as the coordinate axes.

[0067] In some embodiments, determining the element movement direction of the target element based on the target direction of the direction coordinate that changes in the second center coordinate relative to the first center coordinate can include the following steps: if the second center coordinate is different from the first direction coordinate of the first center coordinate, the target direction corresponding to the first direction coordinate is used as the element movement direction of the target element; if the second center coordinate is different from both the first direction coordinate and the second direction coordinate of the first center coordinate, the first direction corresponding to the first direction coordinate and the second direction of the second direction coordinate are used as the element movement direction of the target element, and the first direction coordinate and the second direction coordinate are different direction coordinates.

[0068] Specifically, in the first case above, that is, in the scenario where the first direction coordinates of the second center coordinates are different from those of the first center coordinates, the first direction coordinates may be the horizontal axis coordinates. If the horizontal axis coordinates of the second center coordinates are greater than the horizontal axis coordinates of the first center coordinates, then the target direction may be determined to be horizontally to the right, that is, the element movement direction of the target element is horizontally to the right; if the horizontal axis coordinates of the second center coordinates are less than the horizontal axis coordinates of the first center coordinates, then the target direction may be determined to be horizontally to the left, that is, the element movement direction of the target element is horizontally to the left. Alternatively, the first direction coordinates may be the vertical axis coordinates. If the vertical axis coordinates of the second center coordinates are greater than the vertical axis coordinates of the first center coordinates, then the target direction may be determined to be vertically upward, that is, the element movement direction of the target element is vertically upward; if the vertical axis coordinates of the second center coordinates are less than the vertical axis coordinates of the first center coordinates, then the target direction may be determined to be vertically downward, that is, the element movement direction of the target element is vertically downward.

[0069] In the second case mentioned above, that is, in the scenario where the second center coordinate is different from both the first direction coordinate and the second direction coordinate of the first center coordinate, the first direction coordinate may be the horizontal axis coordinate, and the second direction coordinate may be the vertical axis coordinate. If the horizontal axis coordinate of the second center coordinate is greater than the horizontal axis coordinate of the first center coordinate, and the vertical axis coordinate of the second center coordinate is greater than the vertical axis coordinate of the first center coordinate, then the element movement direction of the target element can be determined as: horizontal to the right plus vertically upward; if the horizontal axis coordinate of the second center coordinate is greater than the horizontal axis coordinate of the first center coordinate, and the vertical axis coordinate of the second center coordinate is less than the first If the ordinate of the center coordinate is the horizontal axis coordinate, the target element's element movement direction can be determined as: horizontal to the right plus vertical downward; if the horizontal axis coordinate of the second center coordinate is less than the horizontal axis coordinate of the first center coordinate, and the vertical axis coordinate of the second center coordinate is greater than the vertical axis coordinate of the first center coordinate, the target element's element movement direction can be determined as: horizontal to the left plus vertical upward; if the horizontal axis coordinate of the second center coordinate is less than the horizontal axis coordinate of the first center coordinate, and the vertical axis coordinate of the second center coordinate is less than the vertical axis coordinate of the first center coordinate, the target element's element movement direction can be determined as: horizontal to the left plus vertical downward. When the first direction coordinate is the ordinate coordinate and the second direction coordinate is the ordinate coordinate, the target element's element movement direction can be determined by referring to the above direction determination process, which will not be repeated here.

[0070] In some other embodiments, when applied to a scenario where the element movement mode corresponding to the element movement instruction is an element rotation mode, the step of obtaining the element movement direction of the target element is executed, which may specifically include: obtaining the target rotation angle and target rotation direction of the target element, obtaining the direction mapping relationship between the preset reference rotation angle, reference rotation direction and reference movement direction, querying the target movement direction corresponding to the target rotation angle and target rotation direction in the direction mapping relationship, and determining the target movement direction as the element movement direction of the target element.

[0071] Among them, the target rotation angle refers to the rotation angle selected for the target element when the user rotates the target element. The target rotation direction refers to the rotation direction selected for the target element when the user rotates the target element. Specifically, the terminal may store a preset direction mapping relationship, and the direction mapping relationship is a mapping relationship between a reference rotation angle, a reference rotation direction, and a reference moving direction. The target moving direction corresponding to the reference rotation angle being the target rotation angle and the reference rotation direction being the target rotation direction may be searched in the direction mapping relationship, and the target moving direction may be used as the element moving direction of the target element.

[0072] For example, there are four directions in the target interface, namely vertically upward, vertically downward, horizontally left, and horizontally right. When the target rotation angle of the target element is 90 degrees and the target rotation direction of the target element is counterclockwise, the target movement directions corresponding to the reference rotation angle of 90 degrees and the reference rotation direction of counterclockwise in the direction mapping table include horizontally right, vertically upward, and horizontally left. Then, the three directions of horizontally right, vertically upward, and horizontally left can be determined as the element movement directions.

[0073] S304: taking edge points in the target element covered by the element moving direction as element edge points of the target element, and obtaining edge coordinates of the element edge points.

[0074] Specifically, the edge points of the target element may include edge points in multiple directions, and the edge points covered by the element movement direction among the multiple edge points may be used as element edge points, and then the edge coordinates of the element edge points in the reference coordinate system may be determined. The reference coordinate system may refer to a coordinate system with the vertex at the lower left corner of the target interface as the origin, and the horizontal boundary of the target interface and the vertical boundary of the target interface intersecting with the vertex as the coordinate axes. For example, the element movement direction of the target element may be horizontal to the right, then the element edge point may be the edge point of the target element covered by the horizontal right direction.

[0075] S305 , taking the edge points covered by the moving direction of the element in the target interface as the interface edge points of the target interface, and acquiring the reference edge coordinates of the interface edge points.

[0076] Specifically, the target interface has multiple boundaries, so there are also edge points in multiple directions in the target boundary. The edge points covered by the element movement direction among these edge points can be used as interface edge points, and then the reference edge coordinates of the interface boundary points in the reference coordinate system can be determined. The interpretation of the reference coordinate system can be specifically referred to in S304, which will not be repeated here. For example, the element movement direction of the target element can be vertically upward, then the interface edge point can be the interface edge point covered by the vertical upward direction in the target interface, that is, the interface edge point constituting the upper boundary in the target interface.

[0077] S306: Detect whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates.

[0078] Specifically, the implementation of S306 may include: detecting whether the edge coordinates exceed the reference edge coordinates, and if the edge coordinates exceed the reference edge coordinates, determining that the target element is moved to the display boundary of the target interface. It is easy to understand that if the edge coordinates do not exceed the reference edge coordinates, it can be determined that the target element is not moved to the display boundary of the target interface.

[0079] The edge coordinates exceed the reference edge coordinates, which can be understood as at least one edge coordinate having a first direction coordinate value equal to the first direction coordinate value of the reference edge coordinates, and / or at least one edge coordinate having a first direction coordinate value outside the first direction coordinate value of the reference edge coordinates, that is, there may be one / more edge coordinates whose X direction coordinate value is equal to the X direction coordinate value of the reference edge coordinates, and / or one / more edge coordinates whose X direction coordinate value is outside the X direction coordinate value of the reference edge coordinates; or there may be one / more edge coordinates whose Y direction coordinate value is equal to the Y direction coordinate value of the reference edge coordinates, and / or there may be one / more edge coordinates whose Y direction coordinate value is outside the Y direction coordinate value of the reference edge coordinates. For example, the reference edge point is an edge point on the boundary of the target interface in the horizontal left direction, and the horizontal axis coordinates of the reference edge coordinates are all 0, while there is one / more edge coordinates whose horizontal axis coordinate is 0; or there is one / more edge coordinates whose horizontal axis coordinate is a negative number, that is, outside 0, then the above two situations can be called edge coordinates exceeding the reference edge coordinates.

[0080] S307, when the element movement mode corresponding to the element movement instruction is the element rotation mode, if the target element moves to the display boundary of the target interface, the boundary exceeding distance and boundary exceeding direction for the target element are determined based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary.

[0081] It is easy to understand that the boundary exceeding distance and boundary exceeding direction for the target element may include the boundary exceeding distance and boundary exceeding direction of multiple element edge points exceeding the display boundary.

[0082] Specifically, the step of determining the boundary excess distance and boundary excess direction for the target element based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary may include: calculating the maximum vertical distance between the element edge point of the target element and the display boundary based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary; using the maximum vertical distance as the boundary excess distance for the target element, and using the direction of the display boundary as the boundary excess direction for the target element.

[0083] The element edge point coordinates may refer to the edge coordinates of the element edge point of the target element, and the reference edge point coordinates may refer to the reference edge coordinates of the interface edge point located on the display boundary.

[0084] Since the line segment between the element edge point and one of the interface edge points is perpendicular to the display boundary, the distance between the element edge point and the interface edge point can be calculated. This distance is the vertical distance between the element edge point and the display boundary, which can be calculated by the edge coordinates of the element edge point and the reference edge coordinates of the interface edge point. When there are multiple element edge points in the same direction, multiple vertical distances can be calculated, and the maximum vertical distance in the direction can be obtained by comparing the sizes of multiple vertical distances. When there is one element edge point, a vertical distance can be calculated, which can be used as the maximum vertical distance between the element edge point of the target element and the display boundary.

[0085] For example, see Figure 4 A schematic diagram of a target element after rotation is shown. Figure 4 The target interface and the target element in the target interface are shown. The target element can be a picture. The points on the line segment AB and the points on the line segment AD are both element edge points in the target element. It can be observed from the figure that the length of the line segment AA1 is the maximum vertical distance between the element edge point and the display boundary. Therefore, the length of the line segment AA1 is the boundary excess distance for the target element. Since the direction of the display boundary where A1 is located is horizontally to the right, the boundary excess direction for the target element is horizontally to the right. According to the coordinates of A1 (x1, b) and the coordinates of A (a, b), it can be determined that the boundary excess distance is a-x1.

[0086] For example, see Figure 5 A schematic diagram of another target element after rotation is shown. Figure 5 The target interface and the target element in the target interface are shown. The target element can be a picture. The points on the line segment AB and the points on the line segment AD are both element edge points in the target element. It can be observed from the figure that the length of the line segment AA1 is the maximum vertical distance between the element edge point and the display boundary. Therefore, the length of the line segment AA1 is the boundary excess distance for the target element. Since the direction of the display boundary where A1 is located is vertically downward, the boundary excess direction for the target element is vertically downward. According to the coordinates of A1 (a, y1) and the coordinates of A (a, y2), it can be determined that the boundary excess distance is y2-y1.

[0087] For another example, see Figure 6 A schematic diagram of another target element after rotation is shown. Figure 6The target interface and the target element in the target interface are shown, and the target element can be a picture. The points on the line segment AB, the points on the line segment AD, the points on the line segment PJ, and the points on the line segment PK are all element edge points in the target element. It can be observed from the figure that the length of the line segment AA1 is the maximum vertical distance between the element edge point and the vertically downward display boundary, and the length of the line segment PP1 is the maximum vertical distance between the element edge point and the horizontally right display boundary. Therefore, the length of the line segment AA1 is the boundary exceeding distance in the vertical downward direction, and the length of the line segment PP1 is the boundary exceeding distance in the horizontal right direction. Therefore, the boundary exceeding direction for the target element includes two directions, vertically downward and horizontally right. According to the coordinates (a, y1) of A1 and the coordinates (a, y2) of A, it can be determined that the boundary exceeding distance in the vertical downward direction is y2-y1; according to the coordinates (x2, b) of P1 and the coordinates (x1, b) of P, it can be determined that the boundary exceeding distance in the horizontal right direction is x2-x1.

[0088] S308: Taking the direction opposite to the boundary exceeding direction as the moving rebound direction, and adjusting the position rebound of the target element based on the moving rebound direction and the boundary exceeding distance, so that the target element is displayed in the target interface.

[0089] In some embodiments, in a scenario where the movement rebound direction is one direction, the step of adjusting the position rebound of the target element based on the movement rebound direction and the boundary exceeding distance so that the target element is displayed in the target interface may specifically include:

[0090] A1: Get the target edge point covered by the moving rebound direction in the target element, and use the target edge point as the reference element edge point;

[0091] Specifically, the edge points of the target element may include edge points in multiple directions, and the edge points covered by the moving rebound direction among the multiple edge points may be used as target edge points, and then the target edge points may be used as reference element edge points. In a more popular understanding, the reference element edge points and the element edge points in S304 are edge points in the target element in opposite directions.

[0092] A2: Get the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction;

[0093] It is easy to understand that the reference boundary distance refers to the vertical distance from the edge point of the reference element to the display boundary covered by the moving rebound direction.

[0094] Specifically, the step of obtaining the reference boundary distance of the edge point of the reference element from the target interface in the moving rebound direction may include: obtaining the first edge coordinate of the edge point of the reference element; taking the display boundary covered in the moving rebound direction as the rebound display boundary, and obtaining the first reference edge coordinate of the rebound display boundary; based on the first edge coordinate and the first reference edge coordinate, calculating the minimum vertical distance between the edge point of the reference element and the rebound display boundary; and taking the minimum vertical distance as the reference boundary distance of the edge point of the reference element from the target interface in the moving rebound direction.

[0095] The first edge coordinates are the coordinates of the edge point of the reference element in the reference coordinate system. The definition of the reference coordinate system can be found in the description in S304, which will not be repeated here.

[0096] The first reference edge coordinates may refer to coordinates of the interface edge points constituting the rebound display boundary in the reference coordinate system.

[0097] Since the line segment between the reference element edge point and a certain interface edge point on the rebound display boundary is perpendicular to the rebound display boundary, the distance between the reference edge point and the interface edge point can be calculated. This distance is the vertical distance between the reference element edge point and the rebound display boundary, which can be calculated by the first edge coordinate of the reference element edge point and the first reference edge coordinate of the interface edge point. When there are multiple reference element edge points in one direction, multiple vertical distances in this direction can be calculated, and then the minimum vertical distance in this direction can be obtained by comparing the sizes of multiple vertical distances. When there is a reference element edge point, a vertical distance can be calculated, which can be used as the minimum vertical distance, that is, the reference boundary distance of the reference element edge point from the target interface in the moving rebound direction.

[0098] For example, see Figure 4 A schematic diagram of a target element after rotation is shown. The reference element edge points in the opposite direction to the element edge points include point C and the edge points around point C. The moving rebound direction is horizontal to the left. Therefore, the length of line segment CC1 is the minimum vertical distance between the reference element edge point and the rebound display boundary, that is, the length of line segment CC1 is the reference boundary distance of the reference element edge point from the target interface in the moving rebound direction. According to the coordinates of C1 (x2,n) and C (m,n), the reference boundary distance can be determined to be m-x2.

[0099] For example, see Figure 5Another schematic diagram of a target element after rotation is shown. The reference element edge points in the opposite direction to the element edge points include point C and the edge points around point C. The moving rebound direction is vertically upward. Therefore, the length of line segment CC1 is the minimum vertical distance between the reference element edge point and the rebound display boundary, that is, the length of line segment CC1 is the reference boundary distance of the reference element edge point from the target interface in the moving rebound direction. According to the coordinates of C1 (m, y3) and C (m, n), the reference boundary distance can be determined to be y3-n.

[0100] For another example, see Figure 6 A schematic diagram of another target element after rotation is shown. Figure 6 The element edge points in two directions (i.e., the edge points beyond the display boundary) are included, and naturally, the reference element edge points in two directions (i.e., the edge points in the opposite direction to the edge points beyond the display boundary) are also included. The reference element edge points in the opposite direction to the element edge point A include point C and the edge points around point C, and the corresponding movement rebound direction is vertically upward. Therefore, the length of line segment CC1 is the minimum vertical distance between the reference element edge point and the rebound display boundary in the vertically upward direction, that is, the length of line segment CC1 is the reference boundary distance of the reference element edge point from the target interface in the vertically upward direction. The reference element edge points in the opposite direction to the element edge point P include point Q and the edge points around point Q, and the corresponding movement rebound direction is horizontally leftward. Therefore, the length of line segment QQ1 is the minimum vertical distance between the reference element edge point and the rebound display boundary in the horizontally leftward direction, that is, the length of line segment QQ1 is the reference boundary distance of the reference element edge point from the target interface in the horizontally leftward direction. According to the coordinates (m, y3) of C1 and the coordinates (m, n) of C, the reference boundary distance in the vertically upward direction can be determined to be y3-n. According to the coordinates (x3, v) of Q1 and the coordinates (u, v) of Q, it can be determined that the reference boundary distance in the horizontal left direction is u-x3.

[0101] A3: Determine the minimum distance from the reference boundary distance and the boundary exceeding distance, and determine the minimum distance as the target distance;

[0102] Specifically, the reference boundary distance and the boundary exceeding distance are detected, and the minimum value between the two is determined. The minimum value is the minimum distance, and then the minimum distance can be used as the target distance.

[0103] A4: Perform position rebound processing on the target element based on the target distance and the moving rebound direction;

[0104] The target element is subjected to position rebound processing based on the target distance and the moving rebound direction. It can be understood that the target element is moved as a whole in the moving rebound direction by the target distance to achieve position rebound processing of the target element.

[0105] For example, see Figure 7 A schematic diagram of the rebound of a target element is shown in FIG. Figure 4 In the example shown, the reference boundary distance m-x2 is greater than the boundary excess distance a-x1, then the boundary excess distance a-x1 can be determined as the target distance, and the target element can be moved horizontally to the left by the target distance a-x1. The moved target element can be seen in Figure 5 The target element shown in the solid rectangle is the target element before moving. Figure 5 The target element is shown in the dashed rectangle.

[0106] For example, see Figure 8 Another schematic diagram of the rebound of the target element is shown in Figure 1. Figure 5 In the example shown, the reference boundary distance y3-n is greater than the boundary excess distance y2-y1, then the boundary excess distance y2-y1 can be determined as the target distance, and the target element can be moved vertically upward by the target distance y2-y1. The moved target element can be seen in Figure 8 The target element shown in the solid rectangle is the target element before moving. Figure 8 The target element is shown in the dashed rectangle.

[0107] For example, see Fig. 9 A schematic diagram of the rebound of another target element is shown in FIG. Figure 6 In the example shown, when one movement rebound direction is the vertical upward direction, the reference boundary distance y3-n is greater than the boundary excess distance y2-y1, and the boundary excess distance y2-y1 can be used as the first target distance; when another movement rebound direction is the horizontal left direction, assuming that the reference boundary distance u-x3 is greater than the boundary excess distance x1-x2, the boundary excess distance x1-x2 can be used as the second target distance. Assuming that the vertical upward boundary excess distance y2-y1 is greater than the horizontal left boundary excess distance x1-x2, the target element can be moved along the first movement rebound direction (i.e., the vertical upward direction) by the first target distance, and then the target element can be moved along the second movement rebound direction (i.e., the horizontal left direction) by the second target distance. Fig. 9 The target element shown in the middle dashed box is the target element before rebound, the thick solid line box is the target element after rebounding along the first movement rebound direction, and the thin solid line box is the target element after rebounding along the second movement rebound direction. Fig. 9 It can be seen that after two rebound operations in different directions, the target element can be within the target interface.

[0108] A5: Check whether the edge rebound position of the element edge point is outside the target interface;

[0109] Specifically, since the target element moves the target distance in the moving rebound direction, the edge coordinates of the edge point of the element will also change after the movement. The edge rebound position may refer to the position of the edge coordinates of the edge point of the element after the edge point moves the target distance. Whether the edge rebound position of the edge point of the element is outside the target interface can be detected by detecting whether the edge rebound position of the edge point of the element is outside the reference edge coordinates.

[0110] A6: If the edge rebound position is outside the target interface, the target element is displayed and scaled with reference to the edge point of the reference element so that the target element is displayed within the target interface.

[0111] In some embodiments, if the edge rebound position is outside the target interface, the target edge coordinates corresponding to the element edge point at the edge rebound position can be determined in the reference edge coordinates of the target interface, and the first distance between the target edge coordinates and the coordinates of the reference element edge point is calculated. The second distance between the coordinates of the element edge point at the edge rebound position and the coordinates of the reference element edge point is calculated, and the ratio of the first distance to the second distance is calculated. The ratio is used as a reduction ratio, and the reference element edge point is used as a reference. The target element is displayed on the target interface using the reduction ratio.

[0112] Optionally, in some embodiments, in a scenario where the number of boundary excess directions is multiple, the number of movement rebound directions is naturally multiple as well. In this case, a position rebound adjustment of the target element is performed based on the movement rebound direction and the boundary excess distance so that the target element is displayed in the target interface. Specifically, it may be: if the movement rebound direction includes multiple first movement rebound directions, then the maximum boundary excess distance is determined among the boundary excess distances corresponding to the multiple first movement rebound directions, and the first movement rebound direction corresponding to the maximum boundary excess distance is determined as the target movement rebound direction; based on the target movement rebound direction and the maximum boundary excess distance, the target element is position rebound adjusted so that the target element is displayed in the target interface. Specifically, the position rebound of the target element is adjusted based on the target movement rebound direction and the maximum boundary excess distance, so that the target element is displayed within the target interface. It can be understood that the position rebound of the target element is adjusted based on the target movement rebound direction and the maximum boundary excess distance, so that the target element does not exceed the display boundary covered by the target movement rebound direction; further, the position rebound of the target element can be continued to be adjusted according to the remaining movement rebound directions in the first movement rebound direction and the boundary excess distances of the remaining rebound directions, so that the target element does not exceed the display boundary covered by the remaining movement rebound directions, so that the target element is located as a whole within the display interface. At the same time, it should be noted that by performing a position rebound adjustment on the target element instead of directly limiting the movable boundary of the target element and directly prohibiting the target element from exceeding the boundary, the user will not intuitively feel many restrictions during the operation of the target element, nor will he or she intuitively feel the constraints of the boundary conditions of the display interface. When the user moves, rotates, and other operations on the target element, the target element is freely transformable during the operation. After the user completes the operation, the terminal device automatically detects the position of the target element and determines whether to perform a rebound adjustment. This can bring a positive behavioral feedback to the user in the interactive experience, which can further enhance the user's interactive experience.

[0113] Optionally, in the embodiment of the present application, S307-S308 is described by taking the edge points that exceed the display boundary of the target interface in one direction as an example. If there are edge points that exceed the display boundary of the target interface in two directions, the operations of S307-S308 can be used to process the edge points that exceed the display boundary of the target interface in one direction first. After processing, if there are still edge points in the target element that exceed the display boundary of the target interface in another direction, the operations of S307-S308 can be returned to execute so that all the target elements are displayed in the target interface.

[0114] In an embodiment of the present application, when the element movement mode corresponding to the element movement instruction is the element rotation mode, when it is detected that the target element exceeds the target boundary of the target interface, the boundary exceeding distance and boundary exceeding direction for the target element are determined based on the element edge point of the target element and the reference edge coordinates of the target interface, and the movement rebound direction relative to the boundary exceeding direction is determined. The position rebound adjustment of the target element is performed based on the movement rebound direction and the boundary exceeding distance. When the rebound adjustment still cannot satisfy the target element not exceeding the target boundary, the target element is scaled to display the target element in the target interface. Therefore, the embodiment of the present application can display the rotated target element in the target interface without changing the size of the target element, avoiding the problem of target element data loss caused by the target element exceeding the target interface after rotation. When the size of the target element is not changed, and the target element still cannot be displayed in the target interface, the target element is scaled to avoid data loss of the target element.

[0115] See also Fig.10 , is a flow chart of an interface control method provided in an embodiment of the present application. Fig.10 As shown, the method of the embodiment of the present application may include the following steps:

[0116] S1001, receiving an element movement instruction for a target element in a target interface.

[0117] S1002, controlling the target element to move the element based on the element movement instruction.

[0118] S1003, obtaining the element moving direction of the target element.

[0119] S1004: taking edge points in the target element covered by the element moving direction as element edge points of the target element, and obtaining edge coordinates of the element edge points.

[0120] S1005: Taking edge points covered by the moving direction of the element in the target interface as interface edge points of the target interface, and obtaining reference edge coordinates of the interface edge points.

[0121] S1006: Detect whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates.

[0122] Specifically, the description of S1001-S1006 can be found in Figure 3 The description of S301 - S306 in the illustrated embodiment will not be repeated here.

[0123] S1007: If the target element moves to the display boundary of the target interface, output out-of-bounds reminder information.

[0124] In some embodiments, when the element movement mode corresponding to the element movement instruction is the element translation mode, if the target element moves to the display boundary of the target interface, an out-of-bounds reminder message can be output through a message prompt box. Among them, the out-of-bounds reminder message can be a reminder message that the target element has moved to the display boundary. Optionally, the exemplary text of the reminder message can be: "Moved to the display boundary, if you continue to move, data will be lost". The message prompt box can use a color prompt box that is different from the color shown in the target interface.

[0125] S1008, detecting an element operation instruction for the target element.

[0126] In some embodiments, after the out-of-bounds reminder information is output, an element operation instruction for the target element may be detected.

[0127] S1009: If the instruction type of the element operation instruction is an element release type, cancel the out-of-bounds reminder information.

[0128] In some embodiments, if the instruction type of the detected element operation instruction is an element release type, that is, the user performs an operation of releasing the target element, the output of the out-of-bounds reminder information is cancelled.

[0129] S1010, if the instruction type of the element operation instruction is an element movement type, then executing the step of adjusting the display position of the target element so that the target element is displayed in the target interface.

[0130] In some embodiments, if the instruction type of the detected element operation instruction is an element movement type, that is, the user performs a movement operation on the target element, the target element can be moved in the opposite direction of the movement operation to adjust the display position of the target element so that the target element is displayed in the target interface.

[0131] Optionally, if the instruction type of the element operation instruction is an element movement type, the element operation instruction is ignored. Specifically, ignoring the element operation instruction can be understood as not responding to the element operation instruction, that is, not responding to the element operation instruction.

[0132] In an embodiment of the present application, when the element movement mode corresponding to the element movement instruction is the element translation mode, when it is detected that the target element exceeds the target boundary of the target interface, an out-of-bounds reminder message is output, and the element operation instruction for the target element is detected. If the instruction type of the element operation instruction is the element release type, the out-of-bounds reminder message is canceled, and if the instruction type of the element operation instruction is the element movement type, the step of adjusting the display position of the target element is performed so that the target element is displayed in the target interface. Therefore, in an embodiment of the present application, when the target element performs a translation movement, the out-of-bounds reminder message is output to remind the user not to move the target element out of the target interface, thereby avoiding the problem of data loss of the target element due to the target element being moved out of the target interface. It is also possible to adjust the display position of the target element so that the target element is displayed in the target interface when the target element has reached the display boundary of the target interface and the user continues to move the target element, thereby avoiding the problem of data loss of the target element due to the target element being moved out of the target interface.

[0133] See also Fig.11 , is a schematic diagram of the structure of an interface control device provided in an embodiment of the present application. The interface control device 1100 can be implemented as all or part of the terminal through software, hardware, or a combination of both. The interface control device 1100 includes:

[0134] The instruction acquisition module 1110 is used to receive an element movement instruction for a target element in a target interface;

[0135] An element movement module 1120 is used to control the target element to move based on the element movement instruction, and detect whether the target element moves to the display boundary of the target interface;

[0136] The element adjustment module 1130 is used to adjust the display position of the target element if the target element moves to the display boundary of the target interface, so that the target element is displayed within the target interface.

[0137] Optionally, the element moving module 1120 includes:

[0138] A first processing unit, used for obtaining an element moving direction of a target element;

[0139] The second processing unit is used to take the edge points covered by the element moving direction in the target element as the element edge points of the target element, and obtain the edge coordinates of the element edge points;

[0140] A third processing unit is used to take the edge points covered by the moving direction of the element in the target interface as the interface edge points of the target interface, and obtain the reference edge coordinates of the interface edge points;

[0141] The fourth processing unit is used to detect whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates.

[0142] Optionally, the element movement mode corresponding to the element movement instruction is an element translation mode, and the first processing unit includes:

[0143] A first acquisition subunit, used to acquire a first center coordinate of a center point of a target element in an initial static state;

[0144] A second acquisition subunit is used to acquire a second center coordinate of the center point of the target element in a moving state;

[0145] The third acquisition subunit is used to determine the element movement direction of the target element based on the target direction of the direction coordinates changed in the second center coordinates relative to the first center coordinates.

[0146] Optionally, the third acquisition subunit is used to:

[0147] If the first direction coordinate of the second center coordinate is different from the first center coordinate, the target direction corresponding to the first direction coordinate is used as the element movement direction of the target element;

[0148] If the first direction coordinate and the second direction coordinate of the second center coordinate are different from those of the first center coordinate, the first direction corresponding to the first direction coordinate and the second direction of the second direction coordinate are used as the element movement direction of the target element, and the first direction coordinate and the second direction coordinate are direction coordinates of different directions.

[0149] Optionally, the element movement mode corresponding to the element movement instruction is an element rotation mode, and the first processing unit includes:

[0150] A first rotation processing unit, used to obtain a target rotation angle and a target rotation direction of a target element;

[0151] The second rotation processing unit is used to obtain a direction mapping relationship between a preset reference rotation angle, a reference rotation direction and a reference movement direction, query a target movement direction corresponding to the target rotation angle and the target rotation direction in the direction mapping relationship, and determine the target movement direction as the element movement direction of the target element.

[0152] Optionally, the fourth processing unit is configured to:

[0153] Detect whether the edge coordinates exceed the reference edge coordinates;

[0154] If the edge coordinates exceed the reference edge coordinates, it is determined that the target element is moved to the display boundary of the target interface.

[0155] Optionally, the interface control device further includes:

[0156] The information output module is used to output out-of-bounds reminder information if the target element moves to the display boundary of the target interface.

[0157] Optionally, the interface control device further includes:

[0158] A first detection module, used to detect an element operation instruction for a target element;

[0159] The second detection module is used for canceling the output of the out-of-bounds reminder information if the instruction type of the element operation instruction is an element release type;

[0160] The third detection module is used to execute the step of adjusting the display position of the target element so that the target element is displayed in the target interface if the instruction type of the element operation instruction is the element movement type, or to ignore the element operation instruction.

[0161] Optionally, the element adjustment module includes:

[0162] A second adjustment unit is used to determine a boundary exceeding distance and a boundary exceeding direction for the target element based on the element edge point coordinates of the target element and the reference edge point coordinates of the target interface;

[0163] The third adjustment unit is used to use the opposite direction of the boundary exceeding direction as the movement rebound direction, and adjust the position rebound of the target element based on the movement rebound direction and the boundary exceeding distance, so that the target element is displayed in the target interface.

[0164] Optionally, the second adjustment unit is used to:

[0165] Calculate the maximum vertical distance between the element edge point of the target element and the display boundary based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary;

[0166] Use the maximum vertical distance as the border-exceeding distance for the target element and the direction of the display border as the border-exceeding direction for the target element.

[0167] Optionally, a third adjustment unit is used to:

[0168] If the movement rebound direction includes a plurality of first movement rebound directions, determining a maximum boundary exceeding distance among the boundary exceeding distances respectively corresponding to the plurality of first movement rebound directions, and determining the first movement rebound direction corresponding to the maximum boundary exceeding distance as the target movement rebound direction;

[0169] The position of the target element is adjusted based on the target movement rebound direction and the maximum boundary excess distance, so that the target element is displayed within the target interface.

[0170] Optionally, the third adjustment unit includes:

[0171] The first adjustment subunit is used to obtain the target edge point covered by the moving rebound direction in the target element, and use the target edge point as the reference element edge point;

[0172] The second adjustment subunit is used to obtain the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction;

[0173] A third adjustment subunit is used to determine a minimum distance from the reference boundary distance and the boundary exceeding distance, and determine the minimum distance as the target distance;

[0174] The fourth adjustment subunit is used to perform position rebound processing on the target element based on the target distance and the moving rebound direction;

[0175] A fifth adjustment subunit, used for detecting whether the edge rebound position of the edge point of the element is outside the target interface;

[0176] The sixth adjustment subunit is used to perform display scaling processing on the target element with reference to the edge point of the reference element if the edge rebound position is outside the target interface, so that the target element is displayed within the target interface.

[0177] Optionally, the second adjustment subunit is used to:

[0178] Get the first edge coordinate of the edge point of the reference element;

[0179] Taking the display boundary covered by the moving rebound direction as the rebound display boundary, obtaining the first reference edge coordinate of the rebound display boundary;

[0180] Calculate the minimum vertical distance between the reference element edge point and the rebound display boundary based on the first edge coordinate and the first reference edge coordinate;

[0181] The minimum vertical distance is taken as the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction.

[0182] Please refer to Fig.12 , Fig.12 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Fig.12 As shown, the terminal 1200 may include: at least one processor 1201 , at least one network interface 1204 , a user interface 1203 , a memory 1205 , a display screen component 1206 , and at least one communication bus 1202 .

[0183] The communication bus 1202 is used to realize the connection and communication between these components.

[0184] The user interface 1203 may include a display screen (Display) and a camera (Camera), and the optional user interface 1203 may also include a standard wired interface and a wireless interface.

[0185] The network interface 1204 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0186] Among them, the processor 1201 may include one or more processing cores. The processor 1201 uses various interfaces and lines to connect various parts in the entire terminal 1200, and executes various functions and processes data of the terminal 1200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1205, and calling data stored in the memory 1205. Optionally, the processor 1201 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1201 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1201, and it can be implemented separately through a chip.

[0187] Among them, the memory 1205 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1205 includes a non-transitory computer-readable storage medium. The memory 1205 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1205 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1205 may also be optionally at least one storage device located away from the aforementioned processor 1201. As Fig.12 As shown, the memory 1205 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a program of an interface control method.

[0188] exist Fig.12 In the terminal 1200 shown, the user interface 1203 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1201 can be used to call the program of the interface control method stored in the memory 1205, and specifically perform the following operations:

[0189] Receive an element movement instruction for a target element in a target interface;

[0190] Controlling the target element to move the element based on the element movement instruction, and detecting whether the target element moves to the display boundary of the target interface;

[0191] If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed within the target interface.

[0192] In one embodiment, when the processor 1201 executes the detection of whether the target element moves to the display boundary of the target interface, the processor 1201 specifically performs the following operations:

[0193] Get the element movement direction of the target element;

[0194] The edge points covered by the element moving direction in the target element are taken as the element edge points of the target element, and the edge coordinates of the element edge points are obtained;

[0195] The edge points covered by the moving direction of the element in the target interface are taken as the interface edge points of the target interface, and the reference edge coordinates of the interface edge points are obtained;

[0196] Based on the edge coordinates and the reference edge coordinates, it is detected whether the target element moves to the display boundary of the target interface.

[0197] In one embodiment, when the processor 1201 executes the acquisition of the element moving direction of the target element, the processor 1201 specifically performs the following operations:

[0198] Obtain the first center coordinate of the center point of the target element in the initial static state;

[0199] Get the second center coordinates of the center point of the target element in the moving state;

[0200] An element movement direction of the target element is determined based on the target direction of the direction coordinates in the second center coordinates that are changed relative to the first center coordinates.

[0201] In one embodiment, when the processor 1201 determines the element movement direction of the target element based on the target direction of the direction coordinates changed in the second center coordinates relative to the first center coordinates, the processor 1201 specifically performs the following operations:

[0202] If the first direction coordinate of the second center coordinate is different from the first center coordinate, the target direction corresponding to the first direction coordinate is used as the element movement direction of the target element;

[0203] If the first direction coordinate and the second direction coordinate of the second center coordinate are different from those of the first center coordinate, the first direction corresponding to the first direction coordinate and the second direction of the second direction coordinate are used as the element movement direction of the target element, and the first direction coordinate and the second direction coordinate are direction coordinates of different directions.

[0204] In one embodiment, when the processor 1201 executes the acquisition of the element moving direction of the target element, the processor 1201 specifically performs the following operations:

[0205] Get the target rotation angle and target rotation direction of the target element;

[0206] Obtain a direction mapping relationship between a preset reference rotation angle, a reference rotation direction and a reference movement direction, query a target movement direction corresponding to the target rotation angle and the target rotation direction in the direction mapping relationship, and determine the target movement direction as the element movement direction of the target element.

[0207] In one embodiment, when the processor 1201 detects whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates, the processor 1201 specifically performs the following operations:

[0208] Detect whether the edge coordinates exceed the reference edge coordinates;

[0209] If the edge coordinates exceed the reference edge coordinates, it is determined that the target element is moved to the display boundary of the target interface.

[0210] In one embodiment, after detecting whether the target element has moved to the target interface, the processor 1201 further performs the following operations:

[0211] If the target element moves to the display boundary of the target interface, an out-of-bounds reminder message is output.

[0212] In one embodiment, after outputting the out-of-bounds reminder information, the processor 1201 further performs the following operations:

[0213] Detecting element operation instructions for target elements;

[0214] If the instruction type of the element operation instruction is the element release type, the out-of-bounds reminder message is output;

[0215] If the instruction type of the element operation instruction is an element movement type, the step of adjusting the display position of the target element is performed so that the target element is displayed in the target interface, or the element operation instruction is ignored.

[0216] In one embodiment, when the processor 1201 adjusts the display position of the target element so that the target element is displayed in the target interface, the processor 1201 specifically performs the following operations:

[0217] Determine a boundary exceeding distance and a boundary exceeding direction for the target element based on the element edge point coordinates of the target element and the reference edge coordinates of the display boundary;

[0218] The opposite direction of the boundary exceeding direction is used as the moving rebound direction, and the position rebound of the target element is adjusted based on the moving rebound direction and the boundary exceeding distance, so that the target element is displayed in the target interface.

[0219] In one embodiment, when the processor 1201 determines the boundary exceeding distance and boundary exceeding direction for the target element based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary, the processor 1201 specifically performs the following operations:

[0220] Calculate the maximum vertical distance between the element edge point of the target element and the display boundary based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary;

[0221] Use the maximum vertical distance as the border-exceeding distance for the target element and the direction of the display border as the border-exceeding direction for the target element.

[0222] In one embodiment, the processor 1201 performs the following operations when performing position rebound adjustment on the target element based on the movement rebound direction and the boundary exceeding distance so that the target element is displayed in the target interface:

[0223] If the movement rebound direction includes a plurality of first movement rebound directions, determining a maximum boundary exceeding distance among the boundary exceeding distances respectively corresponding to the plurality of first movement rebound directions, and determining the first movement rebound direction corresponding to the maximum boundary exceeding distance as the target movement rebound direction;

[0224] The position of the target element is adjusted based on the target movement rebound direction and the maximum boundary excess distance, so that the target element is displayed within the target interface.

[0225] In one embodiment, when the processor 1201 performs position rebound adjustment on the target element based on the movement rebound direction and the boundary exceeding distance so that the target element is displayed in the target interface, the processor 1201 specifically performs the following operations:

[0226] Get the target edge point covered by the moving rebound direction in the target element, and use the target edge point as the reference element edge point;

[0227] Obtain the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction;

[0228] Determine a minimum distance from the reference boundary distance and the boundary exceeding distance, and determine the minimum distance as the target distance;

[0229] Perform position rebound processing on the target element based on the target distance and the moving rebound direction;

[0230] Detect whether the edge rebound position of the element edge point is outside the target interface;

[0231] If the edge rebound position is outside the target interface, the target element is displayed and scaled with reference to the edge point of the reference element so that the target element is displayed within the target interface.

[0232] In one embodiment, the processor 1201 executes the step of obtaining the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction, including:

[0233] Get the first edge coordinate of the edge point of the reference element;

[0234] Taking the display boundary covered by the moving rebound direction as the rebound display boundary, obtaining the first reference edge coordinate of the rebound display boundary;

[0235] Calculate the minimum vertical distance between the reference element edge point and the rebound display boundary based on the first edge coordinate and the first reference edge coordinate;

[0236] The minimum vertical distance is taken as the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction.

[0237] In addition, those skilled in the art can understand that the structure of the terminal 1200 shown in the above figures does not constitute a limitation on the terminal 1200, and the user terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the terminal 1200 also includes components such as a radio frequency circuit, an audio circuit, a WiFi component, a power supply, and a Bluetooth component, which will not be described in detail here.

[0238] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the interface control method described in the above embodiments.

[0239] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the interface control method described in the above embodiments.

[0240] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0241] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An interface control method, characterized in that: The method comprises: Receive an element movement instruction for a target element in a target interface; Controlling the target element to move the element based on the element movement instruction, and detecting whether the target element moves to the display boundary of the target interface; If the target element moves to the display boundary of the target interface, the display position of the target element is adjusted so that the target element is displayed within the target interface.

2. The method according to claim 1, characterized in that The detecting whether the target element moves to the display boundary of the target interface includes: Obtaining the element moving direction of the target element; Taking edge points in the target element covered by the element moving direction as element edge points of the target element, and obtaining edge coordinates of the element edge points; Taking the edge points covered by the moving direction of the element in the target interface as the interface edge points of the target interface, and obtaining the reference edge coordinates of the interface edge points; It is detected whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates.

3. The method according to claim 2, characterized in that The element movement mode corresponding to the element movement instruction is an element translation mode, and obtaining the element movement direction of the target element includes: Acquire a first center coordinate of the center point of the target element in an initial static state; Acquire the second center coordinates of the center point of the target element in a moving state; The element movement direction of the target element is determined based on the target direction of the direction coordinates in the second center coordinates that change relative to the first center coordinates.

4. The method according to claim 3, characterized in that The determining the element movement direction of the target element based on the target direction of the direction coordinates changed in the second center coordinates relative to the first center coordinates includes: If the second center coordinate is different from the first direction coordinate of the first center coordinate, taking the target direction corresponding to the first direction coordinate as the element moving direction of the target element; If the second center coordinate is different from the first direction coordinate and the second direction coordinate of the first center coordinate, the first direction corresponding to the first direction coordinate and the second direction of the second direction coordinate are used as the element movement direction of the target element, and the first direction coordinate and the second direction coordinate are direction coordinates in different directions.

5. The method according to claim 2, characterized in that: The element movement mode corresponding to the element movement instruction is an element rotation mode, and obtaining the element movement direction of the target element includes: Obtaining a target rotation angle and a target rotation direction of the target element; Obtain a direction mapping relationship between a preset reference rotation angle, a reference rotation direction and a reference movement direction, query the target movement direction corresponding to the target rotation angle and the target rotation direction in the direction mapping relationship, and determine the target movement direction as the element movement direction of the target element.

6. The method according to claim 2, characterized in that The detecting whether the target element moves to the display boundary of the target interface based on the edge coordinates and the reference edge coordinates includes: Detecting whether the edge coordinates exceed the reference edge coordinates; If the edge coordinates exceed the reference edge coordinates, it is determined that the target element is moved to the display boundary of the target interface.

7. The method according to claim 1, characterized in that After detecting whether the target element has moved to the target interface, the method further includes: If the target element moves to the display boundary of the target interface, an out-of-bounds reminder message is output.

8. The method according to claim 7, characterized in that After outputting the out-of-bounds reminder information, the following is also included: Detecting an element operation instruction for the target element; If the instruction type of the element operation instruction is an element release type, canceling the output of the out-of-bounds reminder information; If the instruction type of the element operation instruction is an element movement type, the step of adjusting the display position of the target element so that the target element is displayed in the target interface is performed, or the element operation instruction is ignored.

9. The method according to claim 1, characterized in that: The element movement mode corresponding to the element movement instruction is an element rotation mode, and the display position of the target element is adjusted so that the target element is displayed in the target interface, including: Determining a boundary exceeding distance and a boundary exceeding direction for the target element based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary; The opposite direction of the boundary exceeding direction is used as the movement rebound direction, and the position rebound adjustment of the target element is performed based on the movement rebound direction and the boundary exceeding distance, so that the target element is displayed in the target interface.

10. The method according to claim 9, characterized in that The determining, based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary, a boundary exceeding distance and a boundary exceeding direction for the target element, comprises: Calculating a maximum vertical distance between an element edge point of the target element and the display boundary based on the element edge point coordinates of the target element and the reference edge point coordinates of the display boundary; The maximum vertical distance is used as the boundary exceeding distance for the target element, and the direction of the display boundary is used as the boundary exceeding direction for the target element.

11. The method according to claim 9, characterized in that The step of performing position rebound adjustment on the target element based on the movement rebound direction and the boundary exceeding distance so that the target element is displayed in the target interface includes: If the movement rebound direction includes a plurality of first movement rebound directions, determining a maximum boundary exceeding distance among the boundary exceeding distances respectively corresponding to the plurality of first movement rebound directions, and determining the first movement rebound direction corresponding to the maximum boundary exceeding distance as the target movement rebound direction; The target element is adjusted to rebound in position based on the target movement rebound direction and the maximum boundary excess distance, so that the target element is displayed in the target interface.

12. The method according to claim 9, characterized in that The step of performing position rebound adjustment on the target element based on the movement rebound direction and the boundary exceeding distance so that the target element is displayed in the target interface includes: Acquire a target edge point covered by the moving rebound direction in the target element, and use the target edge point as a reference element edge point; Acquire a reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction; Determine a minimum distance from the reference boundary distance and the boundary exceeding distance, and determine the minimum distance as a target distance; Performing position rebound processing on the target element based on the target distance and the moving rebound direction; Detecting whether the edge rebound position of the edge point of the element is outside the target interface; If the edge rebound position is outside the target interface, the target element is displayed and scaled with reference to the edge point of the reference element, so that the target element is displayed within the target interface.

13. The method according to claim 12, characterized in that The obtaining of the reference boundary distance of the edge point of the reference element from the target interface in the moving rebound direction includes: Obtaining a first edge coordinate of an edge point of the reference element; Taking the display boundary covered by the movement rebound direction as the rebound display boundary, and acquiring the first reference edge coordinates of the rebound display boundary; Calculating a minimum vertical distance between the reference element edge point and the rebound display boundary based on the first edge coordinate and the first reference edge coordinate; The minimum vertical distance is used as the reference boundary distance between the edge point of the reference element and the target interface in the moving rebound direction.

14. An interface control device, characterized in that: The device comprises: An instruction acquisition module, used for receiving an element movement instruction for a target element in a target interface; An element movement module, used to control the target element to move based on the element movement instruction, and detect whether the target element moves to the display boundary of the target interface; The element adjustment module is used to adjust the display position of the target element if the target element moves to the display boundary of the target interface, so that the target element is displayed within the target interface.

15. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 13.

16. A terminal, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 13.

Citation Information

Cited By

  • Display device and interface element moving method

    CN121143922A