A dynamic element control method, electronic device and computer readable storage medium

By detecting the movement operation of the floating window and adjusting the position and size of the dynamic elements, the problem of too small visual area caused by the occlusion of the floating window is solved, the operability of the dynamic elements is improved, and the user experience is improved.

CN114253433BActive Publication Date: 2024-09-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011017632.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-24
Publication Date
2024-09-24
Estimated Expiration
2040-09-24

AI Technical Summary

Technical Problem

In existing electronic devices, floating windows block dynamic elements, causing the visible area of ​​information or buttons to be too small, resulting in low operability.

Method used

By detecting the movement operation of the floating window, the adjustment information of the dynamic element is determined, and its position and/or size is adjusted to avoid the floating window and increase the visual area and operability of the dynamic element. Specific methods include obtaining the position information of the floating window and dynamic elements, using a specified function to generate adjustment information, adjusting the position and/or size of the dynamic elements according to the adjustment information, and ensuring that the dynamic elements remain operable when the floating window is moved.

Benefits of technology

It effectively improves the visual area and operability of dynamic elements, reduces the tediousness and cost of user operations, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114253433B
    Figure CN114253433B
Patent Text Reader

Abstract

In a technical solution of a dynamic element control method, electronic device and computer-readable storage medium provided by an embodiment of the present invention, a moving operation of a floating window toward a dynamic element is detected, and adjustment information of the dynamic element is determined; the position and / or size of the dynamic element is adjusted according to the adjustment information so that the dynamic element avoids the floating window, thereby increasing the visible area of ​​the dynamic element and improving the operability of the dynamic element.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of human-computer interaction, and in particular to a dynamic element control method, an electronic device and a computer-readable storage medium. [Background technology]

[0002] Current electronic devices have the function of displaying floating windows, which can achieve the effect of floating an application window on the interface of the current application. If a floating window is displayed on the current interface, the user cannot see and operate the information or buttons blocked by the floating window, resulting in a small visible area of ​​the information or buttons, resulting in low operability of the information or buttons. [Summary of the invention]

[0003] In view of this, the present invention provides a dynamic element control method, an electronic device and a computer-readable storage medium, which can increase the visible area of ​​the dynamic element and improve the operability of the dynamic element.

[0004] On the one hand, an embodiment of the present invention provides a dynamic element control method, including:

[0005] Detecting a movement operation of the floating window moving toward the dynamic element, and determining adjustment information of the dynamic element;

[0006] The position and / or size of the dynamic element is adjusted according to the adjustment information so that the dynamic element avoids the floating window.

[0007] In a possible implementation, adjusting the information includes adjusting the position information;

[0008] Determine the adjustment information of the dynamic elements, including:

[0009] Obtaining first position information of the floating window and second position information of the dynamic element;

[0010] The adjustment position information is generated through the first specified function according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information, and the second position information.

[0011] In a possible implementation manner, the first specified function includes a linear function, a sine curve, a Bezier curve, a power function curve, or an exponential function.

[0012] In one possible implementation, the adjustment information includes adjustment size information;

[0013] Determine the adjustment information of the dynamic elements, including:

[0014] Obtaining the first position information of the floating window, the second position information of the dynamic element, and the current size information of the dynamic element;

[0015] The resizing information is generated through the second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

[0016] In a possible implementation manner, the second specified function includes a linear function, a sine curve, a Bezier curve, a power function curve, or an exponential function.

[0017] In a possible implementation, the first boundary value is smaller than the second boundary value;

[0018] Before adjusting the position and / or size of the dynamic element according to the adjustment information, it also includes:

[0019] Determine whether the adjusted position information is greater than or equal to a first boundary value and less than or equal to a second boundary value;

[0020] If it is determined that the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0021] In a possible implementation, the method further includes:

[0022] If it is determined that the adjusted position information is less than the first boundary value, the first boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0023] In a possible implementation, the method further includes:

[0024] If it is determined that the adjustment position information is greater than the second boundary value, the second boundary value is determined as the adjustment position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0025] In a possible implementation manner, before adjusting the position and / or size of the dynamic element according to the adjustment information, the method further includes:

[0026] Determine whether the resize information is greater than or equal to the border size;

[0027] If it is determined that the resizing information is greater than or equal to the border size, the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

[0028] In a possible implementation, the method further includes:

[0029] If it is determined that the resizing information is smaller than the border size, the border size is determined as the resizing information and the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

[0030] In a possible implementation, the method further includes:

[0031] The positions and / or sizes of the adjacent dynamic elements of the dynamic element are adjusted according to the set ratio of the adjustment information.

[0032] In a second aspect, an embodiment of the present invention provides an electronic device, the device comprising:

[0033] A display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, cause the device to perform the following steps:

[0034] Detecting a movement operation of the floating window moving toward the dynamic element, and determining adjustment information of the dynamic element;

[0035] The position and / or size of the dynamic element is adjusted according to the adjustment information so that the dynamic element avoids the floating window.

[0036] In an optional implementation manner, the adjustment information includes adjusting position information; when the instruction is executed by the device, the device specifically performs the following steps:

[0037] Obtaining first position information of the floating window and second position information of the dynamic element;

[0038] The adjustment position information is generated through the first specified function according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information, and the second position information.

[0039] In an optional implementation manner, the adjustment information includes adjustment size information; when the instruction is executed by the device, the device specifically performs the following steps:

[0040] Obtaining the first position information of the floating window, the second position information of the dynamic element, and the current size information of the dynamic element;

[0041] The resizing information is generated through the second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

[0042] In an optional implementation manner, the first boundary value is less than the second boundary value; when the instruction is executed by the device, the device specifically performs the following steps:

[0043] Determine whether the adjusted position information is greater than or equal to a first boundary value and less than or equal to a second boundary value;

[0044] If it is determined that the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0045] In an optional implementation manner, when the instruction is executed by the device, the device specifically performs the following steps:

[0046] If it is determined that the adjusted position information is less than the first boundary value, the first boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0047] In an optional implementation manner, when the instruction is executed by the device, the device specifically performs the following steps:

[0048] If it is determined that the adjustment position information is greater than the second boundary value, the second boundary value is determined as the adjustment position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

[0049] In an optional implementation manner, when the instruction is executed by the device, the device specifically performs the following steps:

[0050] Determine whether the resize information is greater than or equal to the border size;

[0051] If it is determined that the resizing information is greater than or equal to the border size, the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

[0052] In an optional implementation manner, when the instruction is executed by the device, the device specifically performs the following steps:

[0053] If it is determined that the resizing information is smaller than the border size, the border size is determined as the resizing information and the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

[0054] In an optional implementation manner, when the instruction is executed by the device, the device specifically performs the following steps:

[0055] The positions and / or sizes of the adjacent dynamic elements of the dynamic element are adjusted according to the set ratio of the adjustment information.

