A label aggregation method, computing device, and readable storage medium
By automatically detecting and aggregating tags from the same domain or directory in the browser, the problem of insufficient display of key information caused by tag length compression in the browser is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202111681564.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2041-12-29
AI Technical Summary
When too many tabs are open in a browser, tab compression can prevent the display of key information from being fully shown, making it more difficult for users to locate specific tabs.
This paper provides a tag aggregation method that detects the number and length of tags in the browser, parses the tag URLs to obtain the domain name and virtual directory, automatically aggregates tags of the same domain name or the same directory, displays the aggregated tags, and shows key information when hovering.
This effectively avoids the problem of insufficient display of key information caused by tag length compression, shortens the time it takes for users to locate the target tag page, and improves the user experience.
Smart Images

Figure CN114417199B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer, in particular to a label aggregation method, a computing device and a readable storage medium. BACKGROUND
[0002] In the process of using a browser application, a user often opens a large number of tabs due to work needs. When the number of opened tabs exceeds a certain number, in order to display all tabs corresponding to the tabs in the tab bar, the length of the tabs is generally compressed. However, the compression of the length of the tabs will result in that the tabs cannot fully display the key information of the tabs they correspond to. In this way, the user will greatly increase the difficulty of locating the tabs.
[0003] Therefore, there is an urgent need for a label aggregation method to solve the above problems. SUMMARY
[0004] Therefore, the present application provides a label aggregation method, a computing device and a readable storage medium, in an attempt to solve or at least alleviate the above problems.
[0005] According to one aspect of the present application, a label aggregation method is provided, which is executed in a computing device, and the method comprises: when a new tab is added in a browser, detecting whether label aggregation is needed; if so, obtaining the URLs of all tabs in the browser; parsing the URLs to obtain the domain names and virtual directories corresponding to each tab; and performing label aggregation based on the domain names and virtual directories corresponding to each tab.
[0006] Optionally, in the label aggregation method according to the present application, the step of detecting whether label aggregation is needed comprises: obtaining the length of the tab bar, the default length of the tabs and the number of all tabs in the browser; obtaining the length required for displaying all tabs in the default length based on the number of all tabs and the default length of the tabs; and detecting whether the length required for displaying all tabs in the default length is greater than the length of the tab bar.
[0007] Optionally, in the label aggregation method according to the present application, the step of performing label aggregation based on the domain names and virtual directories corresponding to each tab comprises: detecting whether there are tabs corresponding to the same domain name; if so, determining multiple tabs corresponding to the same domain name as a candidate tab set; and performing label aggregation based on the virtual directories corresponding to each candidate tab in all candidate tab sets.
[0008] Optionally, in the label aggregation method according to the present application, the step of performing label aggregation based on the virtual directories corresponding to the candidate labels in each candidate label set comprises: determining a first-level directory in the virtual directory corresponding to each candidate label as a to-be-detected directory; detecting whether there is a same directory in each to-be-detected directory in each candidate label set; and if there is no same directory in each candidate label set, aggregating all candidate labels in each candidate label set as an aggregated label.
[0009] Optionally, in the label aggregation method according to the present application, if there is a same directory in each candidate label set, the method further comprises: determining a candidate label corresponding to the same directory in each candidate label set as a selected label; determining a sub-directory in the virtual directory corresponding to each selected label as a to-be-detected directory; detecting whether there is a same directory in each to-be-detected directory in each candidate label set; and if there is still a same directory, repeating the steps of determining a selected label, determining a to-be-detected directory, and detecting a same directory until there is no same directory, and then aggregating all selected labels in each candidate label set as an aggregated label.
[0010] Optionally, in the label aggregation method according to the present application, the method further comprises: displaying an aggregated label identifier and the number of aggregated labels on the aggregated label.
[0011] Optionally, in the label aggregation method according to the present application, the method further comprises: when detecting that a cursor hovers over the aggregated label, displaying key information of the label pages corresponding to the labels aggregated by the aggregated label.
[0012] Optionally, in the label aggregation method according to the present application, the key information at least comprises one of a title of a label page, a URL of a label page, and a thumbnail of a label page.
[0013] Optionally, in the label aggregation method according to the present application, the step of displaying the key information of the label pages corresponding to the labels aggregated by the aggregated label comprises: displaying each key information in a tiled form; or displaying each key information in a tree structure form.
[0014] According to still another aspect of the present application, there is provided a computing device comprising: at least one processor; and a memory storing program instructions configured to be executed by the at least one processor, the program instructions comprising instructions for performing the label aggregation method according to the present application.
[0015] According to still another aspect of the present application, there is provided a readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform the label aggregation method according to the present application.
[0016] According to the label aggregation method of the present application, when a label is added in the browser, firstly, it is detected whether label aggregation is needed. If yes, the URLs of all labels in the browser are acquired. Then, the URLs of all labels are parsed to obtain the domain names and virtual directories corresponding to the labels. Finally, based on the domain names and virtual directories corresponding to the labels, label aggregation is performed. It can be seen that when a label is added in the browser, the present application can automatically detect whether label aggregation is needed. If yes, the labels are automatically aggregated according to the domain names and virtual directories corresponding to the labels. Obviously, for the case that too many tabs are opened, the present application can effectively avoid the problem that the labels cannot fully display the key information of the tab pages corresponding to the labels due to the compression of the length of the labels, so as to shorten the time for the user to locate the target tab page and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0017] To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the principles disclosed herein can be practiced and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above- and other advantages of the present disclosure, as defined solely by the claims, will become more fully apparent from the detailed description given herein below and the accompanying drawings. The above- and other advantages of the present disclosure, as defined solely by the claims, will become more fully apparent from the detailed description given herein below and the accompanying drawings, wherein like reference numerals refer to like elements throughout the several views.
[0018] Figure 1 A structural block diagram of a computing device 100 according to one embodiment of the present application is shown;
[0019] Figure 2 A flow chart of a label aggregation method 200 according to one embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram showing that the key information of the tab pages corresponding to the labels aggregated by the aggregated labels is displayed in a tiled form according to one embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram showing that the key information of the tab pages corresponding to the labels aggregated by the aggregated labels is displayed in a tree structure form according to one embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] Exemplary embodiments of the present disclosure will be described herein below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.
[0023] Figure 1A structural block diagram of a computing device 100 according to an embodiment of the present invention is shown. It should be noted that... Figure 1 The computing device 100 shown is merely an example. In practice, the computing device used to implement the tag aggregation method of the present invention can be any type of device, and its hardware configuration can be similar to... Figure 1 The computing device 100 shown is the same as, and can also be the same as, the computing device 100 shown. Figure 1 The computing device 100 shown is different. In practice, the computing device used to implement the tag aggregation method of the present invention can... Figure 1 The hardware components of the computing device 100 shown may be added or removed. This invention does not limit the specific hardware configuration of the computing device.
[0024] like Figure 1 As shown, in the basic configuration 102, the computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 can be used for communication between the processors 104 and the system memory 106.
[0025] Depending on the desired configuration, processor 104 can be any type of processor, including but not limited to: microprocessor (μP), microcontroller (μC), digital information processor (DSP), or any combination thereof. Processor 104 may include one or more levels of cache such as L1 cache 110 and L2 cache 112, processor core 114, and registers 116. Example processor core 114 may include an arithmetic logic unit (ALU), floating-point unit (FPU), digital signal processing core (DSP core), or any combination thereof. Example memory controller 118 may be used with processor 104, or in some implementations, memory controller 118 may be an internal part of processor 104.
[0026] Depending on the desired configuration, the system memory 106 can be of any type including but not limited to volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.) or any combination thereof. Physical memory in a computing device typically refers to volatile memory, such as RAM, where data is required to be loaded for the processor 104 to read. The system memory 106 can include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the applications 122 are arranged to operate on the operating system 120 by one or more processors 104 using the program data 124 to execute instructions. The operating system 120, for example, can be a Linux, Windows, etc., that includes program instructions for handling basic system services and performing hardware dependent tasks. The applications 122 include program instructions for implementing user desired functions, such as a browser, instant messaging software, software development tools (e.g., an integrated development environment (IDE), a compiler, etc.), etc., but are not limited thereto. When the applications 122 are installed into the computing device 100, a driver module can be added to the operating system 120.
[0027] When the computing device 100 is activated, the processor 104 reads the program instructions of the operating system 120 from the system memory 106 and executes. The applications 122 run on top of the operating system 120, utilizing the interfaces provided by the operating system 120 and underlying hardware to implement various user desired functions. When a user activates an application 122, the application 122 is loaded into the system memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the system memory 106.
[0028] The computing device 100 also includes a storage device 132 that includes a removable storage 136 and a non-removable storage 138, both of which are connected to the storage interface bus 134.
[0029] The computing device 100 can also include an interface bus 140 for facilitating communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150, which can be configured to facilitate communication to various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 include a serial interface controller 154 or a parallel interface controller 156, which can be configured to facilitate communication to various external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripheral devices (e.g., printer, scanner, etc.) via one or more I / O ports 158. An example
[0030] Network communication links can be one example of communication media. Communication media can typically be embodied by computer readable instructions, data structures, program modules, and other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. A "modulated data signal" can be a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media can include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), microwave, infrared (IR) and other wireless media. The term computer readable media as used herein can include both storage media and communication media.
[0031] In the computing device 100 according to the present application, the application 122 includes instructions for performing the tag aggregation method 200 of the present application, which can instruct the processor 104 to perform the tag aggregation method of the present application. Those skilled in the art can understand that, in addition to the instructions for performing the tag aggregation method 200, the application 122 can also include other applications 126 for implementing other functions.
[0032] Figure 2 A flowchart of a tag aggregation method 200 according to one embodiment of the present application is shown, which is suitable for execution in a computing device (e.g. Figure 1 The computing device 100 shown.
[0033] When a user opens a new webpage in a browser, the browser typically adds a tab corresponding to that webpage to its tab bar, which is usually displayed with a default length. However, when too many webpages are open in the browser, the total length of all the tabs will exceed the tab bar's length. In this case, to ensure that the tabs corresponding to all open webpages are displayed in the tab bar, the browser usually automatically compresses the tab length. However, compressing the tab length can lead to the tab not fully displaying the key information of its corresponding tab.
[0034] Based on this, the present invention proposes setting a tag aggregation condition. When a new tag is added in the browser, it is first determined whether the tag aggregation condition is met. If it is met, it is determined that the tag needs to be aggregated. Then, the currently displayed tags (i.e., the tags corresponding to the web pages already opened in the browser) and the newly added tag are aggregated. It should be noted that each opened web page is generally referred to as a tab page, and one tab page corresponds to one tag.
[0035] like Figure 2 As shown, the tag aggregation method 200 of the present invention begins with step S210. In step S210, when a new tag is added in the browser, it is detected whether tag aggregation is needed. Specifically, firstly, the length of the tab bar in the browser, the default length of the tags, and the total number of tags are obtained. The length of the tab bar in the browser refers to the current length of the tab bar in the browser. The default length of the tag refers to the standard display length of a tag in the browser when it is not compressed. All tags refer to the tags corresponding to the tabs already opened in the browser and the newly added tags. That is, the total number of tags is the sum of the number of tags already displayed in the browser and the number of newly added tags, or the number of displayed tags plus one. The displayed tags can be either single tags (i.e., a single tag as referred to in the prior art) or aggregated tags (aggregated tags will not be discussed here but will be explained later). It should be noted that the display length of an aggregated tag and a single tag is the same.
[0036] Then, based on the total number of tags and their default length, determine the length required to display all tags at their default length. Finally, check if the length required to display all tags at their default length is greater than the tab bar length. If so, determine that tag aggregation is necessary. Otherwise, simply add the tag in the browser.
[0037] Of course, the label aggregation can also be detected by detecting whether the remaining available length of the tab bar is less than the default length of the label. Specifically, when a label is added in the browser, the length of the tab bar in the browser, the default length of the label and the number of displayed labels are first acquired. Then, the remaining available length of the tab bar is calculated. Finally, it is detected whether the remaining available length of the tab bar is less than the default length of the label. If yes, it is determined that the label aggregation is needed. Otherwise, the label is directly added in the browser.
[0038] According to another embodiment of the present application, a threshold value can also be set. When a label is added in the browser, it is judged whether the number of all labels is greater than the threshold value. If yes, it is determined that the label aggregation is needed. Otherwise, the label is directly added in the browser. That is, the label aggregation can also be detected by detecting whether the number of all labels is greater than the threshold value. The present application does not limit the way of detecting whether the label aggregation is needed. In the specific embodiment, the skilled in the art can set according to the actual need.
[0039] After it is determined that the label aggregation is needed, the step S220 is entered, and the URLs of all labels in the browser are acquired. One URL (Uniform Resource Locator) generally consists of the domain name, the virtual directory and the file name and parameters after the virtual directory.
[0040] www.M.com / α / β / γ / index.asp?boardID=5&ID=24618&page=1#name
[0041] In the above URL, "www.M.com" is the domain name part of the URL. From the first " / " after the domain name to the last " / ", it is the virtual directory part of the URL. Generally, the directories in the virtual directory part are divided into multiple levels by " / ". Specifically, from the first " / " after the domain name, every two adjacent " / " is one level of directory, and the level is lower and lower. Obviously, " / α / β / γ / " is the virtual directory part of the URL, which consists of three levels of directories, "α" is the first level directory, "β" is the second level directory, and "γ" is the third level directory. In addition, from the last " / " after the domain name to the end, it is the file name and parameter part of the URL, i.e. "index.asp?boardID=5&ID=24618&page=1#name" is the file name and parameter part of the URL.
[0042] It is to be noted that, one single tab refers to a tab which is not aggregated, i.e. a tab as referred to in the prior art, and corresponds to one tab page. Therefore, the URL of one single tab refers to the URL of the tab page corresponding to the single tab. It is also to be noted that, one aggregated tab refers to a tab which is aggregated from multiple single tabs, and corresponds to multiple tab pages. Therefore, the URL of one aggregated tab refers to the common part of the URLs of the tab pages corresponding to the multiple tabs aggregated in the aggregated tab. The URL of an aggregated tab will be described in detail later, and will not be described here.
[0043] At this point, the URLs of all tabs in the current browser are obtained, and then the step S230 is entered to parse the URLs to obtain the domain names and virtual directories corresponding to the tabs. As mentioned above, the URL generally consists of a domain name, a virtual directory, and a file name, parameters, etc. after the virtual directory. Therefore, by parsing the URLs of all tabs, the domain names and virtual directories corresponding to the tabs can be obtained. Taking the URLs of the tabs shown in the above example as an example, the domain name corresponding to the tab is "www.M.com", and the virtual directory corresponding to the tab is " / α / β / γ / ". The URLs of the tabs are parsed to obtain the domain names and virtual directories corresponding to the tabs.
[0044] Then, the step S240 is entered to aggregate the tabs based on the domain names and virtual directories corresponding to the tabs. Specifically, based on the domain names corresponding to the tabs, it is detected whether there are tabs corresponding to the same domain name. If there are, the multiple tabs corresponding to the same domain name are determined as one candidate tab set. That is, the tabs corresponding to the same domain name are grouped into one set. Then, the tabs are aggregated based on the virtual directories corresponding to the tabs in all candidate tab sets. The tabs can be aggregated based on the virtual directories corresponding to the tabs in all candidate tab sets in the following manner.
[0045] Firstly, a first-level directory in the virtual directory corresponding to each candidate label is determined as a to-be-detected directory. That is, the first-level directories in the virtual directories corresponding to each candidate label in all candidate label sets are obtained, and each first-level directory is determined as a to-be-detected directory. Then, it is detected whether there is a same directory in each to-be-detected directory in each candidate label set. That is, for each candidate label set, it is detected whether there is a same directory in the to-be-detected directories corresponding to each candidate label in the candidate label set. If there is no same directory in each candidate label set, all candidate labels in each candidate label set are aggregated as an aggregated label. That is, when there is no same directory in the first-level directories corresponding to each candidate label in each candidate label set, the labels corresponding to the same domain name are aggregated as an aggregated label. Of course, if there are multiple candidate label sets, candidate labels in only one candidate label set can be aggregated as an aggregated label, and candidate labels in the remaining candidate label sets are not processed. Whether candidate labels in each candidate label set are aggregated as an aggregated label or only candidate labels in one candidate label set are aggregated as an aggregated label is not limited in the present application. In specific embodiments, a person skilled in the art can set it according to actual needs.
[0046] If there is a same directory in a candidate label set, the candidate label corresponding to the same directory in the candidate label set is determined as a candidate label. That is, when there is a same directory in the first-level directories corresponding to candidate labels in several candidate label sets, for each candidate label set in which there is a same first-level directory, the candidate label corresponding to the same first-level directory in the candidate label set is determined as a candidate label.
[0047] Then, a lower-level directory in the virtual directory corresponding to each candidate label is determined as a to-be-detected directory. That is, for each candidate label set in which there is a same first-level directory, the next-level directory (i.e., the second-level directory) in the virtual directory corresponding to the candidate label is obtained, and the next-level directory in the virtual directory corresponding to the candidate label is determined as a to-be-detected directory.
[0048] Then, it is detected whether there is a same directory in each to-be-detected directory in each candidate label set. That is, for each candidate label set in which there is a same first-level directory, it is detected whether there is a same directory in the to-be-detected directories corresponding to each candidate label in the candidate label set.
[0049] If the same directory still exists, the steps of determining the candidate label, determining the directory to be detected and detecting the same directory are repeated until it is detected that the same directory does not exist, and then all the candidate labels in each candidate label set detected last time are aggregated into one aggregated label. That is, when there are still candidate labels in several candidate label sets corresponding to the same secondary directory, for each candidate label set with the same secondary directory, the candidate label corresponding to the same secondary directory is determined as the candidate label. Then, for each candidate label set with the same secondary directory, the next level directory (i.e. the tertiary directory) in the virtual directory corresponding to the candidate label is obtained, and the next level directory in the virtual directory corresponding to the candidate label is determined as the directory to be detected. Finally, for each candidate label set with the same secondary directory, it is detected whether there is the same directory in the tertiary directory corresponding to each candidate label. If there is, the above steps of determining the candidate label, determining the directory to be detected and detecting the same directory are repeated until, at a certain detection time, there is no same directory in the directory to be detected corresponding to each candidate label in the candidate label set at this time, and then the detection is not continued, and all the candidate labels in each candidate label set detected this time are aggregated into one aggregated label. Further, when it is detected whether there is the same directory in the N+1 level directory corresponding to each candidate label in each candidate label set with the same N level directory, if it is detected that there is no same directory in the N+1 level directory corresponding to each candidate label in each candidate label set with the same N level directory, the detection is not continued, and all the candidate labels in each candidate label set with the same N level directory are aggregated into one aggregated label.
[0050] It should be noted that if there are multiple candidate label sets detected last time, only the candidate labels in one candidate label set can be aggregated into one aggregated label, and the candidate labels in the remaining candidate label sets are not processed. Whether the candidate labels in each candidate label set detected last time are all aggregated into one aggregated label or only the candidate labels in one candidate label set are aggregated into one aggregated label is not limited in the present application. In specific embodiments, those skilled in the art can set according to actual needs.
[0051] It can be seen that the present application aggregates multiple labels corresponding to the same domain name or multiple labels with intersection in the virtual directory under the same domain name into one aggregated label, and therefore the URL of the aggregated label can be the same part of the URLs of the aggregated multiple labels. For example, the label with the URL www.A.com / B / C and the label with the URL www.A.com / B / D are aggregated into one aggregated label, and the URL of the aggregated label is the same part www.A.com / B of the URLs.
[0052] In order to better understand the tag aggregation method of the present application, a specific example is given below. There are 7 tags displayed in the current browser according to the default length, all of which are single tags. Specifically, the URL of tag 1 is www.A.com, the URL of tag 2 is www.A.com / T, the URL of tag 3 is www.A.com / B, the URL of tag 4 is www.A.com / B / C, the URL of tag 5 is www.A.com / B / D, the URL of tag 6 is www.A.com / B / C / F, and the URL of tag 7 is www.Q.com. At this time, the user triggers an event of newly opening a webpage with a URL of www.A.com / B / C / E / P in the browser.
[0053] For the computing device, when the event of newly opening a webpage with a URL of www.A.com / B / C / E / P is listened to, it will add a tag 8 corresponding to the URL in the tab bar of the browser. Specifically, the available length T of the tab bar of the browser, the default display length L of the tag, and the number 8 of all current tags are first obtained. Then, the length required for displaying all tags in the default length is calculated as 8L. Finally, it is judged whether 8L is greater than T. If not, a tag 8 corresponding to the URL is directly added in the tab bar of the browser.
[0054] If 8L is greater than T, the URLs of all tags are obtained, and the domain name and virtual directory corresponding to each tag are obtained by parsing all obtained URLs. Specifically, the domain name corresponding to tag 1 is www.A.com, and the corresponding virtual directory is empty; the domain name corresponding to tag 2 is www.A.com, and the corresponding virtual directory is / T; the domain name corresponding to tag 3 is www.A.com, and the corresponding virtual directory is / B; the domain name corresponding to tag 4 is www.A.com, and the corresponding virtual directory is / B / C; the domain name corresponding to tag 5 is www.A.com, and the corresponding virtual directory is / B / D; the domain name corresponding to tag 6 is www.A.com, and the corresponding virtual directory is / B / C / F; the domain name corresponding to tag 7 is www.Q.com, and the corresponding virtual directory is empty; and the domain name corresponding to tag 8 is www.A.com, and the corresponding virtual directory is / B / C / E / P.
[0055] Then, it is detected whether there are tags corresponding to the same domain name. Obviously, tags 1 to 6 and tag 8 correspond to the same domain name www.A.com, so tags 1 to 6 and tag 8 are determined as a candidate tag set.
[0056] Finally, since the virtual directory corresponding to label 1 is empty, the first level directories T, B, B, B, B, B in the virtual directories corresponding to labels 2 to 6 and label 8 are determined as a to-be-detected directory, respectively, and it is detected whether there is a same directory in each to-be-detected directory in the candidate label set. Obviously, there is a same directory B in each to-be-detected directory in the candidate label set, and then labels 3 to 6 and label 8 corresponding to the same first level directory B are determined as candidate labels. Since the second level directory in the virtual directory corresponding to label 3 is empty, the second level directories C, D, C, C in the virtual directories corresponding to labels 4 to 6 and label 8 are determined as a to-be-detected directory, respectively, and it is continued to be detected whether there is a same directory in each to-be-detected directory. Obviously, there is a same directory C in each to-be-detected directory in the candidate label set, and then labels 4, 6 and 8 corresponding to the same second level directory C are determined as candidate labels again. Since the third level directory in the virtual directory corresponding to label 4 is empty, the third level directories F and E in the virtual directories corresponding to labels 6 and 8 are determined as a to-be-detected directory, respectively, and it is continued to be detected whether there is a same directory in each to-be-detected directory. Obviously, the to-be-detected directories F and E are different at this time, and then the detection is stopped. And the candidate labels 4, 6 and 8 in the candidate label set in the last detection are aggregated as an aggregated label.
[0057] After the candidate labels 4, 6 and 8 are aggregated as an aggregated label, there are 6 labels displayed in the browser according to the default length at this time, of which 5 are single labels and 1 is an aggregated label, and the specific labels are as follows: label 1, whose URL is www.A.com; label 2, whose URL is www.A.com / T; label 3, whose URL is www.A.com / B; label 5, whose URL is www.A.com / B / D; label 7, whose URL is www.Q.com; and aggregated label 1, whose URL is www.A.com / B / C.
[0058] Afterwards, when the user triggers the tab page events of newly opening a URL www.Q.com / Y (corresponding to tab 9) and www.K.com (corresponding to tab 10) in the browser in succession, for the computing device, when it listens to the tab page event of newly opening a URL www.K.com, it calculates that the length required for displaying all the tabs in the default length is 8L, which is greater than the available length T of the tab bar of the browser again, then according to the tab aggregation method of the present application, the tabs are aggregated again, then tab 3, tab 5 and aggregated tab 1 are aggregated into aggregated tab 2, and the URL of aggregated tab 2 is www.A.com / B. At this time, the tabs displayed in the browser in the default length are 6, of which 5 are single tabs and 1 is an aggregated tab, and the specific tabs are: tab 1, whose URL is www.A.com; tab 2, whose URL is www.A.com / T; tab 7, whose URL is www.Q.com; tab 9, whose URL is www.Q.com / Y; tab 10, whose URL is www.K.com; and aggregated tab 2, whose URL is www.A.com / B.
[0059] Then, the user triggers the tab page events of newly opening a www.G.com (corresponding to tab 11) and a www.R.com (corresponding to tab 12) in the browser in succession.
[0060] For the computing device, when it listens to the tab page event of newly opening a URL www.R.com, it calculates that the length required for displaying all the tabs in the default length is 8L, which is greater than the available length T of the tab bar of the browser again, then it acquires the domain names and virtual directories corresponding to each tab. Then, it detects whether there are tabs corresponding to the same domain name. Obviously, tab 1, tab 2 and aggregated tab 2 correspond to the same domain name www.A.com, and tab 7 and tab 9 correspond to the same domain name www.Q.com, so tab 1, tab 2 and aggregated tab 2 are determined as candidate tab set 1, and tab 7 and tab 9 are determined as candidate set 2.
[0061] Finally, since the virtual directories corresponding to the label 1 and the label 7 are empty, the first-level directories T, B and Y in the virtual directories corresponding to the label 2, the aggregated label 2 and the label 9 are determined as a to-be-detected directory respectively, and it is detected whether there is a same directory in each to-be-detected directory in the candidate label set 1 and whether there is a same directory in each to-be-detected directory in the candidate label set 2. Obviously, the to-be-detected directories T and B in the candidate label set 1 are different, and there is only one to-be-detected directory in the candidate label set 2, so there is no same directory in the to-be-detected directories of each candidate label set, and then the label 1, the label 2 and the aggregated label 2 in the candidate label set 1 are aggregated as an aggregated label 3, and the label 7 and the label 9 in the candidate label set 2 are aggregated as an aggregated label 4. That is, this time of aggregation is to aggregate labels corresponding to the same domain name as one label. After the label aggregation, the labels displayed in the browser according to the default length are: the label 10, the URL of which is www.K.com; the label 11, the URL of which is www.G.com; the label 12, the URL of which is www.R.com; the aggregated label 3, the URL of which is www.A.com; and the aggregated label 4, the URL of which is www.Q.com.
[0062] At this point, the multiple labels corresponding to the same domain name or the multiple labels with the intersected virtual directories under the same domain name are aggregated as one aggregated label. According to an embodiment of the present application, after obtaining the aggregated label, the aggregated label identifier and the number of aggregated labels can be displayed on the aggregated label.
[0063] The number of aggregated labels displayed on the aggregated label can be the number of all single labels aggregated by the aggregated label, or the number of labels directly aggregated by the aggregated label. For example, the aggregated label A is aggregated by the single label B and the aggregated label C, and the aggregated label C is aggregated by the single label D and the single label E. Obviously, all single labels aggregated by the aggregated label A are B, D and E, and the labels directly aggregated by the aggregated label A are the single label B and the aggregated label C. Therefore, when the number of all single labels aggregated by the aggregated label A is displayed on the aggregated label A, the number displayed is 3, and when the number of labels directly aggregated by the aggregated label is displayed on the aggregated label, the number displayed is 2. In addition, the aggregated label identifier can be a “&” character, or directly be the word “aggregated label” (such as Figure 3 ), of course, these are only two examples, and the present application does not limit the aggregated label identifier. In specific embodiments, those skilled in the art can set it according to actual needs. Similarly, the present application does not limit the content displayed on the single label. For example, the content displayed on the single label can be the key information of the label page corresponding to the single label, such as the title of the label page.
[0064] According to one embodiment of the present application, when it is detected that a cursor hovers over an aggregated tab, key information of tab pages corresponding to each tab aggregated by the aggregated tab is displayed. Here, the cursor can be a cursor of a mouse. That is, when it is detected that the cursor of the mouse hovers over the aggregated tab, the key information of the tab pages corresponding to each tab aggregated by the aggregated tab is displayed.
[0065] Further, when it is detected that the cursor of the mouse hovers over the aggregated tab, the key information of the tab pages corresponding to each tab aggregated by the aggregated tab can be displayed in a tiled form. Specifically, when it is detected that the cursor of the mouse hovers over the aggregated tab, all tabs aggregated in the aggregated tab are acquired, and it is determined whether all of the tabs are single tabs. If so, the key information of the tab pages corresponding to each tab aggregated in the aggregated tab is directly displayed in a tiled form. If not, it is indicated that there is an aggregated tab among the tabs aggregated in the aggregated tab (for convenience of description, the aggregated tab aggregated in the aggregated tab can be referred to as a sub-aggregated tab), and then tabs aggregated in the sub-aggregated tab are continuously acquired until all of the acquired tabs are single tabs. Then, the key information of the tab pages corresponding to all of the single tabs aggregated in the aggregated tab is displayed in a tiled form. Taking the above-described aggregated tab A, which is aggregated by aggregating a single tab B and an aggregated tab C, and the aggregated tab C, which is aggregated by aggregating a single tab D and a single tab E, as an example, when it is detected that the cursor of the mouse hovers over the aggregated tab A, the key information corresponding to the single tab B, the single tab D, and the single tab E aggregated by the aggregated tab A is displayed in a tiled form.
[0066] According to another embodiment of the present application, when it is detected that the cursor of the mouse hovers over the aggregated tab, the key information of the tab pages corresponding to each tab aggregated by the aggregated tab can also be displayed in a tree structure. Specifically, when it is detected that the cursor of the mouse hovers over the aggregated tab, all tabs aggregated in the aggregated tab are acquired, and it is determined whether all of the tabs are single tabs. If so, the key information of the tab pages corresponding to each tab aggregated in the aggregated tab is directly displayed as a root node. If not, it is indicated that there is a sub-aggregated tab among the tabs aggregated in the aggregated tab, and then the key information of the tab pages corresponding to each acquired tab is displayed as a root node, and for the root node of each sub-aggregated tab, tabs aggregated by the sub-aggregated tab are continuously acquired, and the acquired tabs are displayed as child nodes under the corresponding sub-aggregated tab, and so on, until all of the acquired tabs are single tabs. Taking the above-described aggregated tab A, which is aggregated by aggregating a single tab B and an aggregated tab C, and the aggregated tab C, which is aggregated by aggregating a single tab D and a single tab E, as an example, when it is detected that the cursor of the mouse hovers over the aggregated tab A, the key information corresponding to the single tab B and the key information corresponding to the sub-aggregated tab C are first displayed as root nodes, and then the key information corresponding to the single tab D and the single tab E is displayed as a child node of the key information corresponding to the sub-aggregated tab C.
[0067] The key information of the tab page includes at least one of the title of the tab page, the URL of the tab page, and the thumbnail of the tab page. Of course, some other information of the tab page can also be included, which is not limited by the present application.
[0068] To better illustrate the display form of the key information of the tab page corresponding to each tab aggregated by the aggregated tab, a specific example is given below. The aggregated tab A is obtained by aggregating the single tab B and the aggregated tab C, the aggregated tab C is obtained by aggregating the single tab D and the single tab E, and the key information of the tab page corresponding to the single tab includes the title of the tab page, the URL of the tab page, and the thumbnail of the tab page. The key information of the tab page corresponding to the aggregated tab is the URL of the aggregated tab.
[0069] If the key information of the tab page corresponding to each tab aggregated by the aggregated tab is displayed in a tiled form, when the current aggregated tab on which the cursor of the mouse is detected to hover is the aggregated tab A, the title, the URL, and the thumbnail of the tab page corresponding to the single tabs B, D, and E are displayed in a tiled form, as shown in FIG. 4. Figure 3 .
[0070] If the key information of the tab page corresponding to each tab aggregated by the aggregated tab is displayed in a tree structure form, when the current aggregated tab on which the cursor of the mouse is detected to hover is the aggregated tab A, the title, the URL, and the thumbnail of the tab page corresponding to the single tab B are displayed as a root node, the URL of the sub-aggregated tab C is displayed as a root node, and then the title, the URL, and the thumbnail of the tab page corresponding to the single tabs D and E are displayed as the sub-nodes of the URL of the sub-aggregated tab C, as shown in FIG. 5. Figure 4 .
[0071] In addition, if the tabs aggregated by the aggregated tab are too many, the display of the key information of the tab page corresponding to each tab aggregated by the aggregated tab can exceed the width or the height of the current display screen. At this time, the user can scroll the displayed key information of the tab page by sliding the scroll wheel of the mouse to adjust the key information displayed on the current display screen. It should be noted that according to an embodiment of the present application, if it is detected that the cursor of the mouse leaves the aggregated tab, the content displayed when the cursor of the mouse hovers over the aggregated tab is destroyed.
[0072] According to the tag aggregation method of the present invention, when a new tag is added in the browser, it first checks whether tag aggregation is needed. If so, it obtains the URLs of all tags in the browser. Then, it parses the URLs of all tags to obtain the domain name and virtual directory corresponding to each tag. Finally, it performs tag aggregation based on the domain name and virtual directory corresponding to each tag. It is evident that when a new tag is added in the browser, the present invention automatically checks whether tag aggregation is needed. If so, it automatically aggregates the tags according to the domain name and virtual directory corresponding to each tag. Clearly, for situations where too many tabs are open, the present invention can effectively avoid the problem of tags not being able to fully display the key information of their corresponding tabs due to tag length compression, thereby shortening the time for users to locate the target tab and improving the user experience.
[0073] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the present invention.
[0074] When the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute the display method of the present invention according to instructions in the program code stored in the memory.
[0075] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.
[0076] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0077] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0078] It should be understood that, in order to simplify this disclosure and aid in understanding one or more aspects of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0079] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.
[0080] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0081] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments.
[0082] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.
[0083] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.
[0084] Although the invention has been described with reference to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and instructional purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative and not restrictive, and the scope of the invention is defined by the appended claims.
Claims
1. A method for tab aggregation, adapted to be executed in a computing device, comprising: detecting whether tab aggregation is needed when a new tab is added in a browser; if yes, obtaining URLs of all tabs in the browser; parsing the URLs to obtain domain names and virtual directories corresponding to the tabs; based on the domain names and virtual directories corresponding to the tabs, performing tab aggregation, including: detecting whether there are tabs corresponding to the same domain name, if yes, determining multiple tabs corresponding to the same domain name as a candidate tab set, and based on virtual directories corresponding to the tabs in all candidate tab sets, performing tab aggregation; wherein, based on the virtual directories corresponding to the tabs in all candidate tab sets, performing tab aggregation, includes: determining a first-level directory in the virtual directories corresponding to the tabs as a to-be-detected directory; detecting whether there are same directories in the to-be-detected directories in each candidate tab set; if there are no same directories in each candidate tab set, aggregating all tabs in each candidate tab set as an aggregated tab; if there are same directories in a candidate tab set, determining tabs corresponding to the same directories in the candidate tab set as alternative tabs; determining a sub-directory in the virtual directories corresponding to the alternative tabs as a to-be-detected directory; detecting whether there are same directories in the to-be-detected directories in each candidate tab set; if there are still same directories, repeating the steps of determining alternative tabs, determining to-be-detected directories, and detecting same directories until there are no same directories, then aggregating all alternative tabs in each candidate tab set as an aggregated tab; after obtaining the aggregated tab, in response to a user triggering a new tab page event, detecting at least one single tab and the aggregated tab as a candidate tab set, if there are no same directories, aggregating to obtain a new aggregated tab; the method further comprises: when detecting that a cursor hovers over the aggregated tab, displaying key information of tab pages corresponding to tabs aggregated by the aggregated tab in a tiled form, including: obtaining all tabs aggregated in the aggregated tab, and determining whether all tabs are single tabs; if yes, directly displaying key information of tab pages corresponding to the tabs aggregated in the aggregated tab in a tiled form; if no, indicating that there are sub-aggregated tabs in the tabs aggregated in the aggregated tab, obtaining tabs aggregated in the sub-aggregated tabs until all tabs obtained are single tabs, and displaying key information of tab pages corresponding to all single tabs aggregated in the aggregated tab in a tiled form, the key information including a title of a tab page, a URL of the tab page, and a thumbnail of the tab page.
2. The method of claim 1, wherein, the step of detecting whether tab aggregation is needed includes: obtaining a length of a tab bar, a default length of a tab, and a number of all tabs in the browser; based on the number of all tabs and the default length of a tab, obtaining a length required for displaying all tabs in the default length; detecting whether the length required for displaying all tabs in the default length is greater than the length of the tab bar. 3.The method of claim 1 or 2, further comprising: The aggregated tag identification and the number of the aggregated tags are displayed on the aggregated tag.
4. The method of claim 1 or 2, wherein, The step of displaying the key information of the tabs corresponding to the tags aggregated by the aggregated tag further includes: The key information is displayed in a tree structure.
5. A computing device comprising: at least one processor; and a memory storing program instructions configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any one of claims 1-4.
6. A readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Label management method and device
CN103970841A
Web page clustering method and device
CN106708952A
Auto grouping browser tabs
US20170039172A1