Display method and device
By automatically determining the display position of the suspended form and avoiding multiple non-suspended forms, the problem of the information of the lower-level form is blocked and the user experience and information acquisition efficiency is improved.
Patent Information
- Application Number
- PCT/CN2024/093771
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-31
- Filing Date
- 2024-05-16
- Publication Date
- 2024-12-05
AI Technical Summary
In a multi-form display scenario, the key information of the lower-layer form is easily blocked by the upper-layer form, resulting in users needing to manually move the upper-layer form to obtain the lower-layer information, affecting the device's user experience.
Provide a display method, by automatically determining the display position of the suspended form, so that it avoids multiple non-suspended forms, thereby not blocking key information and improving user experience. The method includes determining the position of the suspended form when the preset conditions are met, ensuring that there is no occlusion between it and the multiple forms without manual operation by the user.
Automatic avoidance of floating forms is realized, the number of unobstructed forms is increased, more key information is provided to users, and the user experience of the display device is improved without affecting the screen visual effect.
Smart Images

Figure CN2024093771_05122024_PF_FP_ABST
Abstract
Description
Display method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 31, 2023, with application number 202310647147.9 and application name “Display Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of display devices, and in particular to a display method and device. Background Art
[0003] As the screen size of display devices becomes larger and larger, there are scenarios where multiple windows (or controls) are displayed on the screen for parallel processing of transactions, such as multi-window operation, multi-tasking, picture-in-picture and other scenarios. However, in the above-mentioned multi-window display scenario, the windows may overlap and the key information of the lower window may be blocked. When the user wants to view the key information of the lower window, the upper window must be moved away first, resulting in a poor user experience of the device. How to avoid the key information of the lower window from being blocked is a technical problem that urgently needs to be solved in this field.
[0004] Summary of the Invention
[0005] The present application provides a display method and device, in which a floating window can automatically avoid the non-floating window below for display.
[0006] A first aspect provides a display method that can be applied to a display device or a chip in a display device. Specifically, the method includes the following steps: displaying multiple windows. The multiple windows include n first windows, where n is an integer greater than or equal to two, and the first windows are non-floating windows. When a preset condition is met, determining a first position of the floating window. Displaying the floating window at the first position. There is no obstruction between the floating window and at least two of the n first windows.
[0007] As can be seen, in this solution, when the preset conditions are met, the first position of the floating window is determined and the floating window is displayed at the first position so that the floating window does not obstruct at least two of the n first windows. Without the user having to manually operate the floating window, the floating window can automatically avoid the first window, and the number of unobstructed first windows can be increased, thereby providing the user with more key information from the windows and improving the user's display device experience.
[0008] In a possible implementation of the first aspect, the preset condition includes any one of the following: adding a floating window; updating the display position of the floating window; or updating the display area of the floating window.
[0009] When a new floating window is about to appear on the display screen, the method of the embodiment of the present application is activated to determine the display position of the floating window, that is, the first position.
[0010] When the display position of the floating window is updated, for example, the user drags the position of the floating window from display position A to display position B, at this time, the method of the embodiment of the present application is activated to re-determine the display position of the floating window, that is, the first position.
[0011] When the display area of the floating window is updated (increased or reduced), the occlusion relationship between the changed floating window and the first window below changes. At this time, the method of the embodiment of the present application is activated to redetermine the display position of the floating window.
[0012] In a possible implementation of the first aspect, the n first windows have an avoidance priority. The avoidance priority of the first windows can be set according to actual circumstances and is not particularly limited. For example, the avoidance priority of the first windows can be set based on their importance to the user.
[0013] In a possible implementation of the first aspect, the above-mentioned determination of the first position of the floating window specifically includes the following steps: when there is a first window among n first windows and the window that obstructs the floating window, at least one candidate position corresponding to the first window is determined. When the floating window is displayed at at least one candidate position, it at least does not obstruct the first window and the windows whose avoidance priority is higher than the avoidance priority of the first window. Determine the candidate position with the largest avoidance number among the at least one candidate position as the first position. The avoidance number of the above-mentioned candidate position is the number of windows that can avoid obstructing the first window among the n first windows when the floating window is displayed at the candidate position.
[0014] It can be seen that this solution provides a possible method for determining the first position of the floating window, which can ensure that the first window with a higher avoidance priority is not blocked by the floating window, so that the user can smoothly obtain the key information carried by the first window with a higher avoidance priority.
[0015] In a possible implementation of the first aspect, the above-mentioned determination of the first position of the floating window specifically includes the following steps: when there are greater than or equal to two first windows that are obscured by the n first windows and the floating window, determine at least one candidate position corresponding to each obscured first window. When the above-mentioned floating window is displayed at at least one candidate position, it at least does not obstruct the obscured first window and the window whose avoidance priority is higher than the avoidance priority of the obscured first window. Determine the candidate position with the largest number of avoidances as the first position. The avoidance number of the above-mentioned candidate position is the number of windows that can avoid obstructing the first window among the n first windows when the floating window is displayed at the candidate position.
[0016] In a possible implementation of the first aspect, when the number of windows that are blocked by the floating window between the n first windows is greater than or equal to two first windows, determining the first position of the floating window specifically includes the following steps:
[0017] Determine a window as the second window from the n first windows that are blocked by the floating window. Determine at least one candidate position for the second window. At least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position. When a window with a higher avoidance priority than the second window is blocked by the floating window displayed at a candidate position, remove the candidate position from at least one candidate position. When the avoidance number of the candidate position is equal to n, use the candidate position as the first position and stop executing the following steps. The avoidance number of the candidate position is the number of windows that can not block the first window among the n first windows when the floating window is displayed at the candidate position. When the avoidance number of the candidate position is less than n, record the avoidance number of the candidate position. Remove the second window from the windows that are blocked by the floating window and repeat the above steps until the window that is blocked by the floating window is empty. Use the candidate position with the largest avoidance number among the recorded avoidance numbers as the first position.
[0018] It can be seen that this solution provides another possible method for determining the first position of a floating window. In this method, by polling each candidate position, when the avoidance number of the candidate position is equal to n, the candidate position is used as the first position and the subsequent steps are stopped. This can reduce the amount of calculation for determining the first position to a certain extent, increase the speed of determining the first position, and thereby improve the user experience of the display device.
[0019] In a possible implementation of the first aspect, when the number of windows that are blocked by the floating window between the n first windows is greater than or equal to two first windows, determining the first position of the floating window specifically includes the following steps:
[0020] From the n first windows that are obstructed by the floating window, a window with the highest avoidance priority is determined as the second window. At least one candidate position is determined for the second window. At least one candidate position does not obstruct the second window, and the floating window can be fully displayed at the candidate position. When a window with a higher avoidance priority than the second window is obstructed by a floating window displayed at a candidate position, the candidate position is removed from the at least one candidate position. When the avoidance number of a candidate position is equal to n, the candidate position is set as the first position, and the following steps are stopped. The avoidance number of a candidate position is the number of windows that can avoid obstructing the first window among the n first windows when the floating window is displayed at the candidate position. When the avoidance number of a candidate position is less than n, the avoidance number of the candidate position is recorded. The second window is removed from the windows that are obstructed by the floating window, and the above steps are repeated until there is no window that is obstructed by the floating window. The candidate position with the largest avoidance number among the recorded avoidance numbers is set as the first position.
[0021] It can be seen that this solution provides another possible method for determining the first position of a floating window. In this method, by polling each candidate position according to the avoidance priority, when the avoidance number of the candidate position is equal to n, the candidate position is used as the first position and the subsequent steps are stopped. This can further reduce the amount of calculation for determining the first position, increase the speed of determining the first position, and thereby improve the user experience of the display device.
[0022] In a possible implementation of the first aspect, when the avoidance number of the candidate position is less than n, if the avoidance number of the candidate position is inconsistent with the avoidance number of the recorded candidate position; or, the avoidance number of the candidate position is consistent with the avoidance number of the recorded candidate position, and the avoidance priority of the window corresponding to the candidate position is not lower than the avoidance priority of the window corresponding to the recorded candidate position, the avoidance number of the candidate position is recorded.
[0023] Conversely, when the avoidance count for a candidate position is less than n, and the avoidance count for the candidate position is consistent with the avoidance count for a previously recorded candidate position, the avoidance count for that candidate position is not recorded. Alternatively, when the avoidance count for a candidate position is less than n, the avoidance count for the candidate position is consistent with the previously recorded avoidance count for the candidate position, and the avoidance priority of the window corresponding to the candidate position is lower than the avoidance priority of the window corresponding to the previously recorded candidate position, the avoidance count for that candidate position is not recorded. This helps reduce the amount of data required to record the avoidance count, thereby increasing the computational complexity required to subsequently determine the first position based on the avoidance count, and speeding up the process of determining the first position.
[0024] In a possible implementation of the first aspect, when there are multiple candidate positions with the largest avoidance number, the candidate position corresponding to the window with the highest avoidance priority among the multiple candidate positions with the largest avoidance number is selected as the first position.
[0025] It can be seen that when there are multiple candidate positions with the largest avoidance number, selecting the candidate position with the highest avoidance priority as the first position can ensure that the first window with a higher avoidance priority is not blocked, so that the user can smoothly obtain the key information carried by the first window with a higher avoidance priority.
[0026] The second aspect also provides a display method, which is applied to a display device, or a chip in a display device. Specifically, the method includes the following steps: displaying multiple windows. The multiple windows include n first windows of a floating window, where n is an integer greater than or equal to two, and the first window is a non-floating window. When the n first windows are updated, the first position of the floating window is determined. The update includes at least one window of the n first windows being replaced and / or the total number of windows increasing. The floating window is displayed at the first position. There is no occlusion between the floating window and at least two windows of the updated multiple first windows.
[0027] As can be seen, using this solution, when n first windows are updated, the first position of the floating window is determined so that the floating window does not obstruct at least two of the updated first windows. This allows the floating window to automatically avoid the first window without the user having to manually operate the floating window, and increases the number of unobstructed first windows, providing users with more key window information and improving their display device experience.
[0028] In a possible implementation of the second aspect, there is an avoidance priority between the first windows.
[0029] In a possible implementation of the second aspect, the above-mentioned determination of the first position of the floating window specifically includes the following steps: when the window that is obstructed by the floating window among the updated multiple first windows is a first window, determining at least one candidate position corresponding to the obstructed first window. When the above-mentioned floating window is displayed at at least one candidate position, it at least does not obstruct the first window and the windows whose avoidance priority is higher than the avoidance priority of the first window. Determine the candidate position with the largest avoidance number among the at least one candidate position as the first position. The avoidance number of the candidate position is the number of windows that can avoid obstructing the first window among the updated multiple first windows when the floating window is displayed at the candidate position.
[0030] In a possible implementation of the second aspect, the above-mentioned determination of the first position of the floating window specifically includes the following steps: when the number of windows that are obscured by the updated multiple first windows and the floating window is greater than or equal to two first windows, determine at least one candidate position corresponding to each obscured first window. When the above-mentioned floating window is displayed at at least one candidate position, it at least does not obstruct the obscured first window and the window whose avoidance priority is higher than the avoidance priority of the obscured first window. Determine the candidate position with the largest number of avoidances as the first position. The avoidance number of the above-mentioned candidate position is the number of windows that can avoid obstructing the first window among the updated multiple first windows when the floating window is displayed at the candidate position.
[0031] In a possible implementation of the second aspect, when there are multiple candidate positions with the largest avoidance number, the candidate position corresponding to the window with the highest avoidance priority among the multiple candidate positions with the largest avoidance number is selected as the first position.
[0032] The third aspect further provides a display device, which includes a module or unit for implementing or executing the steps of the display method described in the first aspect or the second aspect.
[0033] The fourth aspect also provides a display device, including a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program code, and the processor is used to call the program code to execute the display method described in the first aspect or the second aspect above.
[0034] The fifth aspect further provides a readable storage medium, which stores a program, and the program is executed by a processor to implement the display method as described in the first aspect or the second aspect.
[0035] The sixth aspect also provides a program product containing instructions, which, when run on a device, enables the device to execute the display method of the first aspect or the second aspect.
[0036] The seventh aspect further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the display method of the first aspect or the second aspect.
[0037] Optionally, as an implementation method, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the display method of the first aspect or the second aspect mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The following is an introduction to the drawings used in the embodiments of this application.
[0039] FIG1A is a schematic diagram of a non-floating window provided in an embodiment of the present application;
[0040] FIG1B is a schematic diagram of a floating window provided in an embodiment of the present application;
[0041] FIG1C is a schematic diagram showing the effect of a display method provided in an embodiment of the present application;
[0042] FIG2 is a schematic flow chart of a display method provided in an embodiment of the present application;
[0043] FIG3 is a schematic diagram of a specific flow chart of a display method provided in an embodiment of the present application;
[0044] FIG4 is a flow chart of another display method provided in an embodiment of the present application;
[0045] FIG5A is a schematic diagram of a first window and a floating window provided in an embodiment of the present application;
[0046] FIG5B is a schematic diagram of another first window and a floating window provided in an embodiment of the present application;
[0047] FIG5C is a schematic diagram of another first window and a floating window provided in an embodiment of the present application;
[0048] FIG6 is a schematic diagram of a specific flow chart of another display method provided in an embodiment of the present application;
[0049] FIG7 is a schematic structural diagram of a display device provided by an embodiment of the present invention;
[0050] FIG8 is a schematic structural diagram of a display device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The technical solution in this application will be described below with reference to the accompanying drawings.
[0052] Due to the applications involved in the embodiments of the present application, in order to facilitate understanding, the relevant terms and other related concepts involved in the embodiments of the present application are first introduced below.
[0053] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0054] The "at least one" mentioned in the embodiments of this application refers to one or more, and "plurality" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. The serial numbers of the steps in the embodiments of this application (such as step S1, step S21, etc.) are only for distinguishing different steps and do not limit the order of execution between the steps.
[0055] Furthermore, unless otherwise specified, ordinal numbers such as "first" and "second" in the embodiments of this application are used to distinguish multiple objects and are not used to limit the order, timing, priority, or importance of multiple objects. For example, the first device and the second device are only for ease of description and do not indicate differences in structure, importance, etc. between the first and second devices. In some embodiments, the first device and the second device can also be the same device.
[0056] In the above embodiments, the term "when" can be interpreted to mean "if...", "after...", "in response to determining...", or "in response to detecting...", depending on the context. The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection of the present application.
[0057] As display screens grow larger, multiple windows (or controls) often overlap to facilitate parallel processing, such as multi-window operation, multitasking, and picture-in-picture. For touch-enabled display devices, users can manually drag the upper window to avoid obstructing the lower window and access key information. However, manual processing is inefficient and results in a poor user experience in obtaining information.
[0058] Therefore, an embodiment of the present application provides a display method, in which a floating window can automatically avoid non-floating windows for display, and the floating window can avoid at least two non-floating windows at the same time, thereby increasing the number of unobstructed windows to provide more window display information to the user.
[0059] The display method of the embodiment of the present application is applicable to scenarios with upper and lower layer displays, such as multi-window operation, multi-tasking, picture-in-picture, etc. In other words, the embodiment of the present application can be applied to scenarios where floating windows and non-floating windows coexist.
[0060] A floating window is a window that floats and moves above a non-floating window. A floating window can be used to display information, such as application information or system prompts.
[0061] In an embodiment of the present application, each non-floating window carries key information, which refers to various information that the user expects to know. For example, key information includes but is not limited to the QR code of the underlying window, PIN code display, picture display, underlying focus (i.e., the focused object, the object the user is operating), system background prompt information (such as system prompt information for programs running in the background), etc.
[0062] The non-floating window can be the display window corresponding to the focused area, that is, the window in the area currently being used or operated by the user. In this case, the user does not want the display window to be blocked, and the display window is used as an object that the floating window needs to avoid. Referring to Figure 1A, Figure 1A is a schematic diagram of a non-floating window provided in an embodiment of the present application; Window A is the display window corresponding to the Changlian application, which is an example of a non-floating window. Window A is the display window corresponding to the current focused area.
[0063] The above-mentioned non-floating window can also be a display window corresponding to an area that has no focus-taking ability but is expected to be perceived by the user; this type of non-floating window can be set according to actual conditions. For example, if application E actively reports to the system and expects to be avoided by the floating window, the display window of the application, such as the display window where the application logo and the name of the application are located, will be used as a non-floating window. Alternatively, the user can use the display window where the application logo and the name of the application F are located as a non-floating window according to actual needs. Referring to 1A, the "Screen Recording" window B is the display window corresponding to the background prompt information. Window B is another example of a non-floating window. Window B has no focus-taking ability but is expected to be perceived by the user, and it can be used as an avoidance object for the floating window.
[0064] Refer to Figure 1B, which is a schematic diagram of a floating window provided in an embodiment of the present application; window C is a floating window, in which the displayed content can be set according to actual conditions.
[0065] The display method of the embodiment of the present application can be applied to a display device or a chip in a display device. In the following description, the display device is used as the execution subject of the method.
[0066] Referring to Figure 1B , Window A and Window B are obscured by Floating Window C. Referring to Figure 1C , which is a schematic diagram illustrating the effects of a display method provided by an embodiment of the present application, using the display method of an embodiment of the present application, the display device displays Floating Window C in the first position, avoiding Window A and Window B without obstructing them. The user can obtain the key information carried by Window A and Window B without manually moving Floating Window C.
[0067] The following is a detailed description of a display method provided by an embodiment of the present application, with reference to FIG2 , which is a flow chart of a display method provided by an embodiment of the present application. The display method 200 includes the following steps:
[0068] 201. A display device displays multiple windows, where the multiple windows include n first windows.
[0069] Wherein, n is an integer greater than or equal to 2, the first window is a non-floating window, the first window is a target avoidance object, that is, a window that the user expects not to be blocked, and the specific type and number of the first window can be set according to actual conditions.
[0070] 202. When the display device meets a preset condition, determine a first position of the floating window.
[0071] Specifically, the preset condition can be set according to actual conditions and is not particularly limited. When the preset condition is met, the display device needs to determine the display position of the floating window, that is, the first position.
[0072] 203. The display device displays a floating window at a first position, and there is no obstruction between the floating window and at least two of the n first windows.
[0073] Specifically, the first position determined in step 202 can ensure that there is no obstruction between the floating window and at least two windows among the n first windows.
[0074] It can be seen that by utilizing the display method 200 of the embodiment of the present application, the floating window can automatically avoid the first window without the user manually operating the floating window, and the number of unblocked first windows can be increased to provide more key information of the window to the user, thereby improving the user's display device usage experience.
[0075] Furthermore, the method of the embodiment of the present application does not require significant visual compromises in the display properties of the first window, such as scaling, transparency changes, and three-dimensional rotation, thereby ensuring the maximum possible display of key information while maintaining the visual quality of the screen. Furthermore, the embodiment of the present application has no restrictions on the application scenarios of the floating window and the first window, allowing users to launch various windows on demand.
[0076] The above preset conditions include any one of the following: adding a floating window; updating the display position of the floating window; or updating the display area of the floating window.
[0077] Specifically, when a floating window is to be displayed on the display screen of the display device, the display device starts the method of the embodiment of the present application to determine the display position of the floating window, that is, the first position, so that the floating window does not block at least two first windows among the n first windows.
[0078] When the display position of the displayed floating window is updated, for example, the user drags the position of the floating window from display position A to display position B, the display device starts the method of the embodiment of the present application and re-determines the display position of the floating window, that is, the first position, so that the floating window does not block at least two first windows among the n first windows.
[0079] When the display area of the displayed floating window is updated (increased or reduced), the occlusion relationship between the changed floating window and the first window below changes. At this time, the display device starts the method of the embodiment of the present application to redetermine the display position of the floating window.
[0080] When the display position of the displayed floating window is updated and the display area of the floating window is updated, the occlusion relationship between the floating window and the first window below changes. At this time, the display device starts the method of the embodiment of the present application to redetermine the display position of the floating window.
[0081] Furthermore, the above-mentioned preset conditions also need to be satisfied simultaneously: when there is a first window that is obstructed by the floating window, that is, when the first window is obstructed by the floating window to be displayed, the display device activates the method of the embodiment of the present application to determine the display position of the floating window. Alternatively, when the display position and / or display area of the displayed floating window changes, and when the first window is obstructed by the floating window, the display device activates the method of the embodiment of the present application to redetermine the display position of the floating window.
[0082] When there are two or more floating windows, for each floating window that meets the above preset conditions, the display method of the embodiment of the present application can be used to determine a first position.
[0083] In a possible implementation, when, among multiple windows displayed on the display screen, the avoidance priority of n first windows is higher than the priority of other windows in the multiple windows except the n first windows (i.e., the n first windows are objects that need to be avoided), but no avoidance priority is set between the n first windows, or when the multiple windows are n first windows and no avoidance priority is set between the n first windows, in step 202, the display device, when determining the first position of the floating window, specifically includes the following steps:
[0084] A221. The display device determines one window as a target window from among n first windows that are obstructed by the floating window. When there are two or more obstructed first windows, the display device determines one of the obstructed first windows as the target window according to a preset rule. When there is only one obstructed first window, the display device selects the obstructed first window as the target window.
[0085] Specifically, the preset rules can be set according to actual conditions. For example, in the first window displayed on the display screen that is occluded by the floating window, the windows are randomly traversed, or the windows are traversed in order from left to right or from bottom to top, or the windows are traversed in order from right to left or from bottom to top.
[0086] A222. The display device determines at least one candidate position corresponding to the target window, and when the floating window is displayed at the at least one candidate position of the target window, it at least does not block the target window.
[0087] Specifically, for each candidate position of the target window, when the floating window is displayed at a candidate position, the floating window at least does not block the target window.
[0088] There are many methods for determining a candidate position for a floating window to avoid an obstructed target window. For example, the upper, lower, left, and right positions of the target window can be used as candidate positions. When the floating window can be fully displayed at the above-determined candidate positions, the display device uses the candidate position as the candidate position. For another example, after performing at least one operation such as scaling, translating, or rotating the floating window, a position is obtained that can avoid the obstructed target window and the floating window can be fully displayed. The display device then determines this position as the candidate position for the target window.
[0089] A223. When the avoidance number of the candidate position is equal to n, the display device sets the candidate position as the first position and stops the following steps. The avoidance number of the candidate position refers to the number of windows that can be displayed at the candidate position without blocking the first window in the n first windows.
[0090] A224. When the avoidance number of the candidate position is less than n, the display device records the avoidance number of the candidate position. After determining the avoidance numbers of all candidate positions of the target window in a predetermined order, the display device removes the target window from the first window that is occluded by the floating window and repeats the above steps, i.e., returns to step A221, until the first window that is occluded by the floating window is empty.
[0091] Specifically, the above-mentioned preset order can be set according to actual conditions and is not particularly limited. For example, a candidate position may be determined in order from left to right and from bottom to top for determining the number of avoidances. Alternatively, a candidate position may be determined in order from right to left and from bottom to top for determining the number of avoidances.
[0092] A225. The display device uses the candidate position with the largest number of avoidances among the recorded avoidances as the first position.
[0093] When there are multiple candidate positions with the largest number of avoidances, the display device can determine a candidate position from the multiple candidate positions as the first position. There are many ways to determine, for example, the display device randomly selects a candidate position from multiple candidate positions as the first position. Alternatively, the display device traverses the candidate positions in order from left to right and from bottom to top, and determines a candidate position as the first position (i.e., selects the candidate position at the bottom left of the display screen), or the display device traverses the candidate positions in order from right to left and from bottom to top, and determines a candidate position as the first position (i.e., selects the candidate position at the bottom right of the display screen).
[0094] Optionally, there is an avoidance priority between the above-mentioned n first windows, and the avoidance priority of the first window can be set according to actual conditions, and there is no special limitation on this. For example, the avoidance priority of the first window can be determined according to its importance to the user. The first window with high importance to the user has a high avoidance priority. On the contrary, the avoidance priority is low. For example, if there are applications A and B on the display screen, application B is the background system prompt information, and application A is the focus object, the prompt information needs to be notified to the user in a timely manner, then the avoidance priority of the window corresponding to application A is lower than the avoidance priority of the window of the above-mentioned application B.
[0095] For another example, the user can customize the avoidance priorities of n first windows and set the avoidance priorities as needed to adapt to the avoidance needs of different users and ensure that the key information that the user wants to know can be known in a timely manner.
[0096] Further optionally, the multiple windows displayed on the display device may display, in addition to the n first windows with avoidance priorities, other windows without avoidance priorities.
[0097] In a possible implementation, when there is an avoidance priority among the n first windows, in step 202, when the display device determines the first position of the floating window, the following steps are specifically included:
[0098] B221. When there is a first window among n first windows and a floating window that is obscured by the floating window, the display device determines at least one candidate position corresponding to the first window. When the floating window is displayed at the at least one candidate position, it at least does not obstruct the first window and the windows whose avoidance priority is higher than that of the first window.
[0099] Specifically, for each candidate position of the first window, when the floating window is displayed at a candidate position, the floating window at least does not block the first window and windows with a higher avoidance priority than the first window.
[0100] When the floating window is displayed at a candidate position, if it will block a window with a higher avoidance priority than the first window, the display device will remove the candidate position to ensure that the key information of the window with a higher avoidance priority can be known to the user.
[0101] For a detailed description of determining the candidate position of the first window, reference may be made to the related description of the above step A222, which will not be repeated here.
[0102] For example, when determining whether a candidate position will cause a floating window to obstruct a window with a higher avoidance priority, the display device can establish a priority table based on the avoidance priority between the first windows. In the priority table, the first window with a higher avoidance priority is arranged in front, and the first window with a lower avoidance priority is arranged in the back. Referring to Table 1 below, taking the first windows 1 to the first window 6 as an example, it can be seen that the avoidance priority of the first window 1 is the highest, while the avoidance priority of the first window 6 is the lowest.
[0103] Table 1
[0104] Based on the priority table, the display device can determine whether a candidate position will cause the floating window to obstruct windows with higher avoidance priorities. For example, when determining a candidate position for first window 2, the display device can determine, through lookup table 1, whether the floating window will obstruct first window 1, first window 5, and first window 3 when displayed at the candidate position.
[0105] Exemplarily, each first window may be assigned an avoidance priority number. The smaller the number, the higher the avoidance priority. A priority table is obtained in this way. See Table 2 below.
[0106] Table 2
[0107] As another example, each first window may be assigned an avoidance priority number. The larger the number, the higher the avoidance priority. A priority table is obtained in this way. Please refer to Table 3 below.
[0108] Table 3
[0109] B222. The display device determines a candidate position with the largest avoidance number among at least one candidate position as the first position, where the avoidance number of the candidate position is the number of windows that the floating window can display without blocking the first window among the n first windows when the floating window is displayed at the candidate position.
[0110] Specifically, the avoidance number of the candidate position refers to the number of windows among the n first windows that will not be blocked by the floating window when the floating window is displayed at the candidate position.
[0111] In a possible implementation, when there is an avoidance priority among the n first windows, in step 202, when the display device determines the first position of the floating window, the following steps are specifically included:
[0112] C221. When the number of windows blocked by the floating window and the number of windows blocked by the n first windows is greater than or equal to two first windows, the display device determines at least one candidate position corresponding to each blocked first window.
[0113] When the floating window is displayed at at least one candidate position, it at least does not obstruct the obstructed first window and windows with a higher avoidance priority than the obstructed first window. In other words, for each candidate position of the first window, when the floating window is displayed at a candidate position, the floating window at least does not obstruct the first window and windows with a higher avoidance priority than the first window.
[0114] Specifically, for a detailed description of how the display device determines the candidate position of the obstructing window, reference may be made to the description of step A222 above, which will not be repeated here. Alternatively, reference may be made to the description of steps D221 to D223 below, or to the description of steps E221 to E223 below.
[0115] C222. The display device determines a candidate position with the largest avoidance number as the first position. The avoidance number of the candidate position is the number of windows that can be displayed at the candidate position without blocking the n first windows.
[0116] Specifically, for a detailed description of the method by which the display device determines the first position from the candidate positions, reference may be made to the description of steps A223 to A225 , which will not be repeated here.
[0117] In a possible implementation, when the number of windows that are blocked by the floating window between the n first windows is greater than or equal to two first windows, and there is an avoidance priority between the n first windows, in step 202, the display device specifically includes the following steps when determining the first position of the floating window:
[0118] D221. The display device determines a window from among the n first windows that are blocked by the floating window as a second window.
[0119] Specifically, there are many methods for the display device to determine the second window, refer to the description of step A221.
[0120] D222. The display device determines at least one candidate position for the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position.
[0121] Specifically, for a detailed description of how the display device determines the candidate position of the second window, reference may be made to the related description of step A222 above, which will not be repeated here.
[0122] D223. When a window with a higher avoidance priority than the second window is blocked by a floating window displayed at a candidate position, the display device removes the candidate position from at least one candidate position.
[0123] Specifically, the specific method for the display device to determine whether the candidate position will cause the floating window to block the window with a higher avoidance priority can be referred to the relevant description of step B221 and will not be repeated here.
[0124] D224. When the avoidance number of the candidate position is equal to n, the display device takes the candidate position as the first position and stops executing the following steps; the avoidance number of the candidate position is the number of windows that can be displayed at the candidate position without blocking the first window in the n first windows.
[0125] D225. When the avoidance number of the candidate position is less than n, the display device records the avoidance number of the candidate position.
[0126] The display device repeatedly performs steps D224 and D225 until the avoidance quantity of all candidate positions in the second window is determined. The method for selecting candidate positions by the display device can refer to the relevant description of step A224 and will not be repeated here.
[0127] D226. The display device removes the second window from the windows that are blocked by the floating window and repeats the above steps until the windows that are blocked by the floating window are empty.
[0128] D227. The display device uses the candidate position with the largest number of avoidances among the recorded avoidance numbers as the first position.
[0129] In another possible implementation, when the number of windows that are blocked by the floating window between the n first windows is greater than or equal to two first windows, and there is an avoidance priority between the n first windows, in step 202, the display device specifically includes the following steps when determining the first position of the floating window:
[0130] E221. The display device determines a window with the highest avoidance priority from among the n first windows that are blocked by the floating window as the second window.
[0131] Specifically, the display device can determine the second window in a variety of ways. This can be based on the priority table described in step B221, where the display device creates a priority table based on the windows that are obstructed by the floating window, and then determines the window with the highest priority from the priority table as the second window. Alternatively, the display device can create an ordered set based on the windows that are obstructed by the floating window, and then determine the window that is arranged in the front row from the ordered set as the second window. For details, please refer to the description of FIG. 3 below.
[0132] E222. The display device determines at least one candidate position for the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position.
[0133] Specifically, for a detailed description of how the display device determines the candidate position of the second window, reference may be made to the related description of step A222 above, which will not be repeated here.
[0134] E223. When a window with a higher avoidance priority than the second window is blocked by a floating window displayed at a candidate position, the display device removes the candidate position from at least one candidate position.
[0135] Specifically, the specific method by which the display device determines whether the candidate position will cause the floating window to obstruct the window with a higher avoidance priority can be referred to the relevant description of step B221 and will not be repeated here. Alternatively, the display device determines whether there will be obstruction based on the ordered set described below, with specific reference to the relevant description of Figure 3 below.
[0136] E224. When the avoidance number of the candidate position is equal to n, the display device takes the candidate position as the first position and stops executing the following steps; the avoidance number of the candidate position is the number of windows that can be displayed at the candidate position without blocking the first window among the n first windows.
[0137] E225. When the avoidance number of the candidate position is less than n, the display device records the avoidance number of the candidate position.
[0138] The display device repeatedly performs steps E224 and E225 until the avoidance quantity of all candidate positions in the second window is determined. The method for selecting candidate positions by the display device can refer to the relevant description of step A224 and will not be repeated here.
[0139] E226. The display device removes the second window from the windows that are blocked by the floating window and repeats the above steps until the windows that are blocked by the floating window are empty.
[0140] E227. The display device uses the candidate position with the largest number of avoidances among the recorded avoidance numbers as the first position.
[0141] It can be seen that the method for determining the first position shown in steps E221 to E227, in which the display device performs polling processing according to the avoidance priority, can not only determine the first position, but also reduce the amount of calculation required to determine the first position, thereby improving the speed of determining the first position.
[0142] In steps D225 and E225 above, when the avoidance count for a candidate position is less than n, and if the avoidance count for the candidate position is inconsistent with the recorded avoidance count for the candidate position, the display device records the avoidance count for the candidate position. Conversely, if the avoidance count for the candidate position is consistent with the recorded avoidance count for the candidate position, the display device does not record the avoidance count for that candidate position. This helps reduce the amount of avoidance count data recorded by the display device, thereby increasing the computational complexity required for the subsequent display device to determine the first position based on the avoidance count, and speeding up the display device's determination of the first position.
[0143] In the above steps D225 and E225, when the avoidance number of the candidate position is less than n, the avoidance number of the candidate position is consistent with the avoidance number of the recorded candidate position, and the avoidance priority of the window corresponding to the candidate position is not lower than the avoidance priority of the window corresponding to the recorded candidate position, the display device records the avoidance number of the candidate position. On the contrary, when the avoidance number of the candidate position is consistent with the avoidance number of the recorded candidate position, and the avoidance priority of the window corresponding to the candidate position is lower than the avoidance priority of the window corresponding to the recorded candidate position, the display device does not record the avoidance number of the candidate position. This is beneficial to reducing the amount of data on the avoidance number recorded by the display device, thereby increasing the amount of calculation required for the subsequent display device to determine the first position based on the avoidance number, and increasing the speed at which the display device determines the first position.
[0144] In the above steps C222, D227 and E227, when there are multiple candidate positions with the largest avoidance number, the display device selects the candidate position corresponding to the window with the highest avoidance priority among the multiple candidate positions with the largest avoidance number as the first position.
[0145] For example, assume that the first window includes window A and window B, and window B has a higher avoidance priority than window A. The candidate positions with the largest avoidance counts are position a and position b, where position a is obtained based on window A and position b is obtained based on window B. If the avoidance counts for positions a and b are the same, the display device selects position b as the first position because window B has a higher avoidance priority.
[0146] In one possible embodiment, in order to facilitate the management of the first window on the display screen, the display device can add the first window to an ordered set in order of avoidance priority, and the arrangement principle of the elements in the ordered set is: the first window with a high avoidance priority is arranged in front, and the first window with a low avoidance priority is arranged in the back. For example, for the first windows A1, A2, the first windows B1 and B2, the ordered set is {A1, B2, B1, A2}. It can be seen that the avoidance priority of the first window A1 is the highest, and the avoidance priority of the first window A2 is the lowest. Based on the ordered set, in step E221, the display device can easily and quickly determine the second window, and in step E223, the display device can quickly determine the window whose avoidance priority is higher than the avoidance priority of the second window.
[0147] To better illustrate the ordered set, the following is a detailed description using steps E221 to E227 as an example:
[0148] Refer to Figure 3, which is a schematic diagram of a specific flow of a display method provided by an embodiment of the present application. In this embodiment, the display device establishes an ordered set based on the first window on the display screen, and the ordered set changes in real time as the display content changes. Specifically:
[0149] When the floating window on the display device meets the preset conditions, for example, there is a new floating window to be displayed, in this embodiment, taking a newly appeared floating window as an example, assuming that the display position of the floating window is i (the floating window is not actually displayed), the first window displayed on the display device at the current moment is formed into an ordered set.
[0150] The display device determines whether the ordered set is empty. If the ordered set is empty, the display device keeps the display position of the floating window at i, that is, the display device displays the floating window at the display position i.
[0151] When the ordered set is not empty, the display device polls the windows in the ordered set according to the avoidance priority, and each time takes out a first window in the ordered set as the polled window X according to the avoidance priority.
[0152] The display device determines whether the polled window X is blocked by the floating window. When the window X is not blocked, the display device continues to poll the next window.
[0153] When window X is blocked, the display device determines at least one candidate position corresponding to window X based on the existing display position i of the floating window. For example, when there are no candidate positions for window X, the display device stops calculating the candidate positions for window X and returns to polling the next window in the ordered set.
[0154] For at least one candidate position of window X, if the floating window, when displayed at a candidate position, obscures a window in the ordered set with a higher avoidance priority than window X, the display device removes the candidate position. The display device evaluates all candidate positions of window X, i.e., polls the candidate positions, until none of the candidate positions of window X obscures the first window in the ordered set with a higher avoidance priority than window X.
[0155] Among them, when judging whether the candidate position of window X will cause the floating window to be displayed at the candidate position, when blocking a window with a higher avoidance priority than the avoidance priority of window X, the display device can make a judgment based on the avoidance priority order in the ordered set.
[0156] For each candidate position of window X, the display device first counts the number of avoidances for the candidate position, and then determines whether the candidate position can avoid all elements of the ordered set. If all elements in the ordered set can be avoided at the same time, the display device terminates the calculation and uses the candidate position as the first position. The display device displays the floating window at the first position, completing the automatic avoidance.
[0157] If the candidate position cannot avoid all elements of the ordered set, the display device records the avoidance quantity of the candidate position and performs the next window polling of the ordered set.
[0158] After polling is complete, the display device selects the candidate location with the highest number of avoidances from the recorded avoidance counts as the first location. If there are multiple candidate locations with the highest number of avoidances, the display device selects the candidate location corresponding to the window with the highest avoidance priority from among the multiple candidate locations as the first location. The display device then displays the floating window in the first location, completing the automatic avoidance.
[0159] The embodiment of the present application performs a polling avoidance operation on the display range of the floating window based on the avoidance priority of the first window to find the most suitable avoidance position that can display the most key information.
[0160] In an embodiment of the present application, a display method is further provided. Referring to FIG. 4 , FIG. 4 is a flow chart of another display method provided in an embodiment of the present application. The display method 400 includes the following steps:
[0161] 401. A display device displays multiple windows, where the multiple windows include a floating window and n first windows.
[0162] Wherein, n is an integer greater than or equal to 2, and the first window is a non-floating window. In this embodiment, the description of the first window can refer to the relevant description above and will not be repeated here.
[0163] 402. When n first windows are updated, the display device determines a first position of the floating window.
[0164] The updating of the n first windows includes that at least one window among the n first windows is replaced and / or the total number of windows is increased.
[0165] Specifically, updating the n first windows may be replacing at least one of the n first windows, that is, as the display content of the display screen changes, some or all of the first windows are replaced. In this case, the number of windows in the updated plurality of first windows is still n.
[0166] Replacing the first window should be understood as replacing the first window from window A to window B. Window A and window B display different content and are displayed in different positions. When the display position of the first window changes, the floating window may obscure the new first window. Therefore, it is necessary to trigger the display device to execute the method of the embodiment of the present application to determine the first position of the floating window.
[0167] The replacement of the first window can also be understood as a change in the display area of the first window (increasing or decreasing), that is, the first window changes from window a1 to window a2. Window a1 and window a2 are both window A, and the displayed content of the window remains unchanged, only the display area of window a1 and window a2 is different. When the display area of the first window changes, the floating window may obscure the new first window (i.e., window a2). Therefore, it is necessary to trigger the display device to execute the method of the embodiment of the present application to determine the first position of the floating window.
[0168] The updating of n first windows may be an increase in the total number of windows of the first window, that is, a new first window is added. For example, if one new first window is added, the number of first windows changes from n to n+1. In this case, the number of windows of the updated plurality of first windows changes from n to n+1.
[0169] The updating of the n first windows may also mean that at least one of the n first windows is replaced and the total number of first windows increases, that is, there are situations in which a first window is replaced and a new first window is added at the same time.
[0170] 403. The display device displays the floating window at the first position, and there is no obstruction between the floating window and at least two windows among the updated plurality of first windows.
[0171] It can be seen that by utilizing the display method 400 of the embodiment of the present application, the floating window can automatically avoid the first window without the user manually operating the floating window, and the number of unblocked first windows can be increased to provide more key information of the window to the user, thereby improving the user's display device usage experience.
[0172] Furthermore, the method of the embodiment of the present application does not require significant visual compromises in the display properties of the first window, such as scaling, transparency changes, and three-dimensional rotation, thereby ensuring the maximum possible display of key information while maintaining the visual quality of the screen. Furthermore, the embodiment of the present application has no restrictions on the application scenarios of the floating window and the first window, allowing users to launch various windows on demand.
[0173] For example, the first position of the floating window determined in step 402 may be a new display position, or the first position of the floating window may be a display position of the floating window before the n first windows are updated.
[0174] Referring to Figure 5A , Figure 5A is a schematic diagram of a first window and a floating window provided in an embodiment of the present application. Window D is the first window, i.e., the application window currently being operated by the user. Window D is not obstructed by floating window C. Floating window C maintains its original display attributes and is displayed in its original display position.
[0175] Assume that a new window B appears, and window B is blocked by floating window C (not shown). Window B is a "screen recording" window, which is a system prompt message. Assume that the avoidance priority of the system prompt message is higher than the avoidance priority of the focused area, that is, the avoidance priority of window B is higher than the avoidance priority of window D. The display device re-determines the display position of floating window C based on window B. Referring to Figure 5B, Figure 5B is a schematic diagram of another first window and floating window provided in an embodiment of the present application; the display device moves floating window C down to the display position shown in Figure 5B.
[0176] Suppose that the window the user is operating becomes a "native" window, that is, the first window is replaced. At this time, window D is blocked by the floating window C (not shown), and the display device re-determines the display position of the floating window C based on window D. Refer to Figure 5C, Figure 5C is a schematic diagram of another first window and floating window provided in an embodiment of the present application; the display device moves the floating window C to the display position shown in Figure 5C.
[0177] In one possible implementation, the updated avoidance priority of the multiple first windows is higher than the priority of other windows in the multiple windows except the multiple first windows (that is, the multiple first windows are objects that need to be avoided), but no avoidance priority is set between the multiple first windows, or when the multiple windows are multiple first windows and no avoidance priority is set between the multiple first windows, in step 402, the display device determines the first position of the floating window, specifically including the following steps:
[0178] A421. The display device determines a window as a target window from among the updated plurality of first windows and the windows that are blocked by the floating window.
[0179] A422. The display device determines at least one candidate position corresponding to the target window, and when the floating window is displayed at the at least one candidate position of the target window, it at least does not block the target window.
[0180] A423. When the avoidance number of the candidate position is equal to m, the display device sets the candidate position as the first position and stops the following steps. The avoidance number of the candidate position refers to the number of first windows among the m first windows that can be displayed without being obscured by the floating window when the floating window is displayed at the candidate position. Where m is the total number of windows in the updated plurality of first windows.
[0181] A424. When the avoidance number of the candidate position is less than m, the display device records the avoidance number of the candidate position. After determining the avoidance numbers of all candidate positions of the target window in a predetermined order, the display device removes the target window from the first window that is occluded by the floating window and repeats the above steps, i.e., returns to step A421, until the first window that is occluded by the floating window is empty.
[0182] A425. The display device determines a candidate position with the largest number of avoidances among the recorded numbers of avoidances as the first position.
[0183] For the specific description of steps A421 to A425, please refer to the relevant description of steps A221 to A225, which will not be repeated here.
[0184] In a possible implementation, there is an avoidance priority between the first windows. For the description of the avoidance priority, please refer to the above description, which will not be repeated. The above-mentioned first windows refer to n first windows, or multiple first windows after update.
[0185] In a possible implementation, when the updated first windows have an avoidance priority, in step 402, the display device determines the first position of the floating window, specifically including the following steps:
[0186] B421. When one of the updated multiple first windows and the floating window is obstructed by a first window, the display device determines at least one candidate position corresponding to the obstructed first window. When the floating window is displayed at the at least one candidate position, it does not obstruct at least the first window and windows with a higher avoidance priority than the first window.
[0187] Specifically, when the window that is blocked by the floating window is one of the updated multiple first windows, the display device determines at least one candidate position corresponding to the blocked first window. When there is no available candidate position for the blocked first window, the display device stops determining the first position.
[0188] B422. The display device determines a candidate position with the largest avoidance number among the at least one candidate position as the first position. The avoidance number of the candidate position is the number of windows that can be displayed at the candidate position without blocking the updated multiple first windows.
[0189] For the specific description of steps B421 to B422, please refer to the relevant description of steps B221 to B222, which will not be repeated here.
[0190] In a possible implementation, when the updated first windows have an avoidance priority, in step 402, the display device determines the first position of the floating window, specifically including the following steps:
[0191] C421. When there are two or more windows that are obstructed by the updated plurality of first windows and the floating window, the display device determines at least one candidate position corresponding to each obstructed first window. When the floating window is displayed at the at least one candidate position, it does not obstruct at least the obstructed first window or a window with a higher avoidance priority than the obstructed first window.
[0192] C422. The display device determines a candidate position with the largest avoidance number as the first position. The avoidance number of the candidate position is the number of first windows among the m first windows that can be displayed without obstructing the floating window when the floating window is displayed at the candidate position, where m is the total number of the updated first windows.
[0193] For the specific description of steps C421 to C422, please refer to the relevant description of steps C221 to C222, which will not be repeated here.
[0194] In a possible implementation, when the number of windows that are blocked by the floating window after the update of the multiple first windows is greater than or equal to two first windows, and there is an avoidance priority between the updated first windows, in step 402, when the display device determines the first position of the floating window, specifically includes the following steps:
[0195] D421. The display device determines a window from among the updated plurality of first windows and the windows that are blocked by the floating window as a second window.
[0196] D422. The display device determines at least one candidate position for the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position.
[0197] D423. When a window with a higher avoidance priority than the second window is blocked by a floating window displayed at a candidate position, the display device removes the candidate position from at least one candidate position.
[0198] D424. When the avoidance number of the candidate position is equal to m, the display device sets the candidate position as the first position and stops executing the following steps. m is the total number of the updated multiple first windows. The avoidance number of the candidate position is the number of first windows among the m first windows that can be displayed without obstructing the floating window when the floating window is displayed at the candidate position.
[0199] D425. When the avoidance quantity of the candidate position is less than m, the display device records the avoidance quantity of the candidate position.
[0200] D426. The display device removes the second window from the windows that are blocked by the floating window and repeats the above steps until the windows that are blocked by the floating window are empty.
[0201] D427. The display device uses the candidate position with the largest number of avoidances among the recorded avoidance numbers as the first position.
[0202] For the specific description of steps D421 to D427, please refer to the relevant description of steps D221 to D227, which will not be repeated here.
[0203] In a possible implementation, when the number of windows that are blocked by the floating window after the update of the multiple first windows is greater than or equal to two first windows, and there is an avoidance priority between the updated first windows, in step 402, when the display device determines the first position of the floating window, specifically includes the following steps:
[0204] E421. The display device determines a window with the highest avoidance priority from among the updated plurality of first windows and the windows that are blocked by the floating window as the second window.
[0205] E422. The display device determines at least one candidate position for the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position.
[0206] E423. When a window with a higher avoidance priority than the second window is blocked by a floating window displayed at a candidate position, the display device removes the candidate position from at least one candidate position.
[0207] E424. When the avoidance number of the candidate position is equal to m, the display device sets the candidate position as the first position and stops executing the following steps. m is the total number of the updated multiple first windows. The avoidance number of the candidate position is the number of first windows among the m first windows that can be displayed without being obscured by the floating window when the floating window is displayed at the candidate position.
[0208] E425. When the avoidance quantity of the candidate position is less than m, the display device records the avoidance quantity of the candidate position.
[0209] E426. The display device removes the second window from the windows that are blocked by the floating window and repeats the above steps until the windows that are blocked by the floating window are empty.
[0210] E427. The display device uses the candidate position with the largest number of avoidances among the recorded avoidance numbers as the first position.
[0211] For the specific description of steps E421 to E427, please refer to the relevant description of steps E221 to E227, which will not be repeated here.
[0212] In a possible implementation, in the above steps D425 and E425, when the avoidance number of the candidate position is less than m, if the avoidance number of the candidate position is inconsistent with the avoidance number of the recorded candidate position, the display device records the avoidance number of the candidate position.
[0213] In one possible implementation, in steps D425 and E425, when the avoidance number of a candidate location is less than m, if the avoidance number of the candidate location is consistent with the avoidance number of a previously recorded candidate location, and the avoidance priority of the window corresponding to the candidate location is not lower than the avoidance priority of the window corresponding to the previously recorded candidate location, the display device records the avoidance number of the candidate location. Conversely, when the avoidance number of the candidate location is consistent with the avoidance number of a previously recorded candidate location, and the avoidance priority of the window corresponding to the candidate location is lower than the avoidance priority of the window corresponding to the previously recorded candidate location, the display device does not record the avoidance number of the candidate location.
[0214] In a possible embodiment, in the above-mentioned steps C422, D427 and E427, when there are multiple candidate positions with the largest number of avoidances, the display device selects the candidate position with the highest avoidance priority of the corresponding window among the multiple candidate positions with the largest number of avoidances as the first position.
[0215] In one possible embodiment, to facilitate management of the first window on the display screen, the display device may add the first window to an ordered set in order of avoidance priority. The elements in the ordered set are arranged such that first windows with higher avoidance priorities are placed first, while first windows with lower avoidance priorities are placed last. Based on the ordered set, the display device can quickly and easily determine the second window in step E421, and can quickly determine a window with a higher avoidance priority than the second window in step E423.
[0216] To better illustrate the ordered set, the following is a detailed description using steps E421 to E427 as an example:
[0217] Refer to FIG6 , which is a schematic diagram of a specific flow chart of another display method provided in an embodiment of the present application.
[0218] In this embodiment, the display device establishes an ordered set based on the first window on the display screen, and the ordered set changes in real time as the displayed content changes. Specifically:
[0219] When the first window on the display device is updated, for example, a new first window appears. In this embodiment, a new first window is taken as an example. Assuming that the display position of the floating window is i, the display device forms an ordered set of the first windows displayed on the display device after the update.
[0220] The display device determines whether the ordered set is empty. If the ordered set is empty, the floating window maintains the display position i.
[0221] When the ordered set is not empty, the display device polls the windows in the ordered set according to the avoidance priority.
[0222] The display device determines whether the polled window X is blocked by the floating window. When the window X is not blocked, the display device continues to poll the next window.
[0223] When window X is blocked, the display device determines at least one candidate position corresponding to window X based on the existing display position i of the floating window. For example, when there are no candidate positions for window X, the display device stops calculating the candidate positions for window X and returns to polling the next window in the ordered set.
[0224] For at least one candidate position of window X, if the floating window, when displayed at a candidate position, obscures a window in the ordered set with a higher avoidance priority than window X, the display device removes the candidate position. The display device evaluates all candidate positions of window X, i.e., polls the candidate positions, until none of the candidate positions of window X obscures the first window in the ordered set with a higher avoidance priority than window X.
[0225] For each candidate position of window X, the display device first counts the number of avoidances for the candidate position, and then determines whether the candidate position can avoid all elements of the ordered set. If all elements in the ordered set can be avoided at the same time, the display device terminates the calculation, uses the candidate position as the first position, and displays the floating window in the first position, completing the automatic avoidance.
[0226] If the candidate position cannot avoid all elements of the ordered set, the display device records the avoidance quantity of the candidate position and performs the next window polling of the ordered set.
[0227] After polling is complete, the display device selects the candidate location with the highest number of avoidances from the recorded avoidance counts as the first location. If there are multiple candidate locations with the highest number of avoidances, the display device selects the candidate location corresponding to the window with the highest avoidance priority from among the multiple candidate locations as the first location. The display device then displays the floating window in the first location, completing the automatic avoidance.
[0228] The embodiment of the present application performs a polling avoidance operation on the display range of the floating window based on the avoidance priority of the first window to find the most suitable avoidance position that can display the most key information.
[0229] The device provided by this application is described below.
[0230] FIG7 is a schematic diagram of the structure of a possible display device provided in an embodiment of the present application. The display device can be used to implement the functions of any of the above-mentioned method embodiments, and thus can also achieve the beneficial effects of any of the above-mentioned method embodiments. In the embodiments of the present application, the display device can be an electronic device or a module (such as a chip) used in an electronic device.
[0231] As shown in FIG7 , a display device 700 includes a display module 701 and a determination module 702. The display device 700 is configured to implement the functions of the method embodiment shown in FIG2 . Alternatively, the display device 700 may include a module or unit configured to implement any function or operation in the method embodiment shown in FIG2 or FIG4 . The module or unit may be implemented in whole or in part via software, hardware, firmware, or any combination thereof.
[0232] Exemplarily, when the display device 700 is used to implement the functions in the method embodiment shown in Figure 2, the display module 701 is used to display multiple windows, and the multiple windows include n first windows, n is an integer greater than or equal to two, and the first window is a non-floating window. The determination module 702 is used to determine the first position of the floating window when a preset condition is met. Among them, the determination module 702 is used to determine the candidate positions of the floating window (such as candidate position 1, candidate position 2, etc.), and after completing the calculation of all candidate positions, select the optimal avoidance position from all candidate positions, that is, the first position. The display module 701 is also used to display the floating window at the first position, and there is no obstruction between the floating window and at least two of the n first windows. Among them, the display module 701 saves the display information of the floating window (relative screen position and display area size, etc.), and operates the floating window to be displayed at the first position.
[0233] In one possible embodiment, referring to Figure 7, the display device 700 also includes a management module 703, which is used to manage the first window. For example, the management module 703 manages the first window using a priority table or an ordered set according to the relative importance to the user. The order in the table or set corresponds to the importance of the regional information. For example, the closer the area in the table or set is to the front, the more important it is.
[0234] The determination module 702 performs polling calculations based on the display position of the floating window and the first window managed by the management module 703. The calculated candidate positions are recorded by the determination module 702. After the polling is completed, the optimal avoidance position (first position) is selected from all recorded candidate positions. The determination module 702 then notifies the display module 701 to refresh the corresponding display information and display the floating window at the first position.
[0235] The display device 700 can automatically avoid multiple first windows at the same time, which can significantly improve the anti-information blocking capability of the display device 700.
[0236] As another example, when the display device 700 is used to implement the functions of the method embodiment shown in FIG4 , the display module 701 is configured to display multiple windows, including n first windows as floating windows, where n is an integer greater than or equal to two, and the first windows are non-floating windows. The determination module 702 is configured to determine the first position of the floating window when the n first windows are updated. The update includes replacing at least one window among the n first windows and / or increasing the total number of windows. The determination module 702 is configured to determine candidate positions for the floating window (e.g., candidate position 1, candidate position 2, etc.), and after calculating all candidate positions, select the optimal avoidance position from all candidate positions, i.e., the first position. The display module 701 is further configured to display the floating window at the first position, with no obstruction between the floating window and at least two of the updated first windows. The display module 701 stores the display information of the floating window (relative screen position and display area size, etc.) and operates the floating window to be displayed at the first position.
[0237] In one possible embodiment, referring to FIG. 7 , the display device 700 further includes a management module 703 configured to manage first windows, including n first windows or multiple updated first windows. For example, the management module 703 manages the first windows using a priority table or an ordered set based on their relative importance to the user. The order in the table or set corresponds to the importance of the region information; for example, the regions closer to the front of the table or set are more important.
[0238] The present application also provides a display device. Referring to FIG8 , FIG8 is a schematic diagram of the structure of a display device provided by an embodiment of the present invention. Display device 800 includes a memory 801, a processor 802, a communication interface 804, and a bus 803. The memory 801, processor 802, and communication interface 804 are interconnected via bus 803.
[0239] The memory 801 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 801 may store programs. When the program stored in the memory 801 is executed by the processor 802, the processor 802 and the communication interface 804 are used to perform the various steps of the display method of the embodiment of the present application.
[0240] The processor 802 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the display device of any embodiment of the application, or to execute the display method of any embodiment of the application.
[0241] The processor 802 may also be an integrated circuit chip having signal processing capabilities. During implementation, the various steps of the display method of the embodiment of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 802. The above-mentioned processor 802 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the display method in conjunction with the embodiment of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or the like. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801 and combines its hardware to complete the functions required to be performed by the units included in the display device of the embodiment of the present application, or executes the display method of the embodiment of the present application.
[0242] The communication interface 804 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the display device 800 and other devices or a communication network.
[0243] The bus 803 may include a path for transmitting information between various components of the display device 800 (eg, the memory 801 , the processor 802 , and the communication interface 804 ).
[0244] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways.
[0245] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0246] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A display method, characterized in that: The method comprises: Displaying multiple windows, the multiple windows including n first windows, where n is an integer greater than or equal to 2, and the first windows are non-floating windows; When the preset conditions are met, the first position of the floating window is determined; The floating window is displayed at the first position, and there is no obstruction between the floating window and at least two of the n first windows.
2. The method according to claim 1, characterized in that The preset condition includes any one of the following: Add the floating window; The display position of the floating window is updated; or, The display area of the floating window is updated.
3. The method according to claim 1 or 2, characterized in that: The n first windows have avoidance priorities.
4. The method according to claim 3, characterized in that The determining the first position of the floating window includes: When the window that is blocked by the n first windows and the floating window is one of the first windows, at least one candidate position corresponding to the first window is determined, and when the floating window is displayed at the at least one candidate position, at least the first window and windows with a higher avoidance priority than the first window are not blocked; A candidate position with the largest avoidance number among the at least one candidate position is determined as the first position, and the avoidance number of the candidate position is the number of windows that can not block the first windows among the n first windows when the floating window is displayed at the candidate position.
5. The method according to claim 3, characterized in that: The determining the first position of the floating window includes: When the number of windows that are blocked by the n first windows and the floating window is greater than or equal to two of the first windows, at least one candidate position corresponding to each blocked first window is determined; when the floating window is displayed at the at least one candidate position, at least the blocked first window and the window with a higher avoidance priority than the blocked first window are not blocked; The candidate position with the largest avoidance number is determined as the first position, and the avoidance number of the candidate position is the number of windows that can not cover the first windows among the n first windows when the floating window is displayed at the candidate position.
6. The method according to claim 3, characterized in that: When the number of windows that are blocked by the n first windows and the floating window is greater than or equal to two of the first windows, determining the first position of the floating window includes: Determine a window as a second window from among the n first windows and the windows that are blocked by the floating window; Determine at least one candidate position of the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position; When a window with a higher avoidance priority than the avoidance priority of the second window is blocked by the floating window displayed at a candidate position, removing the candidate position from the at least one candidate position; When the avoidance number of the candidate position is equal to n, the candidate position is used as the first position, and the following steps are stopped; the avoidance number of the candidate position is the number of windows that can not block the first window among the n first windows when the floating window is displayed at the candidate position; When the avoidance number of the candidate position is less than n, recording the avoidance number of the candidate position; Removing the second window from the windows that are blocked by the floating window and repeating the above steps until the windows that are blocked by the floating window are empty; The candidate position having the largest avoidance number among the recorded avoidance numbers is used as the first position.
7. The method according to claim 3, characterized in that When the number of windows that are blocked by the n first windows and the floating window is greater than or equal to two of the first windows, determining the first position of the floating window includes: Determine a window with the highest avoidance priority from among the n first windows and the suspended window that are blocked by the floating window as the second window; Determine at least one candidate position of the second window, where the at least one candidate position does not block the second window and the floating window can be fully displayed at the candidate position; When a window with a higher avoidance priority than the avoidance priority of the second window is blocked by the floating window displayed at a candidate position, removing the candidate position from the at least one candidate position; When the avoidance number of the candidate position is equal to n, the candidate position is used as the first position, and the following steps are stopped; the avoidance number of the candidate position is the number of windows that can not block the first window among the n first windows when the floating window is displayed at the candidate position; When the avoidance number of the candidate position is less than n, recording the avoidance number of the candidate position; Removing the second window from the windows that are blocked by the floating window and repeating the above steps until the windows that are blocked by the floating window are empty; The candidate position having the largest avoidance number among the recorded avoidance numbers is used as the first position.
8. The method according to claim 6 or 7, characterized in that: When the avoidance number of the candidate position is less than the n, if the avoidance number of the candidate position is inconsistent with the avoidance number of the recorded candidate position; or, the avoidance number of the candidate position is consistent with the avoidance number of the recorded candidate position, and the avoidance priority of the window corresponding to the candidate position is not lower than the avoidance priority of the window corresponding to the recorded candidate position, record the avoidance number of the candidate position.
9. The method according to any one of claims 5 to 8, characterized in that: When there are multiple candidate positions with the largest avoidance number, the candidate position corresponding to the window with the highest avoidance priority among the multiple candidate positions with the largest avoidance number is selected as the first position.
10. A display method, characterized in that: The method comprises: Displaying multiple windows, the multiple windows including a floating window and n first windows, wherein n is an integer greater than or equal to 2, and the first window is a non-floating window; When the n first windows are updated, determining the first position of the floating window, the updating including at least one window among the N first windows being replaced and / or the total number of windows increasing; The floating window is displayed at the first position, and there is no obstruction between the floating window and at least two windows among the updated plurality of first windows.
11. The method according to claim 10, characterized in that The first windows have avoidance priorities.
12. The method according to claim 11, characterized in that The determining the first position of the floating window includes: When the window that is blocked by the multiple updated first windows and the floating window is a first window, at least one candidate position corresponding to the blocked first window is determined, and when the floating window is displayed at the at least one candidate position, at least the first window and windows with a higher avoidance priority than the first window are not blocked; Determine a candidate position with the largest avoidance number among the at least one candidate position as the first position, and the avoidance number of the candidate position is the number of windows that can not block the first windows in the updated multiple first windows when the floating window is displayed at the candidate position.
13. The method according to claim 11, characterized in that The determining the first position of the floating window includes: When the number of windows that are blocked by the updated multiple first windows and the floating window is greater than or equal to two of the first windows, at least one candidate position corresponding to each blocked first window is determined; when the floating window is displayed at the at least one candidate position, at least the blocked first window and the window with a higher avoidance priority than the blocked first window are not blocked; The candidate position with the largest avoidance number is determined as the first position, and the avoidance number of the candidate position is the number of windows that can not cover the first windows in the updated multiple first windows when the floating window is displayed at the candidate position.
14. The method according to claim 13, characterized in that When there are multiple candidate positions with the largest avoidance number, the candidate position corresponding to the window with the highest avoidance priority among the multiple candidate positions with the largest avoidance number is selected as the first position.
15. A display device, characterized in that: It comprises a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store a program, and the processor is used to call the program to execute the display method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Display method and device
CN120335739A
Window display method and terminal
CN105005430A
Suspended icon control method and device and terminal
CN106873855A
Application window display method and electronic equipment
CN111966252A
Video playing method and device and device for playing video
CN113542886A