[0056] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used for program code executed by a device, and the program code includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0057] In the technical solution provided by the embodiment of the present invention, a moving operation of the floating window toward the dynamic element is detected, and adjustment information of the dynamic element is determined; the position and / or size of the dynamic element is adjusted according to the adjustment information so that the dynamic element avoids the floating window, thereby increasing the visible area of ​​the dynamic element and improving the operability of the dynamic element.

Brief Description of the Drawings

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0059] Figure 1 A software structure block diagram of an electronic device provided by an embodiment of the present invention;

[0060] Figure 2 A schematic diagram of an interface of an electronic device of a user provided by an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of an interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0062] Figure 4 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0063] Figure 5 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0064] Figure 6 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0065] Figure 7 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0066] Figure 8 A schematic diagram of a linear function provided by an embodiment of the present invention;

[0067] Fig. 9 is a schematic diagram of a sinusoidal function;

[0068] Fig.10 is a schematic diagram of the Bezier curve function;

[0069] Figures 11a to 11c A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention;

[0070] Fig.12A schematic diagram of an interface for adjusting the size of a dynamic element provided by an embodiment of the present invention;

[0071] Fig.13 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention;

[0072] Fig.14 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention;

[0073] Fig.15 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention;

[0074] Fig.16 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention;

[0075] Fig.17 A schematic diagram of another linear function provided by an embodiment of the present invention;

[0076] Fig.18 is a schematic diagram of a sinusoidal function;

[0077] Fig.19 It is a schematic diagram of the Bezier curve function;

[0078] Fig. 20 A flow chart of a dynamic element control method provided by an embodiment of the present invention;

[0079] Fig.21 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. [Specific implementation method]

[0080] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0081] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0082] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

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

[0084] A floating window is a movable window that floats on the current interface of an electronic device, and the window can be a window of an application. For example, when a user is browsing a web page using a browser, the video being played can be suspended on the web page being browsed in the form of a floating window.

[0085] The current floating window includes a persistent floating window or a transient floating window. A persistent floating window refers to a floating window that, if a floating window is displayed on the current interface, the user can continue to operate on the current interface at other positions except the position blocked by the floating window. A transient floating window refers to a floating window that, if a floating window is displayed on the current interface, the user cannot operate on the current interface. For a transient floating window, the user must first close the floating window before operating on the current interface. For a persistent floating window, if the user wants to view or operate the content blocked by the floating window, the floating window needs to be manually moved to another position to expose the part of the blocked position before the content blocked by the floating window can be viewed or operated. If a persistent floating window blocks a button and the user needs to click the button, the persistent floating window needs to be moved from the original position to another position that does not affect the click of the button. After the user clicks the button, the persistent floating window is moved to the original position. The cumbersome operation leads to a poor user experience, increases the user's usage cost, and has poor operation convenience.

[0086] In view of the above problems, the present invention provides a dynamic element control method, which solves the problem of poor user experience caused by cumbersome operation in the related art, solves the problem of high user cost and poor operation convenience, thereby reducing the user's use cost and improving the operation convenience. It should be noted that the floating window involved in the dynamic element control method provided in the embodiment of the present invention is a persistent floating window.

[0087] Examples of electronic devices include, but are not limited to, devices running iOS, Android, Microsoft or other operating systems, and optionally, the electronic devices include mobile phones, tablet computers, wearable devices, speakers or personal computers; examples of target devices include, but are not limited to, devices running iOS, Android, Microsoft or other operating systems, and optionally, the target devices include mobile phones, tablet computers, wearable devices, speakers or personal computers.

[0088] Take the Android device as an example. Figure 1 The software structure block diagram of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer 110, the system framework layer (Framework, referred to as: FWK) 120, the system library 130 and the Android runtime (Android runtime) 140, the hardware abstraction layer (HAL) 150 and the kernel layer (kernel) 160.

[0089] The application layer 110 may include a series of application packages. Figure 1 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, wireless local area network (Wireless Local Area Network, abbreviated as: WLAN) and music.

[0090] The system framework layer 120 provides an application programming interface (API) and a programming framework for the applications of the application layer 110. The system framework layer 120 includes some predefined functions. Figure 1As shown, the system framework layer 120 may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager. Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make these data accessible to applications. These data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example: management of call status, management of call status includes connecting, hanging up, etc. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0091] The system library 130 may include multiple functional modules. For example: surface manager, media library, 3D graphics processing library, 2D graphics engine, etc. Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio, video format playback and recording, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: Moving Picture Experts Group (MPEG4), Highly Compressed Digital Video Codec Standard (H.264), Moving Image Experts Compression Standard Audio Layer 3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate Codec (AMR), Joint Photographic Experts Group (JPG), Portable Network Graphics (PNG), etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, such as: OpenGLES. The 2D graphics engine is a drawing engine for 2D drawing, such as: SGL.

[0092] The Android runtime 140 includes a core library and a virtual machine. The Android runtime 140 is responsible for the scheduling and management of the Android system. The core library contains two parts: one part is the function that the Java language needs to call, and the other part is the Android core library. The application layer 110 and the system framework layer 120 run in the virtual machine. The virtual machine executes the Java files of the application layer and the system framework layer 120 as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.

[0093] The hardware abstraction layer 150 is an abstract interface for the driver of the kernel layer 160 of the electronic device. The hardware abstraction layer 150 includes multiple library modules, each of which implements an interface for a specific type of hardware component. The hardware abstraction layer 150 can provide an application programming interface for accessing the underlying device for a higher-level Java API framework. When the API framework requires access to the hardware of the electronic device, the Android system will load the library module for the hardware component.

[0094] The kernel layer 160 is a layer between hardware and software. The kernel layer 160 includes at least a display driver, a camera driver, an audio driver, a sensor driver, a Bluetooth driver, an ultra-wideband (Ultra Wide Band, referred to as: UWB) driver, an audio driver, a touch screen driver, and an IoT device management driver. The kernel layer 160 is the foundation of the Android system, and the ultimate functions of the Android system can be realized through the kernel layer 160.

[0095] The hardware abstraction layer 150 can communicate with the system framework layer 120 through the hardware abstraction layer interface description language (HAL interface definition language, abbreviated as: HIDL), and HIDL is an interface description language that specifies the interface between HAL and FWK.

[0096] The following is a scenario in which a floating window blocks a dynamic element during movement, and an exemplary description of the dynamic element control method is given using a specific embodiment:

