Tiled multi-window dynamic adaptive method based on B + tree
By adopting dynamic switching between B+ tree structure and multi-forktree structure in tile window management, combining window minimum size threshold and dual-field culling strategy, the problem of insufficient window management efficiency and adaptability in the existing technology is solved, and efficient multi-window management and optimized user experience is achieved.
Patent Information
- Application Number
- CN202411952159.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The existing tile window management algorithm cannot efficiently handle the dynamic addition and deletion of windows and the size changes, and lacks adaptability, which affects the user experience.
The tile multi-window dynamic adaptive method based on B+ trees is adopted, and the multi-forktree and B+ tree structures are dynamically switched, combining the window minimum size threshold and the dual-field culling strategy to achieve efficient window management and adaptive layout.
It improves window management efficiency and layout adaptability in multi-window environments, improves screen space utilization, reduces the need to manually adjust window layout, and improves user experience.
Smart Images

Figure CN119883473A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of graphical user interface and human-computer interaction technology, and in particular relates to a B+ tree-based tiled multi-window dynamic adaptive method for improving window management and layout optimization in a multi-window environment. Background Art
[0002] With the rapid development of computer technology, graphical user interfaces (GUIs) have been widely adopted in operating systems and applications, and multi-window operations have become a common way for users to perform multitasking. In traditional window management systems, there are two main ways to arrange windows: stacking and tiling. The stacking method allows windows to overlap and allows users to move and resize them freely. In essence, the window manager does not impose any predefined arrangement. Windows in a stacking window management scheme can be thought of as a piece of paper on a table. Windows can (partially) overlap, and only the topmost window in the overlapping window stack is guaranteed to be fully visible because it is confined to the boundaries of the screen. Tiling is the free organization and arrangement of application windows so that they are tiled on the screen in a non-overlapping manner. Unlike stacking, tiling aims to maximize the utilization of screen space, improve multitasking efficiency, and reduce the need for users to manually adjust window sizes and positions.
[0003] When using a tiling window manager, when there are too many vertically or horizontally split windows, the user experience is greatly affected. In addition, the current tiling window management algorithms are usually based on simple data structures, such as linked lists or trees, which cannot efficiently handle the dynamic addition and deletion of windows and size changes. In addition, these algorithms lack adaptive capabilities in window layout and cannot dynamically adjust the layout according to window properties and tiling resolution. Therefore, an efficient and flexible multi-window management algorithm is urgently needed to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a B+ tree-based tiled multi-window dynamic adaptive method to overcome the problem of poor application perception caused by multi-window squeezing in tiled windows and achieve efficient management and adaptive layout of multi-windows.
[0005] In a first aspect, a B+ tree-based tiled multi-window dynamic adaptive method according to some embodiments of the present application is characterized by comprising the following steps:
[0006] Obtaining a first maximum number of windows that can be accommodated in the available display area under the first tree-structure tiled window management mode, and a second maximum number of windows that can be accommodated in the available display area under the second tree-structure tiled window management mode; wherein the second maximum number of windows is greater than the first maximum number of windows;
[0007] When the window manager receives a command to open a new window or close a window, it:
[0008] (a) the number of windows to be displayed in the available display area is not greater than the first maximum number of windows, the window manager sets the current tree structure tiled window management mode to the first tree structure tiled window management mode, and opens a new window or closes a window;
[0009] (b) the number of windows to be displayed in the available display area is greater than the first maximum number of windows and not greater than the second maximum number of windows, the window manager sets the current tree structure tiled window management mode to the second tree structure tiled window management mode, and opens a new window or closes a window;
[0010] (c) the number of windows to be displayed in the available display area is greater than the second maximum number of windows, the window manager determines the window to be closed according to the number of user clicks on the window and the most recent usage time and closes it, so that the number of windows to be displayed in the available display area is not greater than the second maximum number of windows and greater than the first maximum number of windows, and sets the current tree structure tiled window management mode to the second tree structure tiled window management mode, and opens a new window;
[0011] The first tree structure tiled window management mode is a multi-branch tree structure tiled window management mode, and the second tree structure tiled window management mode is a B+ tree structure tiled window management mode.
[0012] According to a B+ tree-based tiled multi-window dynamic adaptive method in some embodiments of the present application, a method for obtaining a first maximum number of windows that can be accommodated in an available display area under a first tree structure tiled window management mode and a second maximum number of windows that can be accommodated in an available display area under a second tree structure tiled window management mode includes the following steps:
[0013] Initialize the minimum acceptance length L of the window in the first tree structure tiled window management mode min and the minimum acceptable width W min_tree And the minimum acceptable width W of the window in the second tree structure tiling window management mode min_b+ ;
[0014] According to the length L of the available display area usable , the gap between screens G and the minimum acceptance length L min , calculate the maximum number of windows N that can be accommodated in the vertical direction of the available display area h , as shown below:
[0015]
[0016] According to the total width W of the screen, the gap G between the screens and the minimum acceptable width W min_tree, calculate the maximum number of windows N that can be accommodated in the horizontal direction of the available display area in the first tree structure tiled window management mode w_tree , as shown below:
[0017]
[0018] According to the total width W of the screen, the gap G between the screens and the minimum acceptable width W min_b+ , calculate the maximum number of windows N that can be accommodated in the horizontal direction of the available display area in the second tree structure tiled window management mode w_b+ , as shown below:
[0019]
[0020] According to the maximum number of windows N w_tree , calculate the first maximum number of windows N that can be accommodated in the available display area in the first tree structure tiled window management mode max_tree , as shown below:
[0021] N max_tree =N w_tree
[0022] According to the maximum number of windows N w_b+ And the maximum number of windows N h , calculate the second maximum number of windows N that can be accommodated in the available display area in the second tree structure tiled window management mode max_b+ , as shown below:
[0023] N max_b+ =N w_b+ ×N h .
[0024] According to the B+ tree-based tiled multi-window dynamic adaptive method in some embodiments of the present application, the method for obtaining the available display area includes the following steps:
[0025] Get the total length L and width W of the screen;
[0026] Get the height S of the top sidebar of the screen top and the height of the bottom sidebar S bottom ; Wherein, the sidebar includes a status bar and / or a task bar;
[0027] Calculate the length L of the available display area usable .
[0028] According to some embodiments of the present application, the B+ tree-based tiled multi-window dynamic adaptive method, wherein the length L of the available display area is calculated. usable , as shown below:
[0029] Lusable =LS top -S bottom .
[0030] According to the B+ tree-based tiled multi-window dynamic adaptive method in some embodiments of the present application, the window manager receives an instruction to open a new window or an instruction to close a window, and the number of windows to be displayed in the available display area is N;
[0031] The number of windows to be displayed in the available display area in (a) is not greater than the first maximum number of windows, as shown in the following formula:
[0032] N≤N max_tree
[0033] The window manager determines the current tree structure tiling window management mode, and if the current tree structure tiling window management mode is the first tree structure tiling window management mode, maintains the current tree structure tiling window management mode; if the current tree structure tiling window management mode is the second tree structure tiling window management mode, switches the current tree structure tiling window management mode to the first tree structure tiling window management mode;
[0034] The number of windows to be displayed in the available display area in (b) is greater than the first maximum number of windows and not greater than the second maximum number of windows, as shown in the following formula:
[0035] N max_tree <N≤N max_b+
[0036] The window manager determines the current tree structure tiling window management mode, and if the current tree structure tiling window management mode is the second tree structure tiling window management mode, maintains the current tree structure tiling window management mode; if the current tree structure tiling window management mode is the first tree structure tiling window management mode, switches the current tree structure tiling window management mode to the second tree structure tiling window management mode;
[0037] The number of windows to be displayed in the available display area in (c) is greater than the second maximum number of windows, as shown in the following formula:
[0038] N>N max_b+
[0039] The window manager determines the windows to be closed and closes them according to the number of user clicks on the windows and the most recent usage time, so that the number of windows to be displayed in the available display area is not greater than the second maximum number of windows and greater than the first maximum number of windows, and maintains the current tree structure tiled window management mode as the second tree structure tiled window management mode.
[0040] According to the B+ tree-based tiled multi-window dynamic adaptive method of some embodiments of the present application, the window manager determines a window to be closed and closes it based on the number of user clicks on the window and the most recent usage time, so that the number of windows to be displayed in the available display area is equal to the second maximum number of windows, and maintains the current tree structure tiled window management mode as the second tree structure tiled window management mode.
[0041] According to some embodiments of the present application, a B+ tree-based tiled multi-window dynamic adaptive method, in which a window to be closed is determined according to the number of user clicks on the window and the most recent usage time, includes the following steps:
[0042] Calculate the PSWin of the current display window in each available display area;
[0043] The current display window corresponding to the one or more current display windows with the smallest PSWin value in each of the available display areas is closed.
[0044] According to the B+ tree-based tiled multi-window dynamic adaptive method of some embodiments of the present application, the B+ tree-based tiled multi-window dynamic adaptive method according to claim 7 is characterized in that, the PSWin of the current display window of each available display area is calculated as shown in the following formula:
[0045]
[0046] Where ω1 and ω2 are weight coefficients, C0 is the reference threshold of the number of clicks, and T i The interval between the most recent usage time of window i and the current time.
[0047] In a second aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the first aspect and any possible technical solution of the first aspect.
[0048] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program. When the computer program runs on an electronic device, the electronic device executes the first aspect and any possible technical solution of the first aspect.
[0049] Beneficial effects: The present invention realizes efficient management in a multi-window environment by combining the dynamic switching of multi-tree and B+ tree, and improves the layout adaptability and screen space utilization. The multi-tree structure is suitable for scenes with fewer windows, and the layout is simple and intuitive; while the B+ tree structure supports the rapid positioning and dynamic adjustment of high-density windows to ensure stable performance. The introduction of the minimum window size threshold and the double-field elimination strategy further optimizes the user's perception and efficiency of multi-tasking operations, reduces the need for manual adjustment of window layout, and improves the overall user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is the flowchart of the tiled multi-window dynamic adaptive algorithm.
[0051] Figure 2 A schematic diagram of a multi-window arrangement based on a tiled layout.
[0052] Figure 3 This is a schematic diagram of the distribution of multi-branch tree nodes in a flat format.
[0053] Figure 4 for Figure 3 The tree structure represents the screen partitioning diagram.
[0054] Figure 5 Schematic diagram of the management structure for converting a multi-branch tree to a B+ tree.
[0055] Figure 6 This is a diagram of the B+ tree management structure.
[0056] Figure 7 The maximum number of windows on the screen has been reached in the B+ tree management structure.
[0057] Figure 8 Apply a priority score to the top 9. DETAILED DESCRIPTION
[0058] The following describes the embodiments of the present application in detail with reference to the accompanying drawings, examples of which are shown in the accompanying drawings. The present application provides a method and an electronic device. The method and the device are based on the same technical concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0059] In order to make the present invention more clearly understood, the present invention defines and explains the technical terms involved therein.
[0060] Multi-window management of tiled layout: Figure 2 , which is a schematic diagram of multi-window management based on a tiled layout, the entire screen space is divided into multiple vertical areas, each area is used to display an application window, forming a tiled layout.
[0061] It should be noted that there are usually status bars on the upper and lower parts of the screen, but the present invention does not limit the upper and lower status bars, but only designs the upper and lower status bars in combination with most common screen distributions. Each application window is evenly distributed in the screen area (excluding the area of the upper and lower status bars), and there are small gaps between each window and between the window and the four side frames of the screen to separate each window.
[0062] Tree-based tile management: The present invention optimizes and improves the tree-based tile management algorithm, such as Figure 3 As shown in the figure, the tree-based tiling window manager internally represents the window as a leaf node, and the non-leaf nodes and the root node are separators. The separator recursively divides the window set, and the separator is passed from the parent node to the leaf node. Figure 4 As shown, the red line represents the separator generated by the root node. The root node has three children, two of which are split. The above tree structure represents the vertical division of the screen into three equal-sized partitions, which are evenly distributed among the sub-partitions. The blue line represents two vertical division lines, two of which are windows.
[0063] It should be noted that in the present invention, except for the region generated by the child nodes of the root node which is vertically segmented, the region generated by the child node segmentation of the remaining child nodes is horizontally segmented.
[0064] B+ tree: Considering that the tree-based tiled window manager represents windows as leaf nodes internally, that is, it can be understood that the tree structure only stores data in leaf nodes, and the B+ tree is a tree structure that stores all data in leaf nodes. The leaf nodes are arranged in order of size and connected by linked lists. The B+ tree is a self-balancing data structure that can automatically maintain balance after inserting and deleting windows. Window management and scheduling will not affect performance due to changes in the number of windows. In addition, the B+ tree can quickly locate a specific window in the leaf node linked list, and the linked list order will not be disrupted during addition and deletion operations, making the B+ tree a tiled layout that naturally adapts to adjustments.
[0065] In one embodiment of the present invention, a B+ tree-based tiled multi-window dynamic adaptive method specifically includes the following steps:
[0066] Step 1: Read the screen resolution length and width, and get the screen status bar length:
[0067] Step 1.1 obtains the resolution information of the current screen and reads the total length L and width W of the screen. These two parameters are used to calculate the available display area of the screen and then determine the basic unit of the window layout.
[0068] Step 1.2 Get the height S of the status bar (or task bar) at the top and bottom of the screen top and S bottomThe status bar usually displays system information and application icons, which takes up part of the screen space. Therefore, the occupancy of this area needs to be considered when calculating the window area.
[0069] Step 1.3 Calculate the available display area length based on the new information in steps 1.1 and 1.2:
[0070] L usable =LS top -S bottom
[0071] Step 2: Calculate the maximum number of nodes in the multi-branch tree and the maximum number of nodes in the B+ tree, and determine the order of the B+ tree
[0072] In the present invention, each tiled window has a minimum acceptable length and width, that is, when the length of the window reaches a set threshold, structural transformation and adjustment will be triggered, and when adjusting from a multi-branch tree to a B+ tree, its minimum acceptable width will also change.
[0073] Step 2.1 Initialize the minimum acceptance length L of the window under the multi-tree structure min and width W min_tree And the minimum acceptance width W of the window under the B+ tree structure min_b+ .
[0074] Step 2.2 calculates the maximum number of windows that can be accommodated in the vertical direction based on the data initialized in step 2.1 (the same for both structures because the height does not change):
[0075]
[0076] Step 2.3 calculates the maximum number of windows that can be accommodated in the horizontal direction based on the data initialized in step 2.1, under the multi-tree structure:
[0077]
[0078] Under the B+ tree structure:
[0079]
[0080] Where G is the gap between each window.
[0081] Step 2.4: Based on the results obtained in steps 2.1, 2.2, and 2.3, calculate the maximum number of windows that the screen can accommodate, and the maximum number of windows under the multi-tree structure (conversion threshold):
[0082] N max_tree =N w_tree
[0083] Maximum number of windows under the B+ tree structure:
[0084] N max_b+ =N w_b+ ×N h
[0085] Step 2.3 Calculate the order m of the B+ tree, from Figure 3 From the structure of , we can see that the value of m is the maximum number of windows that can be accommodated in the vertical direction, that is, m = N h .
[0086] Step 3: Dynamic Window Management
[0087] In a tiled layout, the number and size of windows may change with user operations, so dynamic window management is required to ensure the rationality and consistency of the layout. The following are the specific steps of dynamic window management:
[0088] Step 3.1 detects window changes. When a user opens a new window, the total number of windows is N++. When a user closes a window, the total number of windows is N--. For the convenience of representation, in the present invention, whether a new window is opened or a window is closed, the number of windows to be displayed in the available display area is expressed as N. That is, the current number of displayed windows in the available display area is N-1. When a user opens a new window, the number of windows to be displayed in the available display area is N. The current number of displayed windows in the available display area is N+1. When a user closes a window, the number of windows to be displayed in the available display area is N.
[0089] Step 3.2 determines the window number threshold and checks whether the number of currently opened windows N exceeds the maximum number of screen windows N under the multi-tree structure calculated in step 2.4. max_tree If N≤N max_tree Continue to use the multi-tree management structure and return to step 3.1. max_tree This triggers the conversion of the tree structure, switching the window management mode from multi-tree to B+ tree management.
[0090] Step 3.3 determines the window number threshold and checks whether the number of currently opened windows N exceeds the maximum number of screen windows N under the B+ tree structure calculated in step 2.4 max_b+ If N max_tree <N≤N max_b+ , then return to step 3.2. If N>N max_b+ , it is considered that the number of windows has exceeded the maximum number that the screen can accommodate, and a certain strategy needs to be adopted to remove some windows. In the present invention, several reference strategies are given, and a user click count C can be added to the data structure of each window. i field, it is considered that the window with more user clicks is a high-frequency window, and such windows are generally not considered for elimination. Then a recent usage time C field is added. When the user clicks on the i-th window, its Ti Updated to the current system time, the window that has not been used for the longest time is considered to be a low-frequency window, and this window can be considered to be eliminated. The present invention provides a method for determining elimination by a double-field combination, as shown in the following formula.
[0091]
[0092] Where ω1 and ω2 are weight coefficients, and the values of ω1 and ω2 can be adjusted according to needs. If you pay more attention to the user's usage frequency, you can set ω1>ω2. If you pay more attention to the recent usage time, set ω2>ω1, and ω2+ω1=1. C0 is the reference threshold of the number of clicks, which is used to normalize the number of clicks. T i is the interval between the most recent usage time of window i and the current time, which is used to evaluate the low frequency of usage of the window. i The larger the size, the easier it is to be retained; the smaller the size, the easier it is to be removed.
[0093] Step 3.4 calculates the PSWin of all open windows and sorts them from high to low, removes the window with the smallest PSWin from the screen, and replaces the deleted window with a new window.
[0094] Step 3.5: Continue to detect the window changes in step 3.1 and check whether the number of currently opened windows N is less than N. max_tree If it is less than, then return to step 3.2, and the window management structure is converted from B+ tree to multi-tree. If it is not less than, then return to step 3.3. If N=0, it means that there is no window on the screen, and the process ends.
[0095] In a specific example, the present invention realizes efficient management and layout optimization in a multi-window environment through a tiled multi-window dynamic adaptive algorithm based on a B+ tree. This section will describe the specific embodiments of the present invention in detail, and illustrate the principles of the present invention through the embodiments. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics. The principles and implementation methods of the present invention are described in detail below through specific embodiments.
[0096] The B+ tree-based tiled multi-window dynamic adaptive algorithm of the present invention specifically includes the following steps:
[0097] Step 1: Read the screen resolution length and width, and get the screen status bar length:
[0098] Step 1.1 obtains the resolution information of the current screen, and reads the total length L = 1080px and width W = 1920px of the screen. These two parameters are used to calculate the available display area of the screen, and then determine the basic unit of the window layout.
[0099] Step 1.2 Get the height S of the status bar (or task bar) at the top and bottom of the screentop =33px and S bottom =33px. The status bar usually displays system information and application icons, which occupies part of the screen space. Therefore, the area occupied by this area needs to be considered when calculating the window area.
[0100] Step 1.3 Calculate the available display area length based on the new information in steps 1.1 and 1.2:
[0101] L usable =LS top -S bottom =1014px
[0102] Step 2: Calculate the maximum number of nodes in the multi-branch tree and the maximum number of nodes in the B+ tree, and determine the order of the B+ tree
[0103] In the present invention, each tiled window has a minimum acceptable length and width, that is, when the length of the window reaches a set threshold, structural transformation and adjustment will be triggered, and when adjusting from a multi-branch tree to a B+ tree, its minimum acceptable width will also change.
[0104] Step 2.1 Initialize the minimum acceptance length L of the window under the multi-tree structure min =335px and width W min_tree =315px and the minimum acceptable width W of the window under the B+ tree structure min_b+ =635px.
[0105] Step 2.2 calculates the maximum number of windows that can be accommodated in the vertical direction based on the data initialized in step 2.1 (the same for both structures because the height does not change):
[0106]
[0107] Step 2.3 calculates the maximum number of windows that can be accommodated in the horizontal direction based on the data initialized in step 2.1, under the multi-tree structure:
[0108]
[0109] Under the B+ tree structure:
[0110]
[0111] Where G is the gap between each window.
[0112] Step 2.4: Based on the results obtained in steps 2.1, 2.2, and 2.3, calculate the maximum number of windows that the screen can accommodate, and the maximum number of windows under the multi-tree structure (conversion threshold):
[0113] N max_tree =Nw_tree =6
[0114] Maximum number of windows under the B+ tree structure:
[0115] N max_b+ =N w_b+ ×N h =3×3=9
[0116] Step 2.3 Calculate the order m of the B+ tree, from Figure 2 From the structure of , we can see that the value of m is the maximum number of windows that can be accommodated in the vertical direction, that is, m = N h =3.
[0117] Step 3: Dynamic Window Management
[0118] In a tiled layout, the number and size of windows may change with user operations, so dynamic window management is required to ensure the rationality and consistency of the layout. The following are the specific steps of dynamic window management:
[0119] Step 3.1 detects window changes. When a user opens a new window, the total number of windows is N++. When a user closes a window, the total number of windows is N--.
[0120] Step 3.2 determines the window number threshold and checks whether the number of currently opened windows N exceeds the maximum number of screen windows N under the multi-tree structure calculated in step 2.4. max_tree If N <N max_tree Continue to use the multi-tree management structure and return to step 3.1. If N ≥ N max_tree This triggers the tree structure conversion, switching the window management mode from multi-tree to B+ tree management. Figure 5 As shown, when N=6, the threshold for converting from a multi-tree structure to a B+ tree structure is reached, and a window management structure conversion is required. After the conversion, the tree structure and screen window distribution are as follows Figure 6 As shown, the first three leaf nodes and the last three leaf nodes are uniformly managed by one parent node, and the corresponding screen distribution is that two parent nodes divide the screen vertically into two parts, and the three leaf nodes are evenly divided into three identical areas horizontally.
[0121] Step 3.3 determines the window number threshold and checks whether the number of currently opened windows N exceeds the maximum number of screen windows N under the B+ tree structure calculated in step 2.4 max_b+ If N max_tree ≤N <N max_b+ , then return to step 3.2. If N ≥ N max_b+, it is considered that the number of windows has exceeded the maximum number that the screen can accommodate, and a certain strategy needs to be adopted to remove some windows. In the present invention, several reference strategies are given, and a user click count C can be added to the data structure of each window. i field, it is considered that the window with more user clicks is a high-frequency window, and such windows are generally not considered for elimination. Then a recent usage time C field is added. When the user clicks on the i-th window, its T i Updated to the current system time, the window that has not been used for the longest time is considered to be a low-frequency window, and this window can be considered to be eliminated. The present invention provides a method for determining elimination by a double-field combination, as shown in the following formula.
[0122]
[0123] Where ω1 and ω2 are weight coefficients, and the values of ω1 and ω2 can be adjusted according to needs. If you pay more attention to the user's usage frequency, you can set ω1>ω2. If you pay more attention to the recent usage time, set ω2>ω1, and ω2+ω1=1. C0 is the reference threshold of the number of clicks, which is used to normalize the number of clicks. T i is the interval between the most recent usage time of window i and the current time, which is used to evaluate the low frequency of usage of the window. i The larger the size, the easier it is to be retained, and the smaller the size, the easier it is to be removed. Figure 7 As shown, when N=9, the screen has reached the maximum number of windows and no more windows can be added. They need to be deleted according to the above elimination strategy.
[0124] Step 3.4 calculates the PSWin of all open windows and sorts them from high to low, removes the window with the smallest PSWin from the screen, and replaces the deleted window with a new window.
[0125] Step 3.5: Continue to detect the window changes in step 3.1 and check whether the number of currently opened windows N is less than N. max_tree If it is less than, return to step 3.2, and convert the window management structure from B+ tree to multi-tree. If it is not less than, return to step 3.3. If N=0, it means that there is no window on the screen, and the process ends.
[0126] Experimental example: The DWAS algorithm experiment is used to verify the effectiveness of the multi-window dynamic adaptive adjustment algorithm (DWAS) designed in this paper. This part simulates different changes in the number of windows to test whether the system can smoothly switch the window management structure after reaching the set threshold. In the experiment, the display system is displayed on a PHILIPS display with a resolution of 1920×1080. The parameters of the length of the upper and lower status bars of the rest of the screen, the gap between windows, and the minimum acceptable width and length of the switched window are shown in Table 1. The px in the parameter value represents pixels, that is, the unit of dots on the screen, which is widely used in computer graphics, image processing, display technology and other fields, and can also be used to measure screen size, window width, etc.
[0127] Table 1 DWAS experimental parameters
[0128]
[0129] The parameters set in Table 1 will take effect when they are written into the config configuration file of this display system. Through calculation, it can be obtained that the maximum number of windows that can be accommodated in the multi-tree structure is 6, the maximum number of windows that can be accommodated in the horizontal direction is 3 under the B+ tree management structure, and the maximum number of windows that can be accommodated in the vertical direction is 3. Therefore, the maximum number of windows that the screen can accommodate under the two management structures is 6 and 9 respectively.
[0130] Next, when using this display system, simulate opening multiple applications and record the screen changes when the number of windows changes. Graphic applications including audio and video, office suites, GIS map tools, etc. can be transplanted to the display system. Randomly click on the application on the desktop. The window status callback mechanism in the input management module in the synthesizer will record the number of clicks and the most recent use time of each window on the screen. Record the display of windows with 2, 4, 6, 8, and 9 windows on the screen respectively. When the maximum threshold of 9 windows on the screen is reached, continue to randomly click on the application to verify whether the double-field elimination principle will be triggered. The simulated application click order is terminal, Radar, vlc, marble, qpdfviews, gwenview, gedit, kmplot, mpv, and evince.
[0131] When N=2 and N=4, a multi-tree management structure is used, and the application vertically divides the screen. When N=6 and N=8, a B+ tree management structure is used. The former has two workspaces, which divide the screen vertically and evenly. Each workspace is horizontally divided by three applications. The latter has three workspaces. The first two workspaces are horizontally divided by three applications, and the last workspace is horizontally divided by two applications. When the number of windows continues to increase to 9, it reaches the set threshold. When a new window is opened, a window with the lowest priority score needs to be selected from the screen to replace it. In this simulation, the number of clicks of the first 9 applications is set to C. iand time difference T i As shown in Table 2.
[0132] Table 2 Double field parameters of the first 9 applications
[0133]
[0134] The priority scores PSWin of the first 9 applications can be calculated based on the initialized C0, ω1 and ω2 parameters. The calculation results are as follows: Figure 8 shown.
[0135] Among the first 9 applications, Radar and gedit have the lowest priority scores, both of which have a score of 0.4930. When multiple applications have the same priority score, according to the set selection rules, the priority replacement application needs to be determined based on the order of appearance of the tree nodes in the window tree structure. According to the tree node order, Radar is under the first middle node and gedit is under the third middle node. Radar appears earlier than gedit, that is, Radar will be replaced by the later opened application evince. When N=9, the three workspaces display the first 9 applications in order. When the 10th application evince is opened, the application to be replaced is Radar, which is located in the middle part of the first workspace. After evince is opened, the position to replace Radar is displayed in the middle part of the first workspace.
[0136] Based on the above embodiments, the embodiments of the present application further provide a computer program, which, when executed on a computer, enables the computer to execute the methods provided in the above embodiments.
[0137] Based on the above embodiments, the embodiments of the present application further provide a computer storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the method provided in the above embodiments.
[0138] The storage medium may be any available medium that can be accessed by a computer. For example, but not limited to, a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
[0139] Based on the above embodiments, an embodiment of the present application further provides a chip, which is used to read a computer program stored in a memory to implement the method provided in the above embodiments.
[0140] Based on the above embodiments, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the method provided in the above embodiments is implemented.
[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0142] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0145] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A B+ tree-based tiled multi-window dynamic adaptive method, characterized in that: The steps include: Obtaining a first maximum number of windows that can be accommodated in the available display area under the first tree-structure tiled window management mode, and a second maximum number of windows that can be accommodated in the available display area under the second tree-structure tiled window management mode; wherein the second maximum number of windows is greater than the first maximum number of windows; When the window manager receives a command to open a new window or close a window, it: (a) the number of windows to be displayed in the available display area is not greater than the first maximum number of windows, the window manager sets the current tree structure tiled window management mode to the first tree structure tiled window management mode, and opens a new window or closes a window; (b) the number of windows to be displayed in the available display area is greater than the first maximum number of windows and not greater than the second maximum number of windows, the window manager sets the current tree structure tiled window management mode to the second tree structure tiled window management mode, and opens a new window or closes a window; (c) the number of windows to be displayed in the available display area is greater than the second maximum number of windows, the window manager determines the window to be closed according to the number of user clicks on the window and the most recent usage time and closes it, so that the number of windows to be displayed in the available display area is not greater than the second maximum number of windows and greater than the first maximum number of windows, and sets the current tree structure tiled window management mode to the second tree structure tiled window management mode, and opens a new window; The first tree structure tiled window management mode is a multi-branch tree structure tiled window management mode, and the second tree structure tiled window management mode is a B+ tree structure tiled window management mode.
2. The B+ tree-based tiled multi-window dynamic adaptive method according to claim 1, characterized in that: in, The method for obtaining a first maximum number of windows that can be accommodated in an available display area under a first tree structure tiled window management mode and a second maximum number of windows that can be accommodated in an available display area under a second tree structure tiled window management mode comprises the following steps: Initialize the minimum acceptance length L of the window in the first tree structure tiled window management mode min and the minimum acceptable width W min_tree And the minimum acceptable width W of the window in the second tree structure tiling window management mode min_b+ ; According to the length L of the available display area usable , the gap between screens G and the minimum acceptance length L min , calculate the maximum number of windows N that can be accommodated in the vertical direction of the available display area h , as shown below: According to the total width W of the screen, the gap G between the screens and the minimum acceptable width W min_tree , calculate the maximum number of windows N that can be accommodated in the horizontal direction of the available display area in the first tree structure tiled window management mode w_tree , as shown below: According to the total width W of the screen, the gap G between the screens and the minimum acceptable width W min_b+ , calculate the maximum number of windows N that can be accommodated in the horizontal direction of the available display area in the second tree structure tiled window management mode w_b+ , as shown below: According to the maximum number of windows N w_tree , calculate the first maximum number of windows N that can be accommodated in the available display area in the first tree structure tiled window management mode max_tree , as shown below: N max_tree =N w_tree According to the maximum number of windows N w_b+ And the maximum number of windows N h , calculate the second maximum number of windows N that can be accommodated in the available display area in the second tree structure tiled window management mode max_b+ , as shown below: N max_b+ =N w_b+ ×N h 。 3. The B+ tree-based tiled multi-window dynamic adaptive method according to claim 2, characterized in that: in, The method for obtaining the available display area comprises the following steps: Get the total length L and width W of the screen; Get the height S of the top sidebar of the screen top and the height of the bottom sidebar S bottom ; Wherein, the sidebar includes a status bar and / or a task bar; Calculate the length L of the available display area usable .
4. The B+ tree-based tiled multi-window dynamic adaptive method according to claim 3, characterized in that: in, Calculate the length L of the available display area usable , as shown below: L usable =L-S top -S bottom 。 5. The B+ tree-based tiled multi-window dynamic adaptive method according to any one of claims 1 to 4, characterized in that: The window manager receives an instruction to open a new window or an instruction to close a window, and the number of windows to be displayed in the available display area is N; The number of windows to be displayed in the available display area in (a) is not greater than the first maximum number of windows, as shown in the following formula: N≤N max_tree The window manager determines the current tree structure tiling window management mode, and if the current tree structure tiling window management mode is the first tree structure tiling window management mode, maintains the current tree structure tiling window management mode; if the current tree structure tiling window management mode is the second tree structure tiling window management mode, switches the current tree structure tiling window management mode to the first tree structure tiling window management mode; The number of windows to be displayed in the available display area in (b) is greater than the first maximum number of windows and not greater than the second maximum number of windows, as shown in the following formula: N max_tree <N≤N max_b+ The window manager determines the current tree structure tiling window management mode, and if the current tree structure tiling window management mode is the second tree structure tiling window management mode, maintains the current tree structure tiling window management mode; if the current tree structure tiling window management mode is the first tree structure tiling window management mode, switches the current tree structure tiling window management mode to the second tree structure tiling window management mode; The number of windows to be displayed in the available display area in (c) is greater than the second maximum number of windows, as shown in the following formula: N>N max_b+ The window manager determines the windows to be closed and closes them according to the number of user clicks on the windows and the most recent usage time, so that the number of windows to be displayed in the available display area is not greater than the second maximum number of windows and greater than the first maximum number of windows, and maintains the current tree structure tiled window management mode as the second tree structure tiled window management mode.
6. The B+ tree-based tiled multi-window dynamic adaptive method according to claim 5, characterized in that: in, The window manager determines a window to be closed according to the number of user clicks on the window and the most recent usage time and closes it, so that the number of windows to be displayed in the available display area is equal to the second maximum number of windows, and maintains the current tree structure tiled window management mode as the second tree structure tiled window management mode.
7. The B+ tree-based tiled multi-window dynamic adaptive method according to any one of claims 1 to 6, characterized in that: in, Determining the window to be closed according to the number of user clicks on the window and the most recent usage time includes the following steps: Calculate the PSWin of the current display window in each available display area; The current display window corresponding to the one or more current display windows with the smallest PSWin value in each of the available display areas is closed.
8. The B+ tree-based tiled multi-window dynamic adaptive method according to claim 7, characterized in that: in, The PSWin of the current display window in each available display area is calculated as shown in the following formula: Where ω1 and ω2 are weight coefficients, C0 is the reference threshold of the number of clicks, and T i The interval between the most recent usage time of window i and the current time.
9. An electronic device, comprising: One or more processors, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the electronic device, enable the electronic device to perform any one of the methods described in claims 1-8.
10. A computer-readable storage medium, comprising a computer program, and when the computer program is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Large-breadth interactive desktop-oriented multi-user window system
CN102141893A
Interface display direction switching method, device and system, electronic equipment and medium
CN117555636A
Multi-window based graphical user interface (GUI) for web applications
US20050278698A1
Multi-window management apparatus and program, storage medium and information processing apparatus
US20100088634A1