CN112487316A - Method and terminal for closing tab page in browser - Google Patents

Method and terminal for closing tab page in browser Download PDF

Info

Publication number
CN112487316A
CN112487316A CN201910858142.4A CN201910858142A CN112487316A CN 112487316 A CN112487316 A CN 112487316A CN 201910858142 A CN201910858142 A CN 201910858142A CN 112487316 A CN112487316 A CN 112487316A
Authority
CN
China
Prior art keywords
page
tab
background
label
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910858142.4A
Other languages
Chinese (zh)
Inventor
李洪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Electronic Technology Wuhan Co ltd
Original Assignee
Hisense Electronic Technology Wuhan Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Electronic Technology Wuhan Co ltd filed Critical Hisense Electronic Technology Wuhan Co ltd
Priority to CN201910858142.4A priority Critical patent/CN112487316A/en
Publication of CN112487316A publication Critical patent/CN112487316A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/954Navigation, e.g. using categorised browsing

Abstract

The invention relates to the technical field of internet, in particular to a method and a terminal for closing a tab page in a browser, which are used for solving the problem that the closing of the tab page of the browser by the existing terminal is not flexible enough. When a plurality of label pages are opened in a browser, acquiring parameters corresponding to each background label page and used for expressing the attention degree of a user to the content of the label page; and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page. According to the method for closing the tab pages in the browser, the tab pages needing to be closed are automatically selected according to the parameters which are corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, the user does not need to be frequently prompted, and the tab pages are manually closed by the user, so that the flexibility of managing the tab pages of the browser is improved, and the user experience is improved.

Description