[0097] In an embodiment of the present invention, a dynamic element is an element that supports dynamic layout. Usually, the layout refers to an element whose position is determined by a coordinate or a percentage. Coordinates include absolute coordinates or relative coordinates. Absolute coordinates refer to coordinates relative to the entire interface, for example: the absolute coordinates of element a are (20dp, 30dp); relative coordinates refer to coordinates relative to the position of another element, for example: the relative coordinates of element b relative to element a are (20dp, 30dp), that is: element b is located on the right side of element a and is 20dp away from element a, on the upper side of element a and is 30dp away from element a. Percentages include absolute percentages or relative percentages. Absolute percentages are percentages relative to the entire interface, for example: element a is located at 20% of the interface width and 30% of the interface height; relative percentages refer to percentages relative to the position of another element, for example: element b is located on the right side of element a and is 20% of the interface width from element a, on the upper side of element a and is 30% of the interface height from element a.

[0098] Compared to a normal layout, the dynamic layout involved in the embodiment of the present invention refers to a layout in which the position of a certain element is affected by a specified rule and changes within a specified range according to a set time interval. The specified rule may be a rule that conforms to a specified function, such as a linear function, a sine curve, a Bezier curve, a power function curve, or an exponential function. The time interval may be set according to actual conditions, and a smaller time interval may be set to achieve real-time changes in the position of the real-time element. The specified range includes the variable range of the position of the element.

[0099] In the embodiment of the present invention, the dynamic element includes an application icon or a tool component, such as a clock, weather, calendar, or search box. Optionally, the dynamic element may also include a functional navigation within the application, which includes functional buttons, thumbnails, advertising banners, bottom navigation, and menu items, such as the bottom navigation within the WeChat application, which includes "WeChat", "Contacts", "Discover", and "Me".

[0100] Taking the dynamic element as an application icon as an example, suppose that the user moves the floating window from the middle of the screen to the bottom according to personal needs so that the floating window does not affect the display of the current interface. Figure 2 A schematic diagram of an interface of an electronic device provided by an embodiment of the present invention, such as Figure 2 As shown, the interface includes a status bar 21, a menu bar 22 and a function bar 23. The status bar 21 includes the operator, current time, current geographic location and local weather, network status, signal status and power level. Figure 2As shown, the operator is China Mobile; the current time is 08:08 on Friday, February 9; the current geographical location is Beijing, the weather in Beijing is cloudy and the temperature is 6 degrees Celsius; the network status is a wifi network; the signal status is a full signal, indicating that the current signal is strong; the black part in the power level can represent the remaining power of the electronic device. The menu bar 22 includes at least one application icon, and each application icon has the name of the corresponding application below, such as: WeChat, card wallet, settings, camera, phone, text messages and address book. Among them, the position of the application icon and the name of the corresponding application can be adjusted according to the user's preferences, and the embodiment of the present invention does not limit this. The function bar 23 includes a return key, a main desktop key and a menu key. The return key is used to return to the previous level, the main desktop key is used to return to the main desktop, and the menu key is used to display multiple background applications.

[0101] like Figure 2 As shown, the interface also includes a floating window 24, which can be the interface of a certain application, for example, the floating window 24 is the interface of the video being played. The floating window 24 is located in the middle of the interface of the electronic device. If the user wants to move the floating window 24 to avoid the floating window 24 affecting the display of the current interface, the user can drag the floating window 24 downward, and in the process of moving downward, the adjustment information of the application icon is generated, and the adjustment information includes the adjustment position information and / or the adjustment size information. If the adjustment information includes the adjustment position information, in the process of the floating window 24 moving downward, the application icon also moves downward to the specified position with the floating window. Optionally, if the adjustment information includes the adjustment size information, in the process of the floating window 24 moving downward, the application icon can be reduced to a specified size.

[0102] It should be noted that Figure 2 The interface diagram of the electronic device shown is an exemplary display of an embodiment of the present invention. The interface diagram of the electronic device may also be in other styles, which is not limited by the embodiment of the present invention.

[0103] Taking the dynamic element as the application icon 25, and the user dragging the floating window 24 to move horizontally as an example, the adjustment process of the position of the dynamic element is described. Since the user drags the floating window 24 horizontally, in the process of adjusting the application icon 25, only the horizontal coordinate of the application icon 25 needs to be calculated and adjusted, and the vertical coordinate of the application icon 25 does not need to be calculated. The electronic device obtains the first position information of the floating window 24 and the second position information of the application icon 25, wherein the first position information includes the horizontal coordinate x of the center point of the floating window 24 f The second position information includes the original horizontal coordinate x of the application icon 25 m0 , the adjustment horizontal coordinate of application icon 25 is x m. The first parameter a and the second parameter b are set according to different scenarios of the actual interface. For example, the first parameter a and the second parameter b can be determined according to the width of the floating window 24; for example, if the scenario of the actual interface requires a small movement of the dynamic elements, the first parameter a and the second parameter b are both set to smaller values; for example, if the scenario of the actual interface requires the floating window to avoid blocking the dynamic elements, the first parameter a and the second parameter b are both set to larger values. The first parameter a and the second parameter b are used to control the sensitivity of the movement of the application icon 25, and it is stipulated that the first parameter is greater than the second parameter and the second parameter is greater than 0, that is, a>b>0. To adjust the horizontal coordinate x m Set the first boundary value x m1 and the second boundary value x m2 And the first boundary value x m1 Less than the second boundary value x m2 , adjust the horizontal axis value to be greater than or equal to the first boundary value x m1 and is less than or equal to the second boundary value x m2 In the embodiment of the present invention, the first boundary value x m1 and the second boundary value x m2 The setting may be performed according to the spacing between the plurality of application icons 25, and the spacing between the plurality of application icons 25 is equal to the first boundary value x. m1 and the second boundary value x m2 , that is, the larger the spacing between the multiple application icons 25, the larger the first boundary value x m1 and the second boundary value x m2 The larger the range between them. The adjustment position information is generated by the first specified function according to the first boundary value, the second boundary value, the first parameter, the second parameter, the first position information and the second position information. The first specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function. Taking the first specified function as a linear function as an example, Figure 3 A schematic diagram of an interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Figure 3 As shown in the figure, taking the dynamic element as the application icon 25 as an example, the floating window 24 is located on the right side of the interface, and the application icon 25 is located in the middle of the interface. The user drags the floating window 24 to the left to move the floating window 24 from right to left. Assume that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is greater than or equal to the first parameter, that is: f -x m0 ≥a, indicating that the distance between the floating window 24 and the application icon 25 is large enough, and the floating window 24 will not affect the user's operation of the application icon 25 at this time, so the position of the application icon 25 maintains the original coordinates and does not need to be adjusted, that is: m =x m0 .

[0104] At this time, the user continues to drag the floating window 24 to the left to make the floating window 24 continue to move from right to left. Figure 4 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Figure 4 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than the first parameter and greater than the second parameter, that is, a>x f -x m0 >b, by formula x m =(x f -x m0 )*(x m0 -x m1 ) / (ab)+(ax m1 -bx m0 ) / (ab) for the horizontal coordinate x of the center point of the floating window 24 f , the original horizontal coordinate x of the application icon 25 m0 , the first boundary value x m1 , the second boundary value x m2 , the first parameter a and the second parameter b are calculated to generate the adjusted horizontal coordinate x of the application icon 25 m , adjust the horizontal axis x m That is to adjust the position information; according to adjust the horizontal coordinate x m The position of the application icon 25 is adjusted so that the ordinate of the application icon 25 remains unchanged and the original abscissa is changed to the adjusted abscissa.

[0105] At this time, the user continues to drag the floating window 24 to the left to make the floating window 24 continue to move from right to left. Figure 5 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Figure 5 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than or equal to the second parameter and greater than or equal to the inverse of the second parameter, that is: b≥x f -x m0 ≥-b, by formula x m =(x f -x m0 )*(x m1 -x m2 ) / 2b+(x m1 +x m2 ) / 2 for the horizontal coordinate x of the center point of the floating window 24 f , the original horizontal coordinate x of the application icon 25 m0 , the first boundary value x m1 , the second boundary value x m2 The second parameter b is calculated to generate the adjusted horizontal coordinate x of the application icon 25. m, adjust the horizontal axis x m That is to adjust the position information; according to adjust the horizontal coordinate x m The position of the application icon 25 is adjusted so that the ordinate of the application icon 25 remains unchanged and the original abscissa is changed to the adjusted abscissa.

[0106] At this time, the user continues to drag the floating window 24 to the left to make the floating window 24 continue to move from right to left. Figure 6 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Figure 6 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than the inverse of the second parameter and greater than the inverse of the first parameter, that is: -b>x f -x m0 >-a, by formula x m =(x f -x m0 )*(x m2 -x m0 ) / (ab)+(ax m2 -bx m0 ) / (ab) for the horizontal coordinate x of the center point of the floating window 24 f , the original horizontal coordinate x of the application icon 25 m0 , the first boundary value x m1 , the second boundary value x m2 , the first parameter a and the second parameter b are calculated to generate the adjusted horizontal coordinate x of the application icon 25 m , adjust the horizontal axis x m That is to adjust the position information; according to adjust the horizontal coordinate x m The position of the application icon 25 is adjusted so that the vertical coordinate of the application icon remains unchanged and the original horizontal coordinate is changed to the adjusted horizontal coordinate.

[0107] At this time, the user continues to drag the floating window 24 to the left to move the floating window 24 from right to left. Figure 7 A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Figure 7 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than or equal to the inverse of the first parameter, that is: f -x m0 ≤-a, indicating that the distance between the floating window 24 and the application icon 25 is large enough, and the floating window 24 will not affect the user's operation of the application icon 25 at this time, so the position of the application icon 25 maintains the original coordinates and does not need to be adjusted, that is: m =x m0 .

[0108] Take the dynamic element including the application icon 25 as an example, Figure 8 A schematic diagram of a linear function provided by an embodiment of the present invention is shown as follows: Figure 8 As shown, the horizontal axis of the schematic diagram of the function is the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25, and the vertical axis is the adjusted horizontal coordinate of the application icon 25. When the user drags the floating window 24 horizontally to move the floating window 24 horizontally, if the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is greater than the first parameter or less than the inverse of the first parameter, the position of the application icon 25 remains at the original coordinate and does not need to be adjusted. As the user continues to drag the floating window 24 horizontally to move the floating window 24 horizontally, the application icon 25 moves away from the floating window 24 until the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is equal to the second parameter, and the position of the application icon 25 has reached the first boundary value; or, until the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is equal to the inverse of the second parameter, and the position of the application icon 25 has reached the second boundary value. As the user continues to drag the floating window 24 horizontally to move the floating window 24 horizontally, and as the blocked area gradually becomes smaller, the application icon 25 is reset to the original position, so that the effect of the application icon 25 dynamically avoiding the floating window 24 can be achieved.

[0109] Further, Figure 8 The transition between key point A and key point B in the schematic diagram of the linear function shown is relatively abrupt. If the floating window 24 continues to move horizontally at this time, the dynamic element will suddenly move horizontally at a specified speed, and there will be no gradual change in the moving speed. In order to further optimize the control effect of the dynamic element, a sine curve, a Bezier curve, a power function curve or an exponential function can be used instead of a linear function. For example: Fig. 9 is a schematic diagram of a sinusoidal function, such as Fig. 9 As shown, the horizontal and vertical axes of the diagram of the function are Figure 8 The meaning of the schematic diagram of the linear function shown is the same and will not be repeated here. The transition between key point C and key point D is slower than that of the schematic diagram of the linear function; for example: Fig.10 is a schematic diagram of the Bezier curve function, such as Fig.10 As shown, the horizontal and vertical axes of the schematic diagram of the function are Figure 8 or Fig. 9 The meaning of the schematic diagram of the function shown is the same and will not be repeated here. The transition between key point I and key point J is slower than that of the schematic diagram of the linear function. As the user continues to drag the floating window to move the floating window 24 horizontally, the dynamic element moves horizontally at a slower speed, and there is an obvious buffering process in the moving speed, which can improve the user experience.

[0110] In the embodiment of the present invention, Figures 3 to 7The schematic diagram shown is a diagram of a user dragging a floating window to move horizontally. If the user drags the floating window 24 to move vertically, only the vertical coordinate of the dynamic element needs to be calculated, and the horizontal coordinate of the dynamic element does not need to be calculated. The process of determining the adjustment position information of the dynamic element is the same as Figures 3 to 7 The same is not repeated here.

[0111] In an embodiment of the present invention, if the user drags the floating window 24 to move both horizontally and vertically, the vertical and horizontal coordinates of the dynamic element need to be calculated, and the adjusted horizontal and vertical coordinates of the dynamic element are determined respectively by specifying functions; the adjusted horizontal and vertical coordinates are used as the adjusted position information of the dynamic element, and the position of the dynamic element is adjusted according to the adjusted position information. Figures 11a to 11c A schematic diagram of another interface for adjusting the position of a dynamic element provided by an embodiment of the present invention, such as Fig.11a As shown, the interface includes multiple dynamic elements, namely, a first dynamic element 11, a second dynamic element 12, a third dynamic element 13, a fourth dynamic element 14 and a fifth dynamic element 15. The first dynamic element 11, the second dynamic element 12, the third dynamic element 13 and the fourth dynamic element 14 are located at the bottom of the interface; the fifth dynamic element 15 is located at the left side of the interface. The interface also includes a floating window 24, which is located on the right side of the interface, and the floating window 24 is located above the third dynamic element 13 and the fourth dynamic element 14. The user drags the floating window 24 downward to move the floating window 24 downward. Fig.11b As shown in FIG. 1 , as the floating window 24 moves downward and gradually approaches the third dynamic element 13 and the fourth dynamic element 14, the third dynamic element 13 and the fourth dynamic element 14 move in a direction away from the floating window 24. At this time, the user drags the floating window 24 to the left to make the floating window 24 continue to move to the left, as shown in FIG. Fig.11c As shown, as the floating window 24 moves to the left and gradually approaches the first dynamic element 11, the second dynamic element 12 and the fifth dynamic element 15, the first dynamic element 11, the second dynamic element 12 and the fifth dynamic element 15 all move in a direction away from the floating window 24; as the floating window 24 moves to the left and gradually moves away from the third dynamic element 13 and the fourth dynamic element 14, the third dynamic element 13 and the fourth dynamic element 14 gradually reset to their respective original positions. In the process of the floating window 24 moving, the process of determining the adjustment position information of the first dynamic element 11, the second dynamic element 12, the third dynamic element 13, the fourth dynamic element 14 and the fifth dynamic element 15 can be seen in Figures 3 to 7 The process shown will not be repeated here.