Method and terminal for closing tab page in browser
Technical Field
The invention relates to the technical field of internet, in particular to a method and a terminal for closing a tab page in a browser.
Background
With the rapid development of science and technology, various terminals are continuously abundant and convenient for the public life. The terminal is an indispensable part in life or work of people due to the advantages of convenience, rapidness, resource saving and the like of utilizing the terminal to process information. With the development of the internet, a browser as an internet portal becomes essential application software in a terminal.
The browser tab is a display page of the browser, the browser installed on the terminal can simultaneously open various information resources through a plurality of tab pages, each tab page corresponds to one website link, and a user can simultaneously open a plurality of tab pages when using the browser and also can reserve the plurality of tab pages in the using process of the browser.
Typically the maximum number of open browser tab pages is fixed to prevent unlimited open tab pages from draining system memory resources. In the process that a user uses a terminal browser, when the number of opened tab pages reaches the maximum value, a user needs to manually close a certain tab page to open a new tab page. Therefore, in the prior art, only the tab page of the browser can be manually closed, and the user experience is poor.
In summary, the current method for closing the tab page of the browser is not flexible enough.
Disclosure of Invention
The invention provides a method and a terminal for closing a tab page in a browser, which are used for solving the problem that the current terminal is not flexible enough to close the tab page of the browser.
Based on the foregoing problems, in a first aspect, an embodiment of the present invention provides a mobile terminal, including at least one processing unit and at least one storage unit;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
when a plurality of tab pages are opened in a browser, acquiring a parameter which corresponds to each background tab page and is used for expressing the attention degree of a user to the content of the tab page;
and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page.
In a second aspect, an embodiment of the present invention provides a method for closing a tab page in a browser, including:
when a plurality of tab pages are opened in a browser, acquiring a parameter which corresponds to each background tab page and is used for expressing the attention degree of a user to the content of the tab page;
and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page.
In a third aspect, an embodiment of the present invention provides an apparatus for closing a tab page in a browser, where the apparatus includes:
the acquisition module is used for acquiring parameters which correspond to each background tab and are used for expressing the attention degree of a user to the contents of the tabs when the plurality of tabs are opened in the browser;
and the operation module is used for selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for representing the attention degree of the user to the tab page content, and closing the selected target tab page.
In a fourth aspect, embodiments of the present invention provide a computer-readable medium on which a computer program is stored, which when executed by a processor, performs the steps of the method according to the second aspect.
According to the embodiment of the invention, when a plurality of tab pages are opened in the browser, the parameter which is corresponding to each background tab page and is used for expressing the attention degree of the user to the content of the tab page is automatically obtained, and when the tab pages are required to be closed, the tab pages which are required to be closed are selected from the background tab pages automatically according to the parameter which is corresponding to each background tab page and is used for expressing the attention degree of the user to the content of the tab page, so that the user is not required to be frequently prompted, and the tab pages are manually closed by the user, so that the flexibility of managing the tab pages of the browser is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic diagram of a terminal prompting a user that a new tag cannot be opened according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for closing a tab page in a browser according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface for a browser to provide an interest option to a user according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for closing a tab page in a browser according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for closing a tab page in a browser, in accordance with an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus for closing a tab page in a browser according to an embodiment of the present invention.
Detailed Description
The method for closing the tab page in the browser provided by the embodiment of the invention can be applied to the browser of the terminal. The terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), or the like.
At present, the maximum opening number of tab pages of a browser is fixed, and when the opening number of the tab pages reaches the maximum value or the browser does not support opening a new tab page due to a terminal system, if the new tab page needs to be opened, the terminal prompts a user that the user cannot open the new tab page. As shown in fig. 1, it is assumed that the maximum number of open tab pages of the browser is 12, and when the number of tab pages already opened by the user reaches the maximum, and a tab page is newly created, the terminal may prompt the user that the upper limit of the number of tab pages has been reached and a new tab page cannot be opened, and please close a certain tab page first. At this point, the user is required to manually close a tab to open a new tab page.
In this scenario, if the user closes only one tab page or closes several tab pages therein, the number of newly created tab pages is limited, and it is easy to reach the upper limit of the number of tab pages again. Therefore, the terminal frequently prompts the user to close the opened tab, and user experience is influenced.
For the above scenario, an embodiment of the present invention provides a method for closing a tab page in a browser, where after the tab page is opened, a terminal dynamically manages a plurality of opened tab pages, and automatically closes the tab page when it is determined that the tab page of the browser needs to be closed, so as to reduce frequent prompts, and no longer require a user to manually close a plurality of opened tab pages, so as to solve the problem that managing the tab page of the browser is inflexible.
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for closing a tab page in a browser, as shown in fig. 2, the method includes:
step 201, when a plurality of tab pages are opened in a browser, acquiring a parameter corresponding to each background tab page and used for representing the attention degree of a user to the content of the tab page;
step 202, selecting a target tab page to be closed from the plurality of background tab pages according to the parameter corresponding to each background tab page and used for representing the attention degree of the user to the tab page content, and closing the selected target tab page.
It should be noted that the background tab page in the embodiment of the present invention refers to other tab pages except for a currently displayed tab page in a tab page opened by a browser, and the background tab page is still kept in a use process of the browser, but is not displayed on a display interface.
Through the scheme, when the terminal opens the plurality of label pages in the browser, the parameters which are corresponding to each background label page and used for expressing the attention degree of the user to the content of the label page are automatically acquired, when the label page needs to be closed, the label page needing to be closed is selected from the plurality of background label pages automatically according to the parameters which are corresponding to each background label page and used for expressing the attention degree of the user to the content of the label page, frequent prompt of the user is not needed any more, the label page is manually closed by the user, so that the flexibility of managing the label pages of the browser is improved, and the user experience is improved.
In a specific implementation process, when a plurality of tab pages are opened by a browser, a parameter which is corresponding to each background tab page and is used for representing the attention degree of a user to the content of the tab page is acquired, and then the tab page which needs to be closed is determined according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page. The following describes parameters for indicating the attention degree of the user to the content of the tab page according to which the tab page to be closed is selected.
Optionally, the parameter for indicating the attention degree of the user to the content of the tab page includes part or all of the following parameters:
accumulating the first time length displayed by the label page;
a second time length between the current time and the time when the label page is last quitted from the display time;
and the interest weight value of the interest degree of the user on the content corresponding to the label page.
The following description will be made for different parameters, respectively.
1. The tab page accumulates the first length of time that is displayed.
The first time length of the tab page accumulated display can be used for representing the attention degree of the user to the content of the tab page, and the longer the first time length of the tab page accumulated display is, the higher the attention degree of the user to the content of the tab page is.
For example, the first time length of the tab page a cumulative display is 255 minutes, and the first time length of the tab page B cumulative display is 12 minutes, it can be seen that the time for the user to browse the tab page a is far longer than the time for browsing the tab page B, which indicates that the attention degree of the user to the tab page a is far greater than the attention degree of the user to the tab page B.
The first duration of the tab page accumulation presentation may be denoted by T [ i ], where i denotes a certain tab page.
The embodiment of the invention can calculate the first time length of the accumulated display of the label page by the following method:
when a certain label page enters the foreground for display, the label page is activated, and timing is started at the moment; and when the label page enters the background, timing is suspended, the label page is displayed from the foreground to the background, and the middle use time is the display duration of the label page. The reason for the tab entering the background may be that the browser opens a new tab or the browser enters the background of the terminal and continues to count when the tab is opened again.
And if the same label page enters the foreground for displaying for multiple times, taking the sum of multiple display durations displayed on the foreground by the label page as the first duration of accumulated display of the label page.
For example, open tab a, at which point tab a is activated, and begin timing; after 3min (minutes), the user opens the label page B, at the moment, the label page A enters a background, the time is temporarily kept, and T [ A ] is 3 min;
the label page B is activated, and the display time length of the label page B is timed; after 5 minutes, opening the label A again, and enabling the label page B to enter a background, wherein T [ B ] is 5 min;
assuming that the time length for opening the tab page a for the second time is 1min, and then opening other tab pages again, the tab page a keeps timing for 1min on the basis of the previous 3min, and then T [ a ] is 4 min;
and at the moment that the label page A enters the background for the second time, the first time length of the label page A cumulative display is T [ A ] being 4min, and the first time length of the label page B cumulative display is T [ B ] being 5 min.
2. And the second time length between the current time and the time when the label page is quitted from the display last time.
The second time length between the current time and the latest time of exiting the display of the tab page can be used for representing the attention degree of the user, and the longer the second time length between the current time of the tab page and the latest time of exiting the display of the tab page is, the longer the time of staying of the tab page in the background is, and the lower the attention degree of the user on the tab page is.
For example, the second time duration between the current time and the time when the tab page a is last exited from the display is 200 minutes, and it can be seen that the user has not browsed the tab page a within 200 minutes, which indicates that the user may no longer need to browse the content of the tab page a, and thus it can be seen that the user has a low level of attention to the tab page a.
A second time duration between the current time and the time the tab page was last exited from the presentation may be represented by Stay [ i ], where i represents a tab page.
The embodiment of the invention can calculate the second time length between the current time and the latest exit display time of the label page by the following method:
when the label page enters a background to start timing, stopping timing when a second time length needs to be acquired; and the time length from the beginning of timing to the stopping of timing at the current moment is the second time length of the label page, after the label page enters the foreground, the second time length obtained by timing is cleared, and when the label page enters the background again, the timing of the second time length is carried out again.
For example, at 10:00, tab A enters the background and starts timing; when the second time length corresponding to the label A needs to be acquired in 10:05 minutes and before 10:05 minutes, the label page A does not enter the foreground, the time length between the current time when the second time length corresponding to the label A needs to be acquired and the latest exit display time is taken as the second time length, and Stay [ A ] is 5 min;
when tab page a is opened again, Stay [ a ] is cleared, and Stay [ a ] becomes 0.
3. And the interest weight value of the interest degree of the user on the content corresponding to the label page.
The interest weight value of the interest degree of the user to the content corresponding to the label page can be used for representing the interest degree of the user, the interest weight value is set according to the habit of the user, and the smaller the interest weight value is, the higher the interest degree of the user to the label page is.
The interest weight value of the user's interest level in the content corresponding to the tab page may be represented by H [ i ], where i represents a certain tab page.
The embodiment of the invention can set the interest weight value of the label page by the following method:
when a user uses a browser for the first time, interesting content options are provided for the user, the interesting content options selected by the user are recorded, when a tab page is opened by the user, whether the content of the tab page is the content interesting to the user is judged, and if the content is the content interesting to the user, the interest weight value of the tab is set to be a numerical value not larger than 1; if not, the interest weight value of the tag is set to 1 or a value greater than 1. It should be noted that the values of the interest weight values provided in the embodiments of the present invention are only examples, and do not limit the scope of the present invention.
For example, when the user uses the browser for the first time, content items of interest are provided for the user, and as shown in fig. 3, it is assumed that the content items of interest selected by the user are "sports", "news" and "bagua", when the user opens the tab page a, it is determined whether the content of the tab page a is of the type "sports", "news" or "bagua", and if so, the weight value of the tab page a is set to a value not greater than 1. Assuming that the content of the tab page a is news-like content, the weight value of the tab page a may be set to H [ i ] equal to 0.5.
The embodiment of the invention also provides another method for setting the interest weight value of the label page, which can judge according to the content type of the label page frequently browsed by a user; when the content corresponding to the tab page is the content frequently browsed by the user, determining that the content corresponding to the tab page is the content with higher user interest degree;
in implementation, aiming at the content with higher user interest, setting the interest weight value of the label to be a numerical value not greater than 1; if not, the interest weight value of the tag is set to 1 or a value greater than 1.
For example, assuming that the user frequently browses the tab page of the "star eight trigrams" category, when the user opens the tab page a, if the content of the tab page a is the content of the "star eight trigrams" category, it is determined that the content of the tab page a is the content with a high user interest level, and the interest weight value of the tab page a may be set to H [ i ] equal to 0.5.
It should be noted that the parameter for representing the user attention degree provided in the embodiment of the present invention is only an example of the embodiment of the present invention, and other examples of the parameter for representing the user attention degree are also applicable to the present invention.
After the parameters which are corresponding to each background label page and used for expressing the attention degree of the user to the label page content are obtained, the target label page needing to be closed needs to be determined from the background label pages.
The embodiment of the invention provides two methods for determining a target label page.
The method comprises the following steps:
determining alternative background label pages with the memory occupation amount larger than a first threshold value according to the memory occupation amount corresponding to each background label page; determining a reference value which corresponds to each alternative background label page and is used for representing the release priority of the label page according to the parameter which corresponds to each alternative background label page and is used for representing the attention degree of the user to the content of the label page; and according to the reference value corresponding to each alternative background label page, taking the alternative background label page with the maximum reference value as the target label page.
In implementation, the standby background tag pages with the memory occupation amount larger than the first threshold value are determined according to the memory occupation amount corresponding to each background tag page.
Explanation is given below on the memory occupation amount corresponding to the tag page used when determining the candidate background tag page:
the memory occupation amount corresponding to each tag page is fixed, data loading is not carried out after the request content of the tag page is loaded, and the memory occupation amount of the tag page is not increased. After the content of the tag page is browsed and enters the background, the background tag page does not carry out data loading, and the corresponding memory occupation amount is not increased.
When the loading request contents of different tag pages are different, the memory occupation amounts of the corresponding tag pages are also different. The memory occupation amount corresponding to the tag page can be represented by Q [ i ], wherein i represents a certain tag page. For example, the memory occupied amount corresponding to the first opened tab page in the browser may be Q [1], and the memory occupied amount corresponding to the second opened tab page in the browser may be Q [2 ]; given that the first open tab page requests less content to load, Q [1] may be 100MB (megabyte) and the second open tab page requests more content to load, Q [2] may be 486 MB.
After the browser opens the third tab page, if the first open tab page and the second open tab page are not closed, the first open tab page and the second open tab page both become background tab pages. If the first opened label page is a first background label page, the second opened label page is a second background label page, and the preset first threshold value is 200M, the memory occupation amount Q [1] corresponding to the first background label page is 100MB and is not greater than the first threshold value; and if the memory occupation quantity Q2 corresponding to the second background label page is 486MB which is greater than the first threshold value, determining that the second background label page is the alternative background label page.
After the candidate background label pages are determined, determining a reference value corresponding to each candidate background label page through a parameter which is corresponding to each candidate background label page and used for representing the attention degree of the user to the label page content, wherein the reference value represents the release priority of the label page, and the greater the reference value corresponding to each candidate background label page is, the higher the release priority of each candidate background label page is. After the reference value corresponding to each candidate background tab page is determined, the candidate background tab page with the largest reference value is used as a target tab page, and when the tab page needs to be closed by the method for closing the tab page in the browser, the determined target tab page is closed. For example, the reference value of the candidate background tab page a is determined to be 56, the reference value of the candidate background tab page B is determined to be 22, the reference value corresponding to the candidate background tab page a is greater than the reference value of the candidate background tab page B, which indicates that the release priority of the candidate background tab page a is higher than the release priority of the candidate background tab page B, and when one of the candidate background tab page a and the candidate background tab page B needs to be selected as a target tab page to be closed, the candidate background tab page a with the high release priority is closed as the target tab page.
Specifically, the embodiment of the present invention may determine the reference value corresponding to the alternative background tab page according to the following method.
Mode 1:
and performing weighting and operation on the reciprocal of the first time length corresponding to the alternative background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the alternative background label page as the reference value corresponding to the alternative background label page.
Specifically, the reciprocal of the first duration and the first preset weight corresponding to the second duration are preset. In an implementation, the first preset weight corresponding to the reciprocal of the first duration may be M1, and the first preset weight corresponding to the second duration may be M2, and after the result of the weighted sum operation is calculated, the product of the calculation result of the weighted sum operation and the interest weight value is used as the reference value corresponding to the alternative background tab page.
Wherein, the optional M1 and M2 are added to be 1.
It should be noted that, because the reference value indicates the release priority of the candidate background tab page, the longer the first duration corresponding to the candidate background tab page is, the higher the attention degree of the user to the candidate background tab page is, and when one of the open multiple tab pages needs to be closed, the longer the first duration is, the lower the release priority of the candidate background tab page should be, and the smaller the corresponding reference value should be. Therefore, when the weighted sum is calculated, the weighted sum is calculated by using the reciprocal of the first time length and the preset weight M1 corresponding to the first time length, and at this time, the longer the first time length is, the smaller the reference value corresponding to the alternative background tab page is calculated.
In implementation, the product of the reciprocal of the first time length T [ i ] corresponding to the candidate background tab page and the first preset weight M1 corresponding to the first time length is added to the product of the second time length Stay [ i ] corresponding to the candidate background tab page and the first preset weight M2 corresponding to the second time length to calculate a weighted sum operation result, and the product of the weighted sum operation result and the interest weight value H [ i ] corresponding to the candidate background tab page is used as the reference value corresponding to the candidate background tab page.
For example, the first duration T [ a ] of the alternative background tab a is 50min, and the first preset weight M1 corresponding to the first duration is 0.4;
the second time duration Stay [ a ] is 100min, and the first preset weight M2 corresponding to the second time duration is 0.6.
Weighting and calculating the reciprocal of the first time length corresponding to the alternative background label page A, the second time length and the first preset weight corresponding to the first time length and the second time length respectively to obtain:
M1/T[A]+Stay[A]*M2=60.008;
assuming that the content of the candidate background tab a is content with a high user interest level, and the interest weight value of the candidate background tab a is a numerical value not greater than 1, and assuming that the interest weight value H [ i ] corresponding to the candidate background tab a is 0.5, the reference value corresponding to the candidate background tab a is calculated to be 60.008 × 0.5 — 30.004.
Mode 2:
and performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the first time length, the second time length and the interest weight value corresponding to the alternative background label page, and taking the result of the weighting and operation as the reference value corresponding to the alternative background label page.
Specifically, the second preset weight corresponding to the reciprocal of the first duration, the second duration and the interest weight value is preset. In an implementation, the second preset weight corresponding to the reciprocal of the first duration may be M1, the second preset weight corresponding to the second duration may be M2, and the second preset weight corresponding to the interest weight value may be M3, and after the result of the weighted sum operation is calculated, the calculation result of the weighted sum operation is used as a reference value corresponding to the alternative background tab page.
Wherein, the optional M1, M2 and M3 are added to be 1.
It should be noted that the interest weight value here may be a numerical value set according to the user's interest level in the content corresponding to the tab page, and may be represented by X [ i ], where i represents a certain tab page.
Aiming at the content with higher user interest, setting the interest weight value of the label page to be smaller, wherein the smaller the interest weight value is, the smaller the calculated reference value corresponding to the label page is, and the smaller the release priority is; and setting the interest weight value of the label page to be larger for the content with lower user interest, wherein the larger the interest weight value is, the larger the calculated reference value corresponding to the label page is, and the larger the release priority is. When the target tab page is selected according to the reference value of the alternative background tab pages, the alternative background tab pages corresponding to the content with higher user interest degree can be reserved, and the alternative background tab pages with higher release priority are closed.
For example, the content displayed on the tab page a is content with a high user interest level, and the interest weight value corresponding to the tab page a may be X [ a ] — 20; the content displayed on the tab B is content with low user interest, and the interest weight value corresponding to the tab B may be X [ a ] ═ 50. Assuming that the tab page a and the tab page B are determined to be alternative background tab pages, when the weighted sum is calculated, calculating a weighted value by using a second preset weight M3 corresponding to the interest weight value and the interest weight value. At this time, the content of the alternative background label page a is the content with higher user interest, the interest weight value is smaller, the calculated reference value corresponding to the alternative background label page a is smaller, the release priority of the alternative background label page a is smaller, and if a target label page needing to be closed is selected between the alternative background label page a and the alternative background label page B, the alternative background label page a with higher user interest can be retained.
In implementation, the product of the reciprocal of the first time length T [ i ] corresponding to the candidate background tab page and the second preset weight M1 corresponding to the first time length is added to the product of the second time length Stay [ i ] corresponding to the candidate background tab page and the second preset weight M2 corresponding to the second time length, and the product of the interest weight value X [ i ] corresponding to the candidate background tab page and the second preset weight M3 corresponding to the interest weight value is added to calculate a weighted sum operation result, and the weighted sum operation result is used as the reference value corresponding to the candidate background tab page.
For example, the first duration T [ a ] of the alternative background tab a is 50min, and the second preset weight M1 corresponding to the first duration is 0.2;
the second time length Stay [ a ] is 100min, and the second preset weight M2 corresponding to the second time length is 0.5;
the interest weight value X [ a ] is 15, and the second preset weight M3 corresponding to the interest weight value is 0.3.
Weighting and calculating the reciprocal of the first time length corresponding to the alternative background label page A, the second time length, the interest weight value and the second preset weight value corresponding to the first time length, the second time length, the interest weight value and the second preset weight value to obtain:
M1/T [ a ] + Stay [ a ] + M2+ X [ a ] × M3 ═ 54.504, which is the reference value corresponding to the alternative background tab a.
And when the target label page is selected according to the reference value, taking the candidate background label page with the maximum reference value as the target label page according to the reference value corresponding to each candidate background label page. For example, if the reference value of candidate background tab page a is 520.13, the reference value of candidate background tab page B is 628.75, and the reference value of candidate background tab page C is 482.11, then candidate background tab B is taken as the target tab page.
As shown in fig. 4, a flowchart of a method for closing a tab page in a browser according to an embodiment of the present invention is complete.
Step 401, responding to a user operation instruction, and opening a new tab page in a browser;
step 402, judging whether the memory occupation amount of the background tag page is larger than a first threshold value, if so, executing step 403; if not, returning to the step 401;
step 403, determining the background label page as an alternative background label page;
step 404, determining a reference value corresponding to the alternative background label page according to the first time length, the second time length and the interest weight value corresponding to the alternative background label page;
step 405, according to the reference value corresponding to each candidate background label page, taking the candidate background label page with the largest reference value as a target label page;
step 406, close the target tab page.
The second method comprises the following steps:
when the number of the tab pages opened in the browser is larger than a second threshold and/or the remaining running memory of the system is determined to be lower than a third threshold, determining a reference value which is corresponding to each background tab page and is used for representing the release priority of the tab page according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page; and according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as a target label page.
In implementation, the target tab page that needs to be closed is determined when the following conditions are met:
the method comprises the following steps that 1, the number of tab pages opened in a browser is determined to be not less than a second threshold value; and/or
And 2, determining that the residual running memory of the system is lower than a third threshold value.
For condition 1, the second threshold in the embodiment of the present invention is not greater than the maximum number of tab pages that the browser is allowed to open; and when the number of the opened label pages is not less than a second threshold value, the terminal closes the target label page.
For example, the maximum open number of tab pages of the browser is 12, the second threshold of the number of tab pages open in the browser is 10, and after 10 tab pages have been opened by the browser, if the 11 th tab page is opened again, the terminal closes a target tab page of the 10 tab pages that have been opened.
Or setting a second threshold value of the number of the tab pages opened in the browser to be equal to the maximum opening number of the tab pages, and when the number of the tab pages opened by the browser reaches the maximum opening number, if the next tab page is opened, closing the target tab page in the opened tab pages. For example, the maximum open number of tab pages of the browser is 12, the second threshold of the number of the tab pages open in the browser is 12, and after the 12 tab pages have been opened by the browser, if the 13 th tab page is opened again, the terminal closes a target tab page of the 12 tab pages that have been opened.
And (3) for the condition 2, when the residual running memory of the system is lower than a third threshold value, closing the target tab page by the terminal.
For example, the third threshold of the system is set to be 2M, when 10 tab pages are opened, the remaining operating memory of the system is lower than 2M, and if the 11 th tab page is opened again, the terminal closes a target tab page in the 10 opened tab pages. Or the system runs other application programs while running the browser, and closes the target tab page in the background tab page when the running memory of the system is lower than 2M due to the influence of all running programs of the terminal.
In implementation, a reference value corresponding to each background tab page and used for representing tab page release priority is determined according to a parameter corresponding to each background tab page and used for representing the attention degree of a user to the tab page content, wherein the reference value represents the tab page release priority, and the greater the reference value corresponding to the background tab page, the higher the release priority of the background tab page. After the reference value corresponding to each background tab page is determined, the background tab page with the largest reference value is used as a target tab page, and when the tab page needs to be closed by the method for closing the tab page in the browser, the determined target tab page is closed. For example, the reference value of the background tab page a is determined to be 46, the reference value of the background tab page B is determined to be 18, the reference value corresponding to the background tab page a is greater than the reference value of the background tab page B, which indicates that the release priority of the background tab page a is higher than the release priority of the background tab page B, and when one of the background tab page a and the background tab page B needs to be selected as a target tab page to be closed, the background tab page a with the high release priority is closed.
Specifically, the reference value corresponding to the background tab page may be determined according to the following method in the embodiment of the present invention.
Mode 1:
and performing weighting and operation on the reciprocal of the first time length corresponding to the background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the background label page as the reference value corresponding to the background label page.
Specifically, the reciprocal of the first duration and the first preset weight corresponding to the second duration are preset. In an implementation, the first preset weight corresponding to the reciprocal of the first duration may be M1, and the first preset weight corresponding to the second duration may be M2, and after the result of the weighted sum operation is calculated, the product of the calculation result of the weighted sum operation and the interest weight value is used as the reference value corresponding to the background tab page.
Wherein, the optional M1 and M2 are added to be 1.
It should be noted that, because the reference value indicates a release priority of the background tab page, the longer the first duration corresponding to the background tab page is, the higher the attention degree of the user to the background tab page is, and when one of the open multiple tab pages needs to be closed, the longer the first duration is, the lower the release priority of the background tab page should be, and the smaller the corresponding reference value should be. Therefore, when the weighted sum is calculated, the weighted sum is calculated by using the reciprocal of the first time length and the preset weight M1 corresponding to the first time length, and at this time, the longer the first time length is, the smaller the reference value corresponding to the background tab page is calculated.
In the implementation, the product of the reciprocal of the first time length T [ i ] corresponding to the background tab page and the first preset weight M1 corresponding to the first time length is added to the product of the second time length Stay [ i ] corresponding to the background tab page and the first preset weight M2 corresponding to the second time length to calculate the result of the weighted sum operation, and the product of the result of the weighted sum operation and the interest weight value H [ i ] corresponding to the background tab page is used as the reference value corresponding to the background tab page.
For example, the first duration T [ a ] of the background tab a is 40min, and the first preset weight M1 corresponding to the first duration is 0.8;
the second time duration Stay [ a ] is 120min, and the first preset weight M2 corresponding to the second time duration is 0.2.
Weighting and calculating the reciprocal of the first time length corresponding to the background label page A, the second time length and the first preset weight corresponding to the first time length and the second time length respectively to obtain:
M1/T[A]+Stay[A]*M2=24.02;
assuming that the content of the background tab a is content with a high user interest level, and the interest weight value of the background tab a is a numerical value not greater than 1, and assuming that the interest weight value H [ i ] corresponding to the background tab a is 0.4, the reference value corresponding to the tab a is calculated to be 24.02 × 0.4 — 9.608.
Mode 2:
and performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the first time length, the second time length and the interest weight value corresponding to the background label page, and taking the result of the weighting and operation as the reference value corresponding to the background label page.
Specifically, the second preset weight corresponding to the reciprocal of the first duration, the second duration and the interest weight value is preset. In an implementation, the second preset weight corresponding to the reciprocal of the first duration may be M1, the second preset weight corresponding to the second duration may be M2, and the second preset weight corresponding to the interest weight value may be M3, and after the result of the weighted sum operation is calculated, the calculation result of the weighted sum operation is used as the reference value corresponding to the background tab page.
Wherein, the optional M1, M2 and M3 are added to be 1.
It should be noted that the interest weight value here may be a numerical value set according to the user's interest level in the content corresponding to the tab page, and may be represented by X [ i ], where i represents a certain tab page.
Aiming at the content with higher user interest, setting the interest weight value of the label page to be smaller, wherein the smaller the interest weight value is, the smaller the calculated reference value corresponding to the label page is, and the smaller the release priority is; and setting the interest weight value of the label page to be larger for the content with lower user interest, wherein the larger the interest weight value is, the larger the calculated reference value corresponding to the label page is, and the larger the release priority is. When the target tab page is selected according to the reference value of the background tab page, the background tab page corresponding to the content with higher user interest level can be reserved, and the background tab page with higher release priority is closed.
For example, the content displayed on the tab page a is content with a high user interest level, and the interest weight value corresponding to the tab page a may be X [ a ] — 30; the content displayed on the tab B is content with low user interest, and the interest weight value corresponding to the tab B may be X [ a ] ═ 60. Assuming that the tab page a and the tab page B are background tab pages, when the weighted sum is calculated, a weighted value is calculated by using a second preset weight M3 corresponding to the interest weight value and the interest weight value. At this time, the content of the background tab page a is the content with higher user interest, the interest weight value is smaller, the calculated reference value corresponding to the background tab page a is smaller, the release priority of the background tab page a is smaller, and if a target tab page needing to be closed is selected between the background tab page a and the background tab page B, the background tab page a with higher user interest can be retained.
In the implementation, the product of the reciprocal of the first time length T [ i ] corresponding to the background tab page and the second preset weight M1 corresponding to the first time length is added to the product of the second time length Stay [ i ] corresponding to the background tab page and the second preset weight M2 corresponding to the second time length, and the product of the interest weight value X [ i ] corresponding to the background tab page and the second preset weight M3 corresponding to the interest weight value to calculate the result of the weighted sum operation, and the result of the weighted sum operation is used as the reference value corresponding to the background tab page.
For example, the first duration T [ a ] of the background tab a is 40min, and the second preset weight M1 corresponding to the first duration is 0.2;
the second time length Stay [ a ] is 110min, and the second preset weight M2 corresponding to the second time length is 0.5;
the interest weight value X [ a ] is 25M, and the second preset weight M3 corresponding to the interest weight value is 0.3.
Weighting and calculating the reciprocal of the first time length corresponding to the background label page A, the second time length, the interest weight value and the second preset weight value corresponding to the interest weight value respectively to obtain:
M1/T [ a ] + Stay [ a ] + M2+ X [ a ] × M3 ═ 62.505, which is the reference value corresponding to background tab a.
And when the target label page is selected according to the reference value, taking the background label page with the maximum reference value as the target label page according to the reference value corresponding to each background label page. For example, if the reference value of background tab a is 420.13, the reference value of background tab B is 528.75, and the reference value of background tab C is 382.11, then background tab B is used as the target tab.
As shown in fig. 5, a complete flowchart of a method for closing a tab page in a browser according to an embodiment of the present invention is described, where a trigger condition for closing a target tab page is that the number of tab pages opened in the browser is not less than a second threshold.
Step 501, responding to a user operation instruction, and opening a new tab in a browser;
502, acquiring a first time length, a second time length and an interest weight value corresponding to a background label page;
step 503, determining a reference value corresponding to the background label page according to the first time length, the second time length and the interest weight value corresponding to the background label page;
step 504, judging whether the number of the tab pages opened in the browser is not less than a second threshold value; if yes, go to step 505; if not, returning to the step 501;
505, according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as a target label page;
step 506, close the target tab.
The method for closing the tab page of the browser provided by the embodiment of the invention is described by taking 5 opened tab pages as an example.
Suppose that the opened 5 tab pages are tab page 1, tab page 2, tab page 3, tab page 4 and tab page 5 respectively; the maximum number of open browser tab pages is 5 and the second threshold is set to 5. Then one tab page needs to be automatically closed after the 5 th tab page is opened.
Assuming that a currently displayed label page is a label page 5, and label pages 1, 2, 3 and 4 are background label pages, taking mode 1 as an example when determining a reference value corresponding to each background label page, respectively obtaining a first time length, a second time length and an interest weight value corresponding to each background label page; it is assumed that a first preset weight M1 corresponding to the first duration and a first preset weight M2 corresponding to the second duration are preset, where M1 is 0.8 and M2 is 0.2.
Background tab page 1:
a first time length T [1] ═ 80min, a second time length Stay [1] ═ 25min and an interest weight value H [1] ═ 0.5;
background tab page 2:
a first time duration T [2] ═ 25min, a second time duration Stay [2] ═ 125min and an interest weight value H [2] ═ 0.8;
background tab page 3:
a first time duration T [3] ═ 20min, a second time duration Stay [3] ═ 80min, and an interest weight value H [3] ═ 1;
background tab 4:
a first time duration T [4] ═ 50min, a second time duration Stay [4] ═ 20min and an interest weight value H [4] ═ 1.5;
determining a reference value corresponding to each background label page according to the first time length and the second time length corresponding to each background label page, the first preset weight corresponding to each background label page and the interest weight corresponding to each background label page:
the reference values corresponding to the background label page 1 are:
(M1/T[1]+Stay[1]*M2)*H[1]=2.505;
the reference values corresponding to the background label page 2 are:
(M1/T[2]+Stay[2]*M2)*H[2]=20.0256;
the reference values corresponding to the background tab page 3 are:
(M1/T[3]+Stay[3]*M2)*H[3]=16.04;
the reference values corresponding to the background tab page 4 are:
(M1/T[4]+Stay[4]*M2)*H[4]=6.024。
after the reference value of each background label page is determined, the background label page with the largest reference value is used as a target label page, and it can be seen that if the target label page is the background label page 2, the determined background label page 2 is closed.
Based on the same inventive concept, the embodiment of the present invention further provides a mobile terminal, and as the principle of the terminal for solving the problem is similar to the method for closing the tab page in the browser in the embodiment of the present invention, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 6, a mobile terminal according to an embodiment of the present invention includes at least one processing unit 600 and at least one storage unit 601;
wherein the storage unit 601 stores program code which, when executed by the processing unit 600, causes the processing unit 600 to perform the following process:
when a plurality of tab pages are opened in a browser, acquiring a parameter which corresponds to each background tab page and is used for expressing the attention degree of a user to the content of the tab page;
and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page.
Optionally, the parameter for indicating the attention degree of the user to the content of the tab page includes part or all of the following parameters:
accumulating the first time length displayed by the label page;
a second time length between the current time and the time when the label page is last quitted from the display time;
and the interest weight value of the interest degree of the user on the content corresponding to the label page.
Optionally, the processing unit 600 is specifically configured to:
determining alternative background label pages with the memory occupation amount larger than a first threshold value according to the memory occupation amount corresponding to each background label page;
determining a reference value which corresponds to each alternative background label page and is used for representing the release priority of the label page according to the parameter which corresponds to each background label page and is used for representing the attention degree of the user to the content of the label page;
and according to the reference value corresponding to each alternative background label page, taking the alternative background label page with the maximum reference value as the target label page.
Optionally, the processing unit 600 is specifically configured to:
performing weighting and operation on the reciprocal of the first time length corresponding to the alternative background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the alternative background label page as a reference value corresponding to the alternative background label page; or
And performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the interest weight value, wherein the result of the weighting and operation is used as a reference value corresponding to the alternative background label page.
Optionally, the processing unit 600 is specifically configured to:
when the number of the tab pages opened in the browser is larger than a second threshold and/or the remaining running memory of the system is determined to be lower than a third threshold, determining a reference value which is corresponding to each background tab page and is used for representing the release priority of the tab page according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page;
and according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as the target label page.
Optionally, the processing unit 600 is specifically configured to:
performing weighting and operation on the reciprocal of the first time length corresponding to the background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the background label page as a reference value corresponding to the background label page; or
And performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the first time length, the second time length and the interest weight value corresponding to the background label page, and taking the result of the weighting and operation as the reference value corresponding to the background label page.
As shown in fig. 7, another terminal 700 capable of closing a tab page in a browser according to an embodiment of the present invention includes: a Radio Frequency (RF) circuit 710, a power supply 720, a processor 730, a memory 740, an input unit 750, a display unit 760, a camera 770, a communication interface 780, and a Wireless Fidelity (WiFi) module 790. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 7 is not intended to be limiting, and that embodiments of the present invention provide terminals that include more or less components than those shown, or that certain components may be combined, or that a different arrangement of components may be provided.
The following describes the various components of the terminal 700 in detail with reference to fig. 7:
the RF circuit 710 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 710 sends the downlink data of the base station to the processor 730 for processing after receiving the downlink data; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 710 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 710 may also communicate with a network and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal 700 realizes Access to a data network through an Access Point (AP) to which the WiFi module 790 can connect. The WiFi module 790 may be used for receiving and transmitting data during communication.
The terminal 700 may be physically connected to other terminals through the communication interface 780. Optionally, the communication interface 780 is connected to the communication interfaces of the other terminals through a cable, so as to implement data transmission between the terminal 700 and the other terminals.
In the embodiment of the present invention, the terminal 700 can implement a communication service and send information to other contacts, so the terminal 700 needs to have a data transmission function, that is, the terminal 700 needs to include a communication module inside. Although fig. 7 shows communication modules such as the RF circuit 710, the WiFi module 790, and the communication interface 780, it is understood that at least one of the above components or other communication modules (e.g., bluetooth module) for implementing communication exists in the terminal 700 for data transmission.
For example, when the terminal 700 is a mobile phone, the terminal 700 may include the RF circuit 710 and may further include the WiFi module 790; when the terminal 700 is a computer, the terminal 700 may include the communication interface 780 and may further include the WiFi module 790; when the terminal 700 is a tablet computer, the terminal 700 may include the WiFi module.
The memory 740 may be used to store software programs and modules. The processor 730 executes various functional applications and data processing of the terminal 700 by executing the software programs and modules stored in the memory 740, and can implement part or all of the processes in fig. 2, fig. 4 and fig. 5 according to the embodiments of the present invention when the processor 730 executes the program codes in the memory 740.
Alternatively, the memory 740 may mainly include a program storage area and a data storage area. Wherein, the storage program area can store an operating system, various application programs (such as communication application), various modules for WLAN connection, and the like; the storage data area may store data created according to the use of the terminal, and the like.
In addition, the memory 740 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 750 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 700.
Alternatively, the input unit 750 may include a touch panel 751 and other input terminals 752.
The touch panel 751, also referred to as a touch screen, can collect touch operations of a user (such as a user's operation of a finger, a stylus, or any other suitable object or accessory on or near the touch panel 751) and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 751 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 730, and can receive and execute commands sent by the processor 730. In addition, the touch panel 751 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Optionally, the other input terminals 752 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 760 may be used to display information input by a user or information provided to the user and various menus of the terminal 700. The display unit 760 is a display system of the terminal 700, and is configured to present an interface to implement human-computer interaction.
The display unit 760 may include a display panel 761. Alternatively, the Display panel 761 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 751 can cover the display panel 761, and when the touch panel 751 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 730 to determine the type of the touch event, and then the processor 730 provides a corresponding visual output on the display panel 761 according to the type of the touch event.
Although in fig. 7, the touch panel 751 and the display panel 761 are implemented as two separate components to implement the input and output functions of the terminal 700, in some embodiments, the touch panel 751 and the display panel 761 can be integrated to implement the input and output functions of the terminal 700.
The processor 730 is a control center of the terminal 700, connects various components using various interfaces and lines, performs various functions of the terminal 700 and processes data by operating or executing software programs and/or modules stored in the memory 740 and calling data stored in the memory 740, thereby implementing various services based on the terminal.
Optionally, the processor 730 may include one or more processing units. Optionally, the processor 730 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 730.
The camera 770 is used for implementing a shooting function of the terminal 700 and shooting pictures or videos.
The terminal 700 also includes a power supply 720, such as a battery, for powering the various components. Optionally, the power supply 720 may be logically connected to the processor 730 through a power management system, so as to implement functions of managing charging, discharging, power consumption, and the like through the power management system.
Although not shown, the terminal 700 may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
As shown in fig. 8, an apparatus for closing a tab page in a browser according to an embodiment of the present invention includes:
an obtaining module 801, configured to obtain, when multiple tab pages are opened in a browser, a parameter corresponding to each background tab page and used for indicating a degree of attention of a user to a tab page content;
an operation module 802, configured to select, according to a parameter corresponding to each background tab and used for indicating a degree of attention of a user to a tab content, a target tab that needs to be closed from the multiple background tabs, and close the selected target tab.
Optionally, the parameter for indicating the attention degree of the user to the content of the tab page includes part or all of the following parameters:
accumulating the first time length displayed by the label page;
a second time length between the current time and the time when the label page is last quitted from the display time;
and the interest weight value of the interest degree of the user on the content corresponding to the label page.
Optionally, the operation module 802 is specifically configured to:
determining alternative background label pages with the memory occupation amount larger than a first threshold value according to the memory occupation amount corresponding to each background label page;
determining a reference value which corresponds to each alternative background label page and is used for representing the release priority of the label page according to the parameter which corresponds to each alternative background label page and is used for representing the attention degree of the user to the content of the label page;
and according to the reference value corresponding to each alternative background label page, taking the alternative background label page with the maximum reference value as the target label page.
Optionally, the operation module 802 is specifically configured to:
performing weighting and operation on the reciprocal of the first time length corresponding to the alternative background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the alternative background label page as a reference value corresponding to the alternative background label page; or
And performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the interest weight value, wherein the result of the weighting and operation is used as a reference value corresponding to the alternative background label page.
Optionally, the operation module 802 is specifically configured to:
when the number of the tab pages opened in the browser is larger than a second threshold and/or the remaining running memory of the system is determined to be lower than a third threshold, determining a reference value which is corresponding to each background tab page and is used for representing the release priority of the tab page according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page;
and according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as the target label page.
Optionally, the operation module 802 is specifically configured to:
performing weighting and operation on the reciprocal of the first time length corresponding to the background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the background label page as a reference value corresponding to the background label page; or
And performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the first time length, the second time length and the interest weight value corresponding to the background label page, and taking the result of the weighting and operation as the reference value corresponding to the background label page.
An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the methods described above.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the invention. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the invention can take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this document, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A mobile terminal comprising at least one processing unit and at least one memory unit;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
when a plurality of tab pages are opened in a browser, acquiring a parameter which corresponds to each background tab page and is used for expressing the attention degree of a user to the content of the tab page;
and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page.
2. The terminal of claim 1, wherein the parameter for indicating the attention degree of the user to the tab page content comprises part or all of the following parameters:
accumulating the first time length displayed by the label page;
a second time length between the current time and the time when the label page is last quitted from the display time;
and the interest weight value of the interest degree of the user on the content corresponding to the label page.
3. The terminal of claim 2, wherein the processing unit is specifically configured to:
determining alternative background label pages with the memory occupation amount larger than a first threshold value according to the memory occupation amount corresponding to each background label page;
determining a reference value which corresponds to each alternative background label page and is used for representing the release priority of the label page according to the parameter which corresponds to each alternative background label page and is used for representing the attention degree of the user to the content of the label page;
and according to the reference value corresponding to each alternative background label page, taking the alternative background label page with the maximum reference value as the target label page.
4. The terminal of claim 3, wherein the processing unit is specifically configured to:
performing weighting and operation on the reciprocal of the first time length corresponding to the alternative background label page, the second time length and the corresponding first preset weight of the first time length and the second time length, and taking the product of the result of the weighting and operation and the interest weight value corresponding to the alternative background label page as a reference value corresponding to the alternative background label page; or
And performing weighting and operation on the reciprocal of the first time length, the second time length, the interest weight value and the corresponding second preset weight of the interest weight value, wherein the result of the weighting and operation is used as a reference value corresponding to the alternative background label page.
5. The terminal of claim 2, wherein the processing unit is specifically configured to:
when the number of the tab pages opened in the browser is larger than a second threshold and/or the remaining running memory of the system is determined to be lower than a third threshold, determining a reference value which is corresponding to each background tab page and is used for representing the release priority of the tab page according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page;
and according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as the target label page.
6. A method for closing a tab page in a browser, the method comprising:
when a plurality of tab pages are opened in a browser, acquiring a parameter which corresponds to each background tab page and is used for expressing the attention degree of a user to the content of the tab page;
and selecting a target tab page needing to be closed from the plurality of background tab pages according to the parameter which is corresponding to each background tab page and used for expressing the attention degree of the user to the tab page content, and closing the selected target tab page.
7. The method of claim 6, wherein the parameters for indicating the attention degree of the user to the tab page content comprise part or all of the following parameters:
accumulating the first time length displayed by the label page;
a second time length between the current time and the time when the label page is last quitted from the display time;
and the interest weight value of the interest degree of the user on the content corresponding to the label page.
8. The method as claimed in claim 7, wherein the selecting a target tab page to be closed from a plurality of background tab pages according to the parameter corresponding to each background tab page and used for indicating the attention degree of the user to the contents of the tab page comprises:
determining alternative background label pages with the memory occupation amount larger than a first threshold value according to the memory occupation amount corresponding to each background label page;
determining a reference value which corresponds to each alternative background label page and is used for representing the release priority of the label page according to the parameter which corresponds to each alternative background label page and is used for representing the attention degree of the user to the content of the label page;
and according to the reference value corresponding to each alternative background label page, taking the alternative background label page with the maximum reference value as the target label page.
9. The method as claimed in claim 7, wherein the selecting a target tab page to be closed from the plurality of background tab pages according to the parameter corresponding to each background tab page and used for indicating the attention degree of the user to the contents of the tab page comprises:
when the number of the tab pages opened in the browser is larger than a second threshold and/or the remaining running memory of the system is determined to be lower than a third threshold, determining a reference value which is corresponding to each background tab page and is used for representing the release priority of the tab page according to the parameter which is corresponding to each background tab page and is used for representing the attention degree of the user to the content of the tab page;
and according to the reference value corresponding to each background label page, taking the background label page with the maximum reference value as the target label page.
10. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 6 to 9.
CN201910858142.4A 2019-09-11 2019-09-11 Method and terminal for closing tab page in browser Pending CN112487316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910858142.4A CN112487316A (en) 2019-09-11 2019-09-11 Method and terminal for closing tab page in browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910858142.4A CN112487316A (en) 2019-09-11 2019-09-11 Method and terminal for closing tab page in browser

Publications (1)

Publication Number Publication Date
CN112487316A true CN112487316A (en) 2021-03-12

Family

ID=74920211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910858142.4A Pending CN112487316A (en) 2019-09-11 2019-09-11 Method and terminal for closing tab page in browser

Country Status (1)

Country Link
CN (1) CN112487316A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507646A (en) * 2021-07-01 2021-10-15 海信电子科技(深圳)有限公司 Display device and multi-tab-page media asset playing method of browser
CN114780189A (en) * 2022-04-13 2022-07-22 北京锐安科技有限公司 Page navigation method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199874A (en) * 2014-08-20 2014-12-10 哈尔滨工程大学 Webpage recommendation method based on user browsing behaviors
CN105718541A (en) * 2016-01-18 2016-06-29 浪潮软件集团有限公司 Method and device for acquiring user preference information
CN105930513A (en) * 2016-05-16 2016-09-07 北京京东尚科信息技术有限公司 Browser history record sorting method and apparatus
CN106686063A (en) * 2016-12-07 2017-05-17 乐视控股(北京)有限公司 Information recommendation method and apparatus, and electronic device
CN109508430A (en) * 2018-09-27 2019-03-22 努比亚技术有限公司 Browser network address label management method, terminal and computer readable storage medium
CN109558229A (en) * 2018-11-23 2019-04-02 北京小米移动软件有限公司 Browser control method and device
CN110110262A (en) * 2019-05-07 2019-08-09 海信电子科技(深圳)有限公司 Browser EMS memory management process, device and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199874A (en) * 2014-08-20 2014-12-10 哈尔滨工程大学 Webpage recommendation method based on user browsing behaviors
CN105718541A (en) * 2016-01-18 2016-06-29 浪潮软件集团有限公司 Method and device for acquiring user preference information
CN105930513A (en) * 2016-05-16 2016-09-07 北京京东尚科信息技术有限公司 Browser history record sorting method and apparatus
CN106686063A (en) * 2016-12-07 2017-05-17 乐视控股(北京)有限公司 Information recommendation method and apparatus, and electronic device
CN109508430A (en) * 2018-09-27 2019-03-22 努比亚技术有限公司 Browser network address label management method, terminal and computer readable storage medium
CN109558229A (en) * 2018-11-23 2019-04-02 北京小米移动软件有限公司 Browser control method and device
CN110110262A (en) * 2019-05-07 2019-08-09 海信电子科技(深圳)有限公司 Browser EMS memory management process, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王卫东, 武汉大学出版社 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507646A (en) * 2021-07-01 2021-10-15 海信电子科技(深圳)有限公司 Display device and multi-tab-page media asset playing method of browser
CN113507646B (en) * 2021-07-01 2023-07-18 Vidaa(荷兰)国际控股有限公司 Display equipment and browser multi-label page media resource playing method
CN114780189A (en) * 2022-04-13 2022-07-22 北京锐安科技有限公司 Page navigation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11099900B2 (en) Memory reclamation method and apparatus
US10635449B2 (en) Method and apparatus for running game client
CN110996376B (en) Service data transmission method, device, storage medium and terminal
US10725646B2 (en) Method and apparatus for switching screen interface and terminal
CN107272872B (en) Power saving control method and related product
EP3647926A1 (en) Mobile terminal and split screen control method thereof, and computer readable storage medium
CN108632930B (en) Network searching control method and device and mobile terminal
CN104778055B (en) Method and device for displaying progress bar
US20180063046A1 (en) Method and apparatus for downloading and displaying pictures
CN109284144B (en) Fast application processing method and mobile terminal
CN104077184B (en) A kind of course control method and computer system of application program
CN109992364B (en) Application freezing method and device, computer equipment and computer readable storage medium
CN112487316A (en) Method and terminal for closing tab page in browser
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium
CN111866976A (en) Network switching method and device
CN106484563B (en) Data migration method and terminal equipment
CN110312995B (en) Application program accelerated starting method and device and terminal
CN106649595B (en) Object pool-based webpage starting acceleration method and device and terminal
CN106339230B (en) Graphical interface display method and device
CN110471622B (en) SD card data writing method and device, storage medium and terminal
CN110045811B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN106484529A (en) The Memory adjustments method of terminal and terminal
CN108307531B (en) Call control method, device, user terminal and computer readable storage medium
CN110851198A (en) Method and terminal for displaying view of fast application
CN108111553B (en) Method and device for providing service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210312