[0112] In an embodiment of the present invention, after the adjustment position information is generated, it is necessary to compare the adjustment position information with the first boundary value and the second boundary value. Specifically, it is determined whether the adjustment position information is greater than or equal to the first boundary value and less than or equal to the second boundary value. If it is determined that the adjustment position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, the position of the dynamic element is adjusted according to the adjustment position information; if it is determined that the adjustment position information is less than the first boundary value, the first boundary value is determined as the adjustment position information, and the position of the dynamic element is adjusted according to the changed adjustment position information; if it is determined that the adjustment position information is greater than the second boundary value, the second boundary value is determined as the adjustment position information, and the position of the dynamic element is adjusted according to the changed adjustment position information.

[0113] As another optional solution, the adjustment information of the dynamic element also includes adjustment size information. Taking the dynamic element as an application icon 25, and the user dragging the floating window 24 to move horizontally as an example, the adjustment process of the size of the dynamic element is described. Since the user drags the floating window 24 horizontally, in the adjustment process of the application icon 25, it is only necessary to calculate the horizontal size of the application icon 25, and it is not necessary to calculate the vertical size of the application icon 25. The electronic device obtains the first position information of the floating window 24, the second position information of the application icon 25, and the current size information of the application icon 25, wherein the first position information includes the horizontal coordinate x of the center point of the floating window 24 f The second position information includes the original horizontal coordinate x of the application icon 25 m0 The current size information includes the original horizontal size s of the application icon 25 0 , the adjusted horizontal size of the application icon 25 is s. The third parameter c and the fourth parameter d are set according to different scenarios of the actual interface. For example, the third parameter c and the fourth parameter d can be determined according to the width of the floating window 24; for example, if the scenario of the actual interface requires the dynamic elements to move slightly, the third parameter c and the fourth parameter d are both set to smaller values; for example, if the scenario of the actual interface requires the floating window to avoid blocking the dynamic elements, the third parameter c and the fourth parameter d are both set to larger values. The third parameter c and the fourth parameter d are used to control the sensitivity of the scaling of the application icon 25, and it is stipulated that the third parameter is greater than the fourth parameter and the fourth parameter is greater than 0, that is, c>d>0. A boundary size s is set for adjusting the horizontal size s. min , adjust the horizontal size to a value greater than or equal to the border size s min In the embodiment of the present invention, the boundary size s minThe setting may be made according to the spacing between the multiple application icons 25. The resizing information is generated by the second specified function according to the border size, the third parameter, the fourth parameter, the first position information and the current size information. The second specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function. Taking the second specified function as a linear function as an example, Fig.12 A schematic diagram of an interface for adjusting the size of a dynamic element provided by an embodiment of the present invention, such as Fig.12 As shown in the figure, taking the dynamic element as the application icon 25 as an example, the floating window 24 is located on the right side of the interface, and the application icon 25 is located in the middle of the interface. The user drags the floating window 24 to the left to move the floating window 24 from right to left. Assume that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is greater than or equal to the third parameter, that is: f -x m0 ≥c, indicating that the distance between the floating window 24 and the application icon 25 is large enough, and the floating window 24 will not affect the user's operation of the application icon 25 at this time, so the horizontal size of the application icon 25 remains the original horizontal size and does not need to be adjusted, that is: s=s 0 .

[0114] At this time, the user continues to drag the floating window 24 to the left to move the floating window from right to left. Fig.13 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention, such as Fig.13 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than the third parameter and greater than the fourth parameter, that is, c>x f -x m0 >d, through the formula s=(x f -x m0 )*(s min -s 0 ) / (dc)+(ds 0 -cs min ) / (dc) calculates the horizontal coordinate of the center point of the floating window 24, the original horizontal coordinate of the application icon 25, the original horizontal size of the application icon 25, the border size, the third parameter and the fourth parameter to generate an adjusted horizontal size s of the application icon 25, where the adjusted horizontal size s is the resize information; the size of the application icon 25 is adjusted according to the adjusted horizontal size s, so that the original vertical size of the application icon 25 remains unchanged, and the original horizontal size is reduced to the size of the adjusted horizontal size.

[0115] At this time, the user continues to drag the floating window 24 to the left to move the floating window 24 from right to left. Fig.14 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention, such as Fig.14As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than or equal to the fourth parameter and greater than or equal to the inverse of the fourth parameter, that is: d≥x f -x m0 ≥-d, then s=s min , that is, the border size is determined as the adjusted horizontal size of the application icon 25. The adjusted horizontal size s is the adjustment size information; the size of the application icon 25 is adjusted according to the adjusted horizontal size s, so that the original vertical size of the application icon 25 remains unchanged, and the original horizontal size is reduced to the size of the adjusted horizontal size.

[0116] At this time, the user continues to drag the floating window 24 to the left to move the floating window 24 from right to left. Fig.15 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention, such as Fig.15 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than the inverse of the fourth parameter and greater than the inverse of the third parameter, that is: -d>x f -x m0 >-c, through the formula s=(x f -x m0 )*(s min -s 0 ) / (cd)+(ds 0 -cs min ) / (cd) calculates the horizontal coordinate of the center point of the floating window 24, the original horizontal coordinate of the application icon 25, the original horizontal size of the application icon 25, the border size, the third parameter and the fourth parameter to generate an adjusted horizontal size s of the application icon 25, where the adjusted horizontal size s is the resizing information; the size of the application icon 25 is adjusted according to the adjusted horizontal size s, so that the original vertical size of the application icon 25 remains unchanged, and the original horizontal size is reduced to the size of the adjusted horizontal size.

[0117] At this time, the user continues to drag the floating window 24 to the left to move the floating window from right to left. Fig.16 A schematic diagram of another interface for adjusting the size of a dynamic element provided by an embodiment of the present invention, such as Fig.16 As shown, it is assumed that the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is less than or equal to the inverse of the third parameter, that is: f -x m0 ≤-c, indicating that the distance between the floating window 24 and the application icon 25 is large enough, and the floating window 24 will not affect the user's operation of the application icon 25 at this time, so the horizontal size of the application icon 25 remains the original horizontal size and does not need to be adjusted, that is: s=s 0 .

[0118] Take the dynamic element including the application icon 25 as an example, Fig.17 A schematic diagram of another linear function provided by an embodiment of the present invention is shown as follows: Fig.17 As shown, the horizontal axis of the schematic diagram of the function is the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25, and the vertical axis is the adjusted horizontal size of the application icon 25. When the user drags the floating window 24 horizontally to move the floating window 24 horizontally, if the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is greater than the third parameter or less than the inverse of the third parameter, the horizontal size of the application icon 25 remains the original horizontal size and does not need to be adjusted. As the user continues to drag the floating window 24 horizontally to move the floating window 24 horizontally, the application icon 25 moves away from the floating window 24 until the difference between the horizontal coordinate of the center point of the floating window 24 and the original horizontal coordinate of the application icon 25 is equal to the fourth parameter or the inverse of the fourth parameter, and the horizontal size of the application icon 25 has reached the boundary size. As the user continues to drag the floating window 24 horizontally to move the floating window 24 horizontally, as the blocked area gradually decreases, the horizontal size of the application icon 25 is reset to the original horizontal size, so that the application icon 25 can dynamically avoid the floating window.

[0119] Further, Fig.17 The transition between key points E and F in the schematic diagram of the linear function shown is relatively abrupt. If the floating window 24 continues to move horizontally at this time, the dynamic element will suddenly move horizontally at a specified speed, and there will be no gradual change in the moving speed. In order to further optimize the control effect of the dynamic element, a sine curve, a Bezier curve, a power function curve or an exponential function can be used instead of a linear function. For example: Fig.18 is a schematic diagram of a sinusoidal function, such as Fig.18 As shown, the horizontal and vertical axes of the schematic diagram of the function are Fig.17 The meaning of the schematic diagram of the function shown is the same and will not be repeated here. The transition between key point G and key point H is slower than that of the schematic diagram of the linear function; for example: Fig.19 is a schematic diagram of the Bezier curve function, such as Fig.19 As shown, the horizontal and vertical axes of the schematic diagram of the function are Fig.17 or Fig.18 The meaning of the schematic diagram of the function shown is the same and will not be repeated here. The transition between the key point K and the key point L is slower than that of the schematic diagram of the linear function. As the user continues to drag the floating window to move the floating window 24 horizontally, the dynamic element moves horizontally at a slower speed, and there is an obvious buffering process in the moving speed, which can improve the user experience.

[0120] In the embodiment of the present invention, Figures 12 to 16The schematic diagram shown is a diagram of a user dragging the floating window 24 to move horizontally. If the user drags the floating window 24 to move vertically, only the vertical size of the dynamic element needs to be calculated, and the horizontal size of the dynamic element does not need to be calculated. The process of determining the resizing information of the dynamic element is the same as Figures 12 to 16 The same is not repeated here.

[0121] In an embodiment of the present invention, if the user drags the floating window to move both horizontally and vertically, the vertical and horizontal sizes of the dynamic element need to be calculated, and the adjusted horizontal and vertical sizes of the dynamic element are determined respectively by specifying functions; the adjusted horizontal and vertical sizes are used as the resizing information of the dynamic element, and the size of the dynamic element is adjusted according to the resizing information.

[0122] In the embodiment of the present invention, after the resize information is generated, it is necessary to compare the resize information with the border size. Specifically, it is determined whether the resize information is greater than or equal to the border size. If it is determined that the resize information is greater than or equal to the border size, the size of the dynamic element is adjusted according to the resize information; if it is determined that the resize information is less than the border size, the border size is determined as the resize information, and the size of the dynamic element is adjusted according to the changed resize information.

[0123] As another optional solution, the adjustment information of the dynamic element includes adjustment position information and adjustment size information. The position of the dynamic element is adjusted according to the adjustment position information, and the size of the dynamic element is adjusted according to the adjustment size information. The process of determining the adjustment position information is similar to Figures 3 to 7 The process of determining the resizing information is the same as Figures 12 to 16 The same is not repeated here.

[0124] Furthermore, in the process of adjusting the position and / or size of the dynamic element according to the adjustment information of the dynamic element, the adjacent dynamic elements of the dynamic element are adjusted accordingly with the dynamic element. In an embodiment of the present invention, adjacent dynamic elements can be defined as elements within a set distance from the dynamic element, for example: element a is a dynamic element, a circle is drawn with element a as the center and a set distance as the radius, and the dynamic elements within the circle are defined as adjacent dynamic elements of element a; they can also be defined as elements that are only transferred N times, for example: the value of N is set to 2, elements a, element b, element c and element d are arranged in a straight line in sequence, element a is a dynamic element, element a to element b is transferred once, and element a to element c is transferred twice, therefore, elements b and element c are adjacent dynamic elements of element a, and element d is not an adjacent dynamic element.

[0125] Specifically, when the adjustment information of the dynamic element includes the adjustment position information, the position of the adjacent dynamic element is adjusted according to the set ratio of the adjustment position information. The set ratio can be set according to the actual situation, for example: the set ratio is 1 times or 0.5 times. It should be noted that when the set ratio is 1 times, the position adjustment of the adjacent dynamic element is a non-attenuated adjustment, that is, the position of the adjacent dynamic element is adjusted according to the adjustment position information of the dynamic element; when the set ratio is less than 1 times, for example: the set ratio is 0.5 times, the position adjustment of the adjacent dynamic element is an attenuated adjustment, that is, the position of the adjacent dynamic element is adjusted according to 0.5 times the adjustment position information of the dynamic element.

[0126] Specifically, when the adjustment information of the dynamic element includes resizing information, the size of the adjacent dynamic element is adjusted according to the set ratio of the resizing information. The set ratio can be set according to the actual situation, for example: the set ratio is 1 times or 0.5 times. It should be noted that when the set ratio is 1 times, the size of the adjacent dynamic element is adjusted without attenuation, that is, the size of the adjacent dynamic element is adjusted according to the resizing information of the dynamic element; when the set ratio is less than 1 times, for example: the set ratio is 0.5 times, the size of the adjacent dynamic element is adjusted with attenuation, that is, the size of the adjacent dynamic element is adjusted according to 0.5 times the resizing information of the dynamic element.

[0127] Specifically, when the adjustment information of the dynamic element includes adjustment position information and adjustment size information, the position of the adjacent dynamic elements is adjusted according to the set ratio of the adjustment position information, and the size of the adjacent dynamic elements is adjusted according to the set ratio of the adjustment size information. The specific adjustment method is the same as the above content and will not be repeated here.

[0128] Fig. 20 A flow chart of a dynamic element control method provided by an embodiment of the present invention is as follows Fig. 20 As shown, the method includes:

[0129] Step 102: Detect a movement operation of the floating window toward the dynamic element, and determine adjustment information of the dynamic element.

[0130] In the embodiment of the present invention, the adjustment information includes adjustment position information and / or adjustment size information.

[0131] In the embodiment of the present invention, the adjustment information includes adjusting the position information, and step 102 specifically includes:

[0132] Step 1022: Detect a movement operation of the floating window toward the dynamic element, and obtain first position information of the floating window and second position information of the dynamic element.

[0133] Step 1024: Generate adjustment position information through the first specified function according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information, and the second position information.

[0134] In the embodiment of the present invention, the first specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

[0135] As an optional solution, the adjustment information includes adjustment size information, and step 102 specifically includes:

[0136] Step 2022: Detect a movement operation of the floating window toward the dynamic element, and obtain first position information of the floating window, second position information of the dynamic element, and current size information of the dynamic element.

[0137] Step 2024: Generate resizing information through a second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

[0138] In the embodiment of the present invention, the second specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

[0139] As another optional solution, the adjustment information includes adjusting the position information and adjusting the size information, and step 102 specifically includes:

[0140] Step 3022: Detect a movement operation of the floating window toward the dynamic element, and obtain first position information of the floating window, second position information of the dynamic element, and current size information of the dynamic element.

[0141] Step 3024: Generate adjustment position information through the first specified function according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information and the second position information.

[0142] In the embodiment of the present invention, the first specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

[0143] Step 3036: Generate resizing information through a second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

[0144] In the embodiment of the present invention, the second specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

[0145] Step 104 , determine whether the adjustment information is within the adjustment boundary, if so, execute step 108 ; if not, execute step 106 .

[0146] In an embodiment of the present invention, the adjustment information includes adjustment position information, and the adjustment boundary includes a first boundary value and a second boundary value; step 104 specifically includes: determining whether the adjustment position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, if so, continue to execute step 108; if not, continue to execute step 106.

[0147] As an optional solution, the adjustment information includes adjustment size information, and the adjustment boundary includes a size boundary; step 104 specifically includes: determining whether the adjustment size information is greater than or equal to the boundary size, if so, executing step 108; if not, executing step 106.

[0148] As another optional scheme, the adjustment information includes adjustment position information and adjustment size information, and the adjustment boundary includes a size boundary, a first boundary value and a second boundary value; step 104 specifically includes: determining whether the adjustment size information is greater than or equal to the boundary size and whether the adjustment position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, if so, executing step 108; if not, executing step 106.

[0149] Step 106: Determine the adjustment boundary as adjustment information.

[0150] In an embodiment of the present invention, the adjustment information includes adjustment position information; if it is determined that the adjustment position information is less than a first boundary value, the first boundary value is determined as the adjustment position information; if it is determined that the adjustment position information is greater than a second boundary value, the second boundary value is determined as the adjustment position information.

[0151] As an optional solution, in an embodiment of the present invention, the adjustment information includes adjustment size information; if it is determined that the adjustment size information is smaller than the border size, the border size is determined as the adjustment size information.

[0152] As another optional scheme, in an embodiment of the present invention, the adjustment information includes adjustment position information and adjustment size information; if it is determined that the adjustment position information is less than a first boundary value, the first boundary value is determined as the adjustment position information; if it is determined that the adjustment position information is greater than a second boundary value, the second boundary value is determined as the adjustment position information; if it is determined that the adjustment size information is less than a border size, the border size is determined as the adjustment size information.

[0153] Step 108: Adjust the position and / or size of the dynamic element according to the adjustment information so that the dynamic element avoids the floating window.

[0154] In the embodiment of the present invention, the adjustment information includes adjustment position information; step 108 specifically includes: adjusting the position of the dynamic element according to the adjustment position information.

[0155] As an optional solution, the adjustment information includes resizing information, and step 108 specifically includes: adjusting the size of the dynamic element according to the resizing information.

[0156] As another optional solution, the adjustment information includes adjustment position information and adjustment size information, and step 108 specifically includes: adjusting the position of the dynamic element according to the adjustment position information, and adjusting the size of the dynamic element according to the adjustment size information.

[0157] Step 110: Adjust the position and / or size of the adjacent dynamic elements of the dynamic element according to the set ratio of the adjustment information.

[0158] In the embodiment of the present invention, the adjustment information includes adjustment position information; step 110 specifically includes: adjusting the positions of adjacent dynamic elements of the dynamic element according to a set ratio of the adjustment position information.

[0159] As an optional solution, the adjustment information includes resize information; step 110 specifically includes: adjusting the sizes of adjacent dynamic elements of the dynamic element according to a set ratio of the resize information.

[0160] As an optional scheme, the adjustment information includes adjustment position information and adjustment size information; step 110 specifically includes: adjusting the position of the adjacent dynamic elements of the dynamic element according to the set ratio of the adjustment position information, and adjusting the size of the adjacent dynamic elements of the dynamic element according to the set ratio of the adjustment size information.

[0161] In an embodiment of the present invention, a moving operation of a floating window toward a dynamic element is detected, and adjustment information of the dynamic element is determined; the position and / or size of the dynamic element is adjusted according to the adjustment information so that the dynamic element avoids the floating window, thereby increasing the visible area of ​​the dynamic element and improving the operability of the dynamic element.

[0162] It should be understood that the electronic device here is embodied in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this. For example, a "unit" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit, and / or other suitable components that support the described functions.

[0163] Therefore, the units of each example described in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0164] An embodiment of the present invention further provides an electronic device, which may be a terminal device or a circuit device built into the terminal device. The device may be used to execute the functions / steps in the above method embodiment.

[0165] Fig.21 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Fig.21 As shown, the electronic device 900 includes a processor 910 and a transceiver 920. Optionally, the electronic device 900 may also include a memory 930. The processor 910, the transceiver 920 and the memory 930 may communicate with each other through an internal connection path to transmit control and / or data signals, and the memory 930 is used to store a computer program, and the processor 910 is used to call and run the computer program from the memory 930.

[0166] Optionally, the electronic device 900 may further include an antenna 940 for transmitting the wireless signal output by the transceiver 920 .

[0167] The processor 910 and the memory 930 may be combined into a processing device, or more commonly, they are independent components, and the processor 910 is used to execute the program code stored in the memory 930 to implement the above functions. In specific implementation, the memory 930 may also be integrated into the processor 910, or may be independent of the processor 910.

[0168] In addition, in order to make the functions of the electronic device 900 more complete, the electronic device 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990, and a sensor 901, and the audio circuit may further include a speaker 982, a microphone 984, etc. The display unit 970 may include a display screen.

[0169] Optionally, the electronic device 900 may further include a power supply 950 for providing power to various devices or circuits in the terminal device.

[0170] The input unit 960 is used to receive a moving operation input by a user to move the floating window toward the dynamic element, and send the moving operation to the processor 910. The processor 910 is used to determine the adjustment information of the dynamic element, and adjust the position and / or size of the dynamic element according to the adjustment information so that the dynamic element avoids the floating window; the processor 910 is also used to adjust the position and / or size of the adjacent dynamic elements of the dynamic element according to the set ratio of the adjustment information.

[0171] It should be understood that Fig.21 The electronic device 900 shown can implement Fig. 20 The various processes of the method embodiment shown. The operations and / or functions of the various units in the electronic device 900 are respectively to implement the corresponding processes in the above method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.

[0172] It should be understood that Fig.21 The processor 910 in the electronic device 900 shown may be a system on a chip (SOC), which may include a central processing unit (CPU), and may further include other types of processors, the CPU may be called a host CPU, and the neural network processor NPU 30 is mounted on the host CPU (Host CPU) as a coprocessor, and the Host CPU assigns tasks. The processors of each part cooperate to implement the previous method flow, and each processor may selectively execute a part of the software driver.

[0173] In summary, the various processors or processing units within the processor 910 can work together to implement the previous method flow, and the corresponding software programs of the various processors or processing units can be stored in the memory 930.

[0174] The present invention also provides a computer-readable storage medium in which instructions are stored. When the instructions are executed on a computer, the computer executes the above-mentioned Fig. 20 The various steps in the dynamic element control method shown.

[0175] In the above embodiments, the processor 910 involved may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU and an ISP. The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as application-specific integrated circuits (ASICs), or one or more integrated circuits for controlling the execution of the program of the technical solution of the present invention. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a memory.

[0176] The memory can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or it can also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0177] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c may be single or multiple.

[0178] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0179] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0180] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0181] The above is only a specific embodiment of the present invention. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A dynamic element control method, characterized in that: include: Detecting a movement operation of the floating window toward the dynamic element, and determining adjustment information of the dynamic element; Adjust the position and / or size of the dynamic element according to the adjustment information so that the dynamic element avoids the floating window; In response to the floating window moving away from the dynamic element, adjusting the position and / or size of the dynamic element to change to the position and / or size of the dynamic element before avoiding; The adjustment information includes adjustment position information; The determining the adjustment information of the dynamic element includes: Acquire first position information of the floating window and second position information of the dynamic element; Generate the adjustment position information according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information and the second position information through a first specified function; and / or, The adjustment information includes adjustment size information; The determining the adjustment information of the dynamic element includes: Acquire the first position information of the floating window, the second position information of the dynamic element, and the current size information of the dynamic element; The resizing information is generated through a second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

2. The method according to claim 1, characterized in that: The first specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

3. The method according to claim 1, characterized in that The second specified function includes a linear function, a sine curve, a Bezier curve, a power function curve or an exponential function.

4. The method according to claim 1, characterized in that: The first boundary value is less than the second boundary value; Before adjusting the position and / or size of the dynamic element according to the adjustment information, the method further includes: Determining whether the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value; If it is determined that the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, continue to execute the step of adjusting the position and / or size of the dynamic element according to the adjustment information.

5. The method according to claim 4, characterized in that Also includes: If it is determined that the adjusted position information is less than the first boundary value, the first boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

6. The method according to claim 4, characterized in that Also includes: If it is determined that the adjusted position information is greater than the second boundary value, the second boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

7. The method according to claim 1, characterized in that Before adjusting the position and / or size of the dynamic element according to the adjustment information, the method further includes: Determining whether the resizing information is greater than or equal to the border size; If it is determined that the resizing information is greater than or equal to the border size, the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

8. The method according to claim 7, characterized in that Also includes: If it is determined that the resizing information is smaller than the border size, the border size is determined as the resizing information and the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

9. The method according to claim 1, characterized in that: Also includes: The positions and / or sizes of the adjacent dynamic elements of the dynamic element are adjusted according to the set ratio of the adjustment information.

10. An electronic device, characterized in that: include: Display screen; one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, cause the device to perform the following steps: Detecting a movement operation of the floating window toward the dynamic element, and determining adjustment information of the dynamic element; Adjust the position and / or size of the dynamic element according to the adjustment information so that the dynamic element avoids the floating window; In response to the floating window moving away from the dynamic element, adjusting the position and / or size of the dynamic element to change to the position and / or size of the dynamic element before avoiding; The adjustment information includes adjustment position information; When the instruction is executed by the device, the device specifically performs the following steps: Acquire first position information of the floating window and second position information of the dynamic element; Generate the adjustment position information according to the set first boundary value, the set second boundary value, the set first parameter, the set second parameter, the first position information and the second position information through a first specified function; and / or, The adjustment information includes adjustment size information; When the instruction is executed by the device, the device specifically performs the following steps: Acquire the first position information of the floating window, the second position information of the dynamic element, and the current size information of the dynamic element; The resizing information is generated through a second specified function according to the set border size, the set third parameter, the set fourth parameter, the first position information, the second position information and the current size information.

11. The device according to claim 10, characterized in that The first boundary value is less than the second boundary value; When the instruction is executed by the device, the device specifically performs the following steps: Determining whether the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value; If it is determined that the adjusted position information is greater than or equal to the first boundary value and less than or equal to the second boundary value, continue to execute the step of adjusting the position and / or size of the dynamic element according to the adjustment information.

12. The device according to claim 11, characterized in that When the instruction is executed by the device, the device performs the following steps: If it is determined that the adjusted position information is less than the first boundary value, the first boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

13. The device according to claim 11, characterized in that When the instruction is executed by the device, the device performs the following steps: If it is determined that the adjusted position information is greater than the second boundary value, the second boundary value is determined as the adjusted position information and the step of adjusting the position and / or size of the dynamic element according to the adjustment information is continued.

14. The device according to claim 10, characterized in that When the instruction is executed by the device, the device performs the following steps: Determining whether the resizing information is greater than or equal to the border size; If it is determined that the resizing information is greater than or equal to the border size, the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

15. The device according to claim 14, characterized in that When the instruction is executed by the device, the device performs the following steps: If it is determined that the resizing information is smaller than the border size, the border size is determined as the resizing information and the step of adjusting the position and / or size of the dynamic element according to the resizing information is continued.

16. The device according to claim 10, characterized in that When the instruction is executed by the device, the device performs the following steps: The positions and / or sizes of the adjacent dynamic elements of the dynamic element are adjusted according to the set ratio of the adjustment information.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the dynamic element control method according to any one of claims 1 to 9.