Tab page processing method, device, electronic device, storage medium and product

By implementing the tab page processing method in the browser, using the page identifier stored in the cache to switch existing tab pages, the performance consumption problem caused by frequent creation of new tab pages is solved, and more efficient tab page management is achieved.

CN114329261BActive Publication Date: 2025-04-08BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111510916.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-04-08
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

In the prior art, every time a user clicks a hyperlink, the browser will directly create a new tab page, resulting in too many tab pages and high performance consumption.

Method used

A tab page processing method is provided to obtain a unified resource locator for the target tab page in response to a jump instruction for the target tab page in the browser. If the target page identifier corresponding to the target resource locator is stored in the specified buffer, the tab page displayed in the current interface is switched to the created tab page indicated by the target page identifier.

Benefits of technology

By detecting whether the tab page indicated by the target resource locator has been opened, unnecessary tab page creation is avoided, and the number of tab pages in the browser is reduced, thereby reducing performance consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329261B_ABST
    Figure CN114329261B_ABST
Patent Text Reader

Abstract

The present disclosure provides a tab processing method, device, electronic device, storage medium and product, which belong to the field of network technology. In the method, in response to a jump instruction for a target tab in a browser, a uniform resource locator corresponding to the target tab is obtained to obtain a target resource locator. If a target page identifier corresponding to the target resource locator is stored in a designated cache area, the tab displayed in the current interface is switched to a created tab indicated by the target page identifier, and the designated cache area stores page identifiers of each created tab, and different created tabs have different page identifiers. In this way, unnecessary creation operations can be avoided to a certain extent, the number of tabs in the browser can be reduced, and thus performance consumption can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of network technology, and in particular, relates to a tab processing method, device, electronic device, storage medium and product. Background Art

[0002] With the continuous development of network technology, more and more information resources are disseminated in the form of web pages. Users often browse web pages through browser tabs to obtain information. Tabs sometimes contain hyperlinks, and users can click on the hyperlinks to view the web pages corresponding to the hyperlinks.

[0003] In the related art, each time a user clicks a hyperlink, the browser will directly create a new tab page, which sometimes results in too many tab pages and high performance consumption. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a tab processing method, device, electronic device, storage medium and product.

[0005] According to a first aspect of the present disclosure, a method for processing a tab page is provided, the method comprising:

[0006] In response to a jump instruction for a target tab page in the browser, acquiring a uniform resource locator corresponding to the target tab page to obtain a target resource locator;

[0007] If the designated cache area stores a target page identifier corresponding to the target resource locator, the tab page displayed in the current interface is switched to the created tab page indicated by the target page identifier; the designated cache area stores the page identifiers of each created tab page, and different created tab pages have different page identifiers.

[0008] Optionally, if the target page identifier corresponding to the target resource locator is stored in the designated cache area, before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the method further includes:

[0009] Generate a current page identifier according to the target resource locator, and match the current page identifier with page identifiers of each created tab page in the designated buffer area;

[0010] If there is a page identifier of a created tab page that matches the current page identifier, it is determined that the target page identifier is stored in the designated buffer area.

[0011] Optionally, the designated buffer area stores resource locators of each created tab page, and the resource locators of each created tab page are stored corresponding to the page identifiers of each created tab page;

[0012] If the target page identifier corresponding to the target resource locator is stored in the designated cache area, before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the method further includes:

[0013] Matching the target resource locator with the resource locators of each created tab page in the designated cache area;

[0014] If there is a resource locator of a created tab page that matches the target resource locator, it is determined that the target page identifier is stored in the designated buffer area.

[0015] Optionally, generating a current page identifier according to the target resource locator includes:

[0016] Compressing the target resource locator based on an information digest algorithm to obtain a compressed value;

[0017] A first extended value is added to the compressed value to serve as the current page identifier; the first extended value is used to indicate the web page provider corresponding to the target tab page.

[0018] Optionally, the designated cache area further stores a second extended value corresponding to the resource locator of each created tab page, wherein the second extended value is used to represent a web page provider corresponding to the created tab page;

[0019] Before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the method further includes:

[0020] Detecting whether a target extended value is consistent with a first extended value; the target extended value is a second extended value corresponding to a resource locator of a created tab page that matches the target resource locator; the first extended value is used to characterize a webpage provider corresponding to the target tab page;

[0021] When the target expansion value is consistent with the first expansion value, the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier is performed.

[0022] Optionally, the method further includes:

[0023] If the target page identifier is not stored in the designated cache area, the target tab page is created; the target tab page is used to carry the web page pointed to by the target resource locator;

[0024] The tab page displayed in the current interface is switched to the target tab page, and a current page identifier is added in the designated buffer area; the current page identifier is generated based on the target resource locator.

[0025] Optionally, switching the tab page displayed in the current interface to the target tab page includes:

[0026] The target resource locator and the current page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the current page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter.

[0027] Optionally, the target resource locator corresponds to a hyperlink triggered in the current tab page, and the hyperlink in the current tab page is bound to an event processing function;

[0028] If the hyperlink in the current tab page is triggered, the method further includes:

[0029] The trigger event corresponding to the hyperlink is used as the input of the event processing function to output an interception instruction to the browser based on the event processing function; the interception instruction is used to instruct the browser to terminate the operation of directly creating a tab page corresponding to the hyperlink.

[0030] Optionally, the page identifier is a name value of a tab page name attribute.

[0031] According to a second aspect of the present disclosure, a tab page processing device is provided, the device comprising:

[0032] An acquisition module is configured to, in response to a jump instruction for a target tab page in the browser, acquire a uniform resource locator corresponding to the target tab page to obtain a target resource locator;

[0033] The first switching module is configured to switch the tab page displayed in the current interface to the created tab page indicated by the target page identifier if the target page identifier corresponding to the target resource locator is stored in the designated cache area; the designated cache area stores the page identifiers of each created tab page, and different created tab pages have different page identifiers.

[0034] Optionally, the device further comprises:

[0035] A first matching module is configured to generate a current page identifier according to the target resource locator, and match the current page identifier with page identifiers of each created tab page in the designated cache area;

[0036] The first determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a page identifier of a created tab page that matches the current page identifier.

[0037] Optionally, the designated cache area stores resource locators of each created tab page, and the resource locators of each created tab page are stored correspondingly to the page identifiers of each created tab page; the device further includes:

[0038] A second matching module is configured to match the target resource locator with the resource locators of each created tab page in the designated cache area;

[0039] The second determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a resource locator of a created tab page that matches the target resource locator.

[0040] Optionally, the first matching module is specifically configured as follows:

[0041] Compressing the target resource locator based on an information digest algorithm to obtain a compressed value;

[0042] A first extended value is added to the compressed value to serve as the current page identifier; the first extended value is used to indicate the web page provider corresponding to the target tab page.

[0043] Optionally, the designated cache area further stores a second extended value corresponding to the resource locator of each created tab page, the second extended value being used to characterize the web page provider corresponding to the created tab page; the device further includes:

[0044] a detection module configured to detect whether a target extended value is consistent with a first extended value; the target extended value is a second extended value corresponding to a resource locator of a created tab page that matches the target resource locator; the first extended value is used to characterize a webpage provider corresponding to the target tab page;

[0045] The execution module is configured to execute the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier when the target expansion value is consistent with the first expansion value.

[0046] Optionally, the device further comprises:

[0047] A creation module is configured to create the target tab page if the target page identifier is not stored in the designated buffer area; the target tab page is used to carry the web page pointed to by the target resource locator;

[0048] The second switching module is configured to switch the tab page displayed in the current interface to the target tab page, and to add a current page identifier in the designated buffer area; the current page identifier is generated based on the target resource locator.

[0049] Optionally, the second switching module is specifically configured to:

[0050] The target resource locator and the current page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the current page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter.

[0051] Optionally, the target resource locator corresponds to a hyperlink triggered in the current tab page, and the hyperlink in the current tab page is bound to an event processing function; the device further includes:

[0052] The output module is configured to: if the hyperlink in the current tab page is triggered, the method further includes:

[0053] The trigger event corresponding to the hyperlink is used as the input of the event processing function to output an interception instruction to the browser based on the event processing function; the interception instruction is used to instruct the browser to terminate the operation of directly creating a tab page corresponding to the hyperlink.

[0054] Optionally, the page identifier is a name value of a tab page name attribute.

[0055] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0056] processor;

[0057] a memory for storing instructions executable by the processor;

[0058] The processor is configured to execute the instructions to implement the method as described in any one of the first aspects.

[0059] According to a fourth aspect of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device executes the method as described in any one of the first aspects.

[0060] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product comprising readable program instructions, and when the readable program instructions are executed by a processor of an electronic device, the electronic device executes the method as described in any one of the first aspects.

[0061] Compared with the related art, the present invention has the following advantages and positive effects:

[0062] The tab processing method provided by the embodiment of the present disclosure responds to the jump instruction for the target tab in the browser, obtains the uniform resource locator corresponding to the target tab, and obtains the target resource locator. If the target page identifier corresponding to the target resource locator is stored in the designated cache area, the tab displayed in the current interface is switched to the created tab indicated by the target page identifier, and the designated cache area stores the page identifiers of each created tab, and the page identifiers of different created tabs are different. Compared with the method of directly creating a new tab each time, in the embodiment of the present disclosure, it is first detected whether the tab indicated by the hyperlink has been opened before, that is, whether there is a created target tab indicated by the target page identifier corresponding to the target resource locator, and if so, the created tab is directly displayed, thereby avoiding unnecessary creation operations to a certain extent, reducing the number of tabs in the browser, and thus reducing performance consumption.

[0063] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present disclosure. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0065] Figure 1 is a flowchart of a method for processing a tab page provided by an embodiment of the present disclosure;

[0066] Figure 2 It is a flow chart provided by an embodiment of the present disclosure;

[0067] Figure 3 is a schematic diagram of an interface processing provided by an embodiment of the present disclosure;

[0068] Figure 4 is a block diagram of a tab page processing device provided by an embodiment of the present disclosure;

[0069] Figure 5 is a block diagram of a device for tab page processing according to an exemplary embodiment;

[0070] Figure 6It is a block diagram of another apparatus for tab page processing according to an exemplary embodiment. DETAILED DESCRIPTION

[0071] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0072] Figure 1 is a flowchart of a method for processing a tab page provided by an embodiment of the present disclosure. Figure 1 As shown, the method may include:

[0073] Step 101: In response to a jump instruction for a target tab page in a browser, a uniform resource locator corresponding to the target tab page is obtained to obtain a target resource locator.

[0074] In the disclosed embodiment, the browser may be a web browser, and the tab page may be an entity of the browser carrying a web page. For example, the tab page may display an online document. A hyperlink is an element used to connect a web page, and web pages can be connected and jumped to each other through hyperlinks. Specifically, a jump instruction for a target tab page in the browser may be sent by triggering a hyperlink in the current tab page of the browser. Among them, the current tab page is the tab page displayed in the current interface. For example, assuming that tab page a and tab page b are currently opened, tab page a is displayed in the current interface, and tab page b is in a thumbnail state, then tab page a can be determined to be the current tab page. The jump instruction may be used to instruct the browser to display the tab page corresponding to the triggered hyperlink, and the tab page corresponding to the triggered hyperlink is the target tab page. The current tab page may be any tab page currently created in the browser, and the hyperlink in the current tab page is the hyperlink contained in the web page carried by the current tab page. If a click operation on the hyperlink is detected, it can be determined that the hyperlink is triggered. The hyperlink may be generated based on the Uniform Resource Locator (URL) of the web page, and the target resource locator is the resource locator corresponding to the triggered hyperlink. Specifically, the hyperlink may be parsed to extract the target resource locator. For example, the content of the specified location may be extracted from the parsed hyperlink to obtain the target resource locator of the target tab.

[0075] Step 102: If the designated cache area stores a target page identifier corresponding to the target resource locator, the tab page displayed in the current interface is switched to the created tab page indicated by the target page identifier; the designated cache area stores page identifiers of each created tab page, and different created tab pages have different page identifiers.

[0076] In the disclosed embodiment, the designated cache area may be pre-set, and for example, the designated cache area may be a cache area corresponding to the browser. The page identifier may be used to uniquely indicate a tab page, and the page identifiers of different created tab pages may be different. Accordingly, the designated cache area stores the page identifiers of the created tab pages, so that the browser can conveniently know which tab pages are currently created. The target tab page to be created this time may be a tab page for carrying the web page corresponding to the target resource locator, and the target page identifier may be the page identifier of the target tab page for carrying the web page corresponding to the target resource locator. If the target page identifier is stored in the designated cache area, it can be determined that a tab page has been created for the target resource locator before, that is, the target tab page has been created before, the current created tab page includes the target tab page, and the browser has previously opened the web page corresponding to the target resource locator, therefore, the tab page displayed in the current interface can be directly switched to the created tab page indicated by the target page identifier, that is, the previously created target tab page is activated.

[0077] The tab processing method provided by the embodiment of the present disclosure responds to the jump instruction for the target tab in the browser, obtains the uniform resource locator corresponding to the target tab, and obtains the target resource locator. If the target page identifier corresponding to the target resource locator is stored in the designated cache area, the tab displayed in the current interface is switched to the created tab indicated by the target page identifier, and the designated cache area stores the page identifiers of each created tab, and the page identifiers of different created tabs are different. Compared with the method of directly creating a new tab each time, in the embodiment of the present disclosure, it is first detected whether the tab indicated by the hyperlink has been opened before, that is, whether there is a created target tab indicated by the target page identifier corresponding to the target resource locator, and if so, the created tab is directly displayed, thereby avoiding unnecessary creation operations to a certain extent, reducing the number of tabs in the browser, and thus reducing performance consumption.

[0078] Optionally, after step 101 and before step 102, the embodiment of the present disclosure may further perform the following steps:

[0079] Step S21, calling a designated interface, and passing the target resource locator into the designated interface to detect whether the target page identifier is stored in the designated buffer area.

[0080] Among them, the designated interface can encapsulate the implementation logic of detecting whether the target page identifier is stored in the designated cache area according to the target resource locator, switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier when the target page identifier is stored, and the corresponding processing method when the target page identifier is not stored. The designated interface can be a pre-generated unified jump application program interface (Application Program Interface, API) for business use. In the embodiment of the present disclosure, a designated interface for calling is provided to replace the current existing jump solution, thereby avoiding the problem of too many tab pages.

[0081] Optionally, in the first implementation of the present disclosure, the step of detecting whether the target page identifier is stored in the designated cache area may specifically include the following steps, that is, the following steps may also be performed before the above step 102:

[0082] Step S31: Generate a current page identifier according to the target resource locator, and match the current page identifier with page identifiers of each created tab page in the designated cache area.

[0083] In the disclosed embodiment, since the resource locator is unique, that is, the resource locators of different web pages are different, the current page identifier can be generated based on the target resource locator to ensure the uniqueness of the page identifier, thereby avoiding the problem of misjudgment due to overlap of page identifiers. The generated current page identifier is consistent with the content of the target page identifier. For the page identifier of any created tab page stored in the specified cache area, the current page identifier can be compared with the page identifier to determine whether the current page identifier is the same as the page identifier. If they are the same, it can be determined that there is a page identifier of a created tab page in the specified cache area that matches the current page identifier. Conversely, if the page identifier of each created tab page is different from the current page identifier, it can be determined that there is no page identifier of a created tab page that matches the current page identifier.

[0084] Step S32: If there is a page identifier of a created tab page that matches the current page identifier, it is determined that the target page identifier is stored in the designated buffer area.

[0085] In this step, if there is a page identifier of a created tab page that matches the current page identifier, it can be determined that the target page identifier is stored in the specified buffer area, and a tab page has been created for the target resource locator before. Correspondingly, if there is no page identifier of a created tab page that matches the current page identifier, it can be determined that the target page identifier is not stored in the specified buffer area, that is, it can be determined that no tab page has been created for the target resource locator before.

[0086] In the disclosed embodiment, a current page identifier is first generated based on the target resource locator, and the current page identifier is used to match the page identifier of the created tab page stored in the specified cache area to determine whether the target page identifier is stored in the specified cache area. In this way, detection can be achieved by only storing the page identifier of the created tab page in the specified cache area, which can simplify storage operations to a certain extent and reduce storage costs.

[0087] Optionally, the operation of generating a current page identifier according to the target resource locator may specifically include:

[0088] Step S41: compress the target resource locator based on an information digest algorithm to obtain a compressed value.

[0089] In the embodiments of the present disclosure, the information digest algorithm can be pre-selected according to actual needs. For example, the information digest algorithm can be the MD5 algorithm, so that the target resource locator can be compressed and further encrypted, thereby ensuring the security of the resource locator information to a certain extent. Of course, other algorithms can also be used, and the present disclosure does not limit this. Specifically, the target resource locator can be used as the input of the MD5 algorithm, and then the output of the MD5 algorithm is determined as the compressed value of the target resource locator.

[0090] Step S42: adding a first extended value to the compressed value as the current page identifier; the first extended value is used to indicate the web page provider corresponding to the target tab page.

[0091] In the disclosed embodiment, the web page provider may be a service provider of the web page, and the extended values ​​of the same web page provider may be the same, and the extended values ​​of different web page providers may be different. An extended value may be set for a web page provider. For example, the identifier of the web page provider, such as the name, number, etc., may be set as the extended value of the web page provider. Accordingly, the web page provider corresponding to the target tab page may be detected, and then the extended value of the web page provider corresponding to the target tab page may be obtained, thereby obtaining the first extended value. Among them, the web page provider corresponding to the tab page is used to provide a web page containing a triggered hyperlink corresponding to the tab page. Since the jump instruction for the target tab page is triggered based on the hyperlink in the current tab page, that is, the current tab page contains the triggered hyperlink corresponding to the target tab page, therefore, the source information of the web page carried by the current tab page may be obtained, and the web page provider pointed to by the source information may be determined as the web page provider corresponding to the target tab page, and finally the extended value of the web page provider corresponding to the target tab page may be read as the first extended value. Specifically, the extended value can be used as a prefix value, and the first prefix value is added to the compressed value to perform combination, thereby obtaining the current page identifier.

[0092] By using the extended value representing the web page provider corresponding to the tab page when generating the page identifier, when the same hyperlink is included in the tab pages of different web page providers, it is ensured that when the hyperlinks in the tab pages of different web page providers are triggered, the page identifiers of the tab pages created for the hyperlink are different, thereby preventing the created tab page from being activated by the hyperlinks in the tab pages of other web page providers. For example, assuming that tab page a carrying the web page provided by web page provider A and tab page b carrying the web page provided by web page provider B both contain hyperlink X, when the hyperlink X in tab page a is triggered, a tab page d is created with the page identifier: the extended value representing web page provider A + MD5 (resource locator of hyperlink X). Assuming that the hyperlink X in the subsequent tab page b is triggered, the current page identifier will be generated at this time: the extended value representing web page provider B + MD5 (resource locator of hyperlink X), that is, because the web page providers corresponding to the two are different, the generated page identifiers will be different. Accordingly, when the current page identifier is used for matching in the specified cache area, the page identifier of the tab d created when the hyperlink X in the tab a of the web page provider A is triggered will not be hit, thereby ensuring that the created tab will not be activated by the hyperlinks in the tabs of other web page providers, thereby ensuring the business security of the web page provider to a certain extent and reducing interference between different web page providers.

[0093] In the disclosed embodiment, the target resource locator is compressed based on the information digest algorithm to obtain a compressed value, and the current page identifier is generated by adding a first extended value to the compressed value. In this way, the problem of the target resource locator being too long resulting in the final generated page identifier being too long can be avoided, thereby ensuring that the page identifier is easy to store. By adding the first extended value for characterizing the web page provider corresponding to the target tab page, it can be ensured that the created tab page will not be activated by a hyperlink in the tab page of other web page providers, thereby ensuring the business security of the web page provider to a certain extent and reducing interference between different web page providers.

[0094] Optionally, in a second implementation of the present disclosure, the resource locator of each created tab page is stored in the above-mentioned designated cache area, and the resource locator of each created tab page is stored corresponding to the page identifier of each created tab page. Specifically, for any created tab page, the resource locator of the created tab page and the page identifier of the created tab page are stored in a one-to-one correspondence, that is, the content stored in the designated cache area can represent the correspondence between the resource locator of the created tab page and the page identifier of the created tab page. Accordingly, the step of detecting whether the target page identifier is stored in the designated cache area can specifically include the following steps, that is, the following steps can also be performed before the above-mentioned step 102:

[0095] Step S51: Match the target resource locator with the resource locators of each created tab page in the designated cache area.

[0096] In this step, for any resource locator of a created tab page stored in the designated buffer area, the target resource locator can be compared with the resource locator to determine whether the target resource locator is the same as the resource locator. If they are the same, it can be determined that there is a resource locator of the created tab page that matches the target resource locator. On the contrary, if the resource locator of each created tab page is different from the target resource locator, it can be determined that there is no resource locator of the created tab page that matches the target resource locator.

[0097] Step S52: If there is a resource locator of a created tab page that matches the target resource locator, it is determined that the target page identifier is stored in the designated buffer area.

[0098] In this step, if there is a resource locator of a created tab page that matches the target resource locator, it can be determined that the target page identifier is stored in the specified buffer area, and a tab page has been created for the target resource locator before. Among them, the page identifier corresponding to the resource locator of the created tab page that matches the target resource locator is the target page identifier. Correspondingly, if there is no resource locator of a created tab page that matches the target resource locator, it can be determined that the target page identifier is not stored in the specified buffer area, that is, it can be determined that no tab page has been created for the target resource locator before.

[0099] In the disclosed embodiment, the resource locator of each created tab page is further stored in the designated buffer area, and the resource locator of each created tab page is stored in correspondence with the page identifier of each created tab page. In this way, it is only necessary to use the target resource locator to match the resource locator of the created tab page stored in the designated buffer area, so as to conveniently determine whether the target page identifier is stored in the designated buffer area, thereby ensuring detection efficiency to a certain extent.

[0100] Optionally, the designated cache area of ​​the embodiment of the present disclosure may also store a second extended value corresponding to the resource locator of each created tab page, and the second extended value may be used to characterize the web page provider corresponding to the created tab page. For example, the second extended value, resource locator, and page identifier of the created tab page may be stored correspondingly. Accordingly, before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the following steps may also be performed:

[0101] Step S61, detecting whether the target extension value is consistent with the first extension value; the target extension value is a second extension value corresponding to the resource locator of the created tab page that matches the target resource locator; the first extension value is used to characterize the webpage provider corresponding to the target tab page.

[0102] Specifically, the first extension value may be obtained first, and the specific acquisition method may refer to the above-mentioned related description, which will not be repeated here. Then, when it is detected that there is a resource locator of a created tab page that matches the target resource locator in the designated cache area, the second extension value corresponding to the resource locator of the created tab page that matches the target resource locator is further read from the designated cache area as the target extension value. The target extension value may be compared with the first extension value to determine whether the two are consistent.

[0103] Step S62: When the target expansion value is consistent with the first expansion value, the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier is executed.

[0104] If the target extension value is consistent with the first extension value, it can be determined that the web page providers of the two are consistent, and then activation can be performed. In the embodiment of the present disclosure, the resource locator of each created tab page is stored corresponding to the page identifier of each created tab page, and the second extension value corresponding to the resource locator of each created tab page is stored in a resource locator matching manner, and whether the target page identifier corresponding to the target resource locator is stored in the specified cache area. Correspondingly, after activating the tab page, it is further detected whether the target extension value is consistent with the first extension value, that is, it is detected whether the web page providers of the two are consistent, and the tab page is activated only when they are consistent. In this way, it can be ensured that the created tab page will not be activated by the hyperlink in the tab page of other web page providers, thereby ensuring the business security of the web page provider to a certain extent and reducing the interference between different web page providers.

[0105] Optionally, in the embodiment of the present disclosure, the following steps may also be performed:

[0106] Step S71: If the target page identifier is not stored in the designated cache area, create the target tab page; the target tab page is used to carry the web page pointed to by the target resource locator.

[0107] In the embodiment of the present disclosure, if the target page identifier is not stored in the designated cache area, it can be determined that no tab page has been created for the target resource locator before, so the target tab page can be created. For example, the web page pointed to by the target resource locator can be obtained, and a new tab page can be created to carry the web page pointed to by the target resource locator, thereby obtaining the target tab page.

[0108] Step S72: switch the tab page displayed in the current interface to the target tab page, and add a current page identifier in the designated buffer area; the current page identifier is generated based on the target resource locator.

[0109] Specifically, according to the resource locator of the target tab page (i.e., the target resource locator) and the target page identifier, the tab page displayed in the current interface can be jumped to the target tab page, thereby realizing the switching. Optionally, the resource locator of the target tab page and the target page identifier can be used as input parameters of a preset jump command, that is, the target resource locator and the target page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the target page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter. Among them, the target resource locator and the target page identifier are used as input parameters, and the resource locator can be used to open the tab page (i.e., the target tab page) indicated by the resource locator in the input parameter, and the jump can be realized, that is, the tab page displayed in the current interface is switched to the target tab page, thereby ensuring that the tab page display can be accurately realized. The target page identifier can be specified as the page identifier of the tab page indicated by the resource locator in the input parameter, thereby ensuring that the tab page can be characterized based on the page identifier.

[0110] Optionally, the page identifier in the embodiment of the present disclosure can be the name value of the tab name (name) attribute. For example, the specified command can be the window.open command, and accordingly, the name attribute can be set for the newly opened tab based on the second parameter in the specified command. In this way, by setting a unique hidden attribute name (name) for the tab window, when clicking a hyperlink in the browser to open a new tab window, it is determined based on the name value whether there is an existing tab with the same name. If so, a new tab is not opened, but the existing tab is directly activated and refreshed to display the existing tab. If not, a new tab is opened, thereby reducing the number of tabs and reducing performance consumption.

[0111] In the case of adopting the first implementation method, the previously generated current page identifier can be directly read and written into the specified buffer area. In the case of adopting the second implementation method, the current page identifier can be first generated according to the target resource locator. The specific generation method can refer to the above-mentioned related description and will not be repeated here. The generated current page identifier is written into the specified buffer area, and the target resource locator and the first extended value are further written accordingly to ensure that the detection can be accurately realized later.

[0112] In the disclosed embodiment, when the target page identifier is not stored in the designated cache, that is, when the tab indicated by the target resource locator has not been opened before, a corresponding target tab is created to ensure that the user can view the desired web page. By adding the page identifier of the created target tab to the designated cache, it can be ensured that the designated cache can accurately record the page identifier of the created tab, and further ensure that when the hyperlink is subsequently triggered repeatedly, the previously created target tab can be directly activated and reused, thereby reducing the number of tabs in the browser to a certain extent and reducing the performance consumption of the browser.

[0113] Optionally, the above operation of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier may specifically include: using the target resource locator and the current page identifier as input parameters of the specified activation command, calling the specified activation command to switch the tab page displayed in the current interface to the tab page indicated by the resource locator in the input parameter, that is, controlling the browser to display the tab page indicated by the resource locator in the input parameter, and specifying the current page identifier as the page identifier of the tab page indicated by the resource locator in the input parameter. The specified activation command may be the same as the above specified command, that is, it may be the window.open command, with the target resource locator and the current page identifier as input parameters, so as to open the tab page whose resource locator is the resource locator in the input parameter, and specify the page identifier in the input parameter for the tab page, thereby ensuring that the tab page display switching can be accurately realized, and avoiding the problem that the page identifier cannot be kept consistent due to an error in the previously specified page identifier.

[0114] Optionally, in the embodiment of the present disclosure, the target resource locator corresponds to the hyperlink triggered in the current tab page, and the hyperlink in the current tab page can be bound to an event processing function. Accordingly, in the case where the hyperlink in the current tab page is triggered, the following steps can also be performed in the embodiment of the present disclosure: Step S81, taking the triggering event corresponding to the hyperlink as the input of the event processing function, so as to output an interception instruction to the browser based on the event processing function; the interception instruction is used to instruct the browser to terminate the operation of directly creating the tab page corresponding to the hyperlink. Among them, the event processing function can be pre-bound to the hyperlink in the current tab page, and all hyperlinks in the current tab page can be set with an event processing function, or an event processing function can be set for each hyperlink. Each time the hyperlink is triggered, a trigger event will be generated accordingly. Accordingly, the event processing function can generate a preset command corresponding to the trigger event input when receiving the trigger event input, as an interception instruction. Finally, the interception instruction can be output to the browser, so as to avoid the browser directly defaulting to creating the tab page corresponding to the hyperlink when the hyperlink is triggered, that is, directly creating the target tab page, thereby causing the problem of too many tab pages.

[0115] The application scenarios involved in the present disclosure are described in detail below. In the browser application scenario, the browser is an application program for retrieving and displaying World Wide Web information resources, which can be used to display information resources such as web pages, pictures, audio and video, or other content, so that the information resources can be identified by a resource locator. The information resources may include hyperlinks. Jumping to web pages through hyperlinks is an important way for service providers to provide rich functions, and it is also an important part of the user's interaction with the program. Hyperlinks allow users to browse related information conveniently. With the development and evolution of web page (Web) technology, web pages (i.e., tabs) in browsers are currently also called Web applications. Web pages (targeting end users, emphasizing user-generated content, ease of use, participatory culture and interoperability, and paying more attention to interactivity. Compared with the client + server interaction mode (C / S), the interaction mode involved in the present disclosure can be a browser (Web application) + server mode (B / S).

[0116] For example, when a web page is an online document, when a new document or page is opened using a hyperlink, it is usually done by reopening a tab or refreshing the current page, but the page that has already been opened cannot be focused and displayed, that is, the created tab is activated. For example, in the related technology using W3C standard technology, the web page uses the hyperlink jump element that requires the user to click. Tag. Set the target link to be jumped to as the href attribute of the element, so that the element will have a special style (for example, the font color becomes blue, and when the mouse moves over the element, an underline and clickable mouse style appear). By configuring the value of the target attribute, specify the location where the new window opens, for example, configure the user to click the element to open a new page. In this way, it is impossible to record the pages that the user has opened, and it is impossible to identify the reused opened pages. Repeatedly opening pages will cause users to operate the same content in tabs in different locations. At the same time, it will cause the number of tabs in the browser to increase rapidly, making it more difficult for users to operate, and too many tabs will occupy a large amount of system memory resources and increase performance consumption, which will cause the system to freeze. In another related technology, the tab is opened in the subwindow by configuring the target attribute, but this method will cause reloading, loss of the current operation status, and increase unnecessary waiting time.

[0117] To this end, the present disclosure provides a web page opening and jumping solution. For example, Figure 2 is a flow chart provided by an embodiment of the present disclosure, such as Figure 2 As shown, the user can click on a new link in the main page, that is, trigger a hyperlink in the current tab page, and accordingly, the step of generating a unique identifier based on the information digest algorithm can be performed to obtain a compressed value. Then, a unique name value is generated according to the compressed value of the resource locator, thereby generating a name value of the new page. That is, the target page identifier is generated according to the target resource locator. Then, it can be determined whether a new opening is required based on the page identifier. Specifically, it can be determined whether there is an existing name value. If so, that is, there is a page identifier of a created tab page that matches the target page identifier, then the existing tab page window can be activated. Among them, the tab page window is the tab page. Otherwise, a new tab page window can be opened, and a name value can be set for the newly opened tab page window, that is, the generated current page identifier value is designated as the page identifier of the newly opened tab page window.

[0118] The implementation logic of each step involved in the embodiment of the present disclosure can be implemented based on a pre-generated designated interface. For example, the designated interface can be named as: goTo API. The service caller, that is, the current tab page, can be based on the resource locator to be jumped to, that is, the target resource locator, passed in by the designated interface to execute based on the designated interface: first go to the designated cache to obtain a unique name value internally. That is, check whether the target page identifier exists in the designated cache. Figure 3 is a schematic diagram of an interface processing provided by an embodiment of the present disclosure, such as Figure 3As shown, detection can be performed based on a preset search command. The preset search command can be name=getCache (resource locator). Further, if the specified cache area (i.e., the name value cache area in the figure) does not have a name value corresponding to the target resource locator, the name value generator is called to generate a new name value and stored in the specified cache area at the same time. The name value generator can obtain the compressed value of the incoming target resource locator: MD5 (resource locator), and then add a custom prefix (i.e., the first extended value) to the compressed value, thereby generating the current page identifier to facilitate detection in the name value cache area based on the preset search command. Accordingly, after obtaining the name value, you can jump to the newly created page. Or, if there is a name value corresponding to the target resource locator, activate the existing page. For example, the resource locator and the name value can be used as input parameters to implement the jump or activation operation based on the preset command. The preset command can be: window.open (URL, name).

[0119] In the disclosed embodiment, when a web page in a browser is controlled to jump to a hyperlink, the resource locator that needs to be jumped is recorded and identified to automatically determine whether the same content page has been opened. If so, that is, there is no need to reopen the page, the previous page is directly awakened to switch and focus on the previous page. In this way, when the user performs repeated link jumps, that is, when the user repeatedly triggers the same hyperlink, duplicate pages can be avoided, the number of tabs can be reduced, the memory usage of the browser, performance consumption, and user difficulty can be reduced, and at the same time, the experience gap between the B / S interaction mode and the C / S interaction mode can be reduced, avoiding system freezes.

[0120] Figure 4 is a block diagram of a tab page processing device provided by an embodiment of the present disclosure, such as Figure 4 As shown, the device 20 may include:

[0121] The acquisition module 201 is configured to, in response to a jump instruction for a target tab page in the browser, acquire a uniform resource locator corresponding to the target tab page to obtain a target resource locator;

[0122] The first switching module 202 is configured to switch the tab page displayed in the current interface to the created tab page indicated by the target page identifier if the target page identifier corresponding to the target resource locator is stored in the designated cache area; the designated cache area stores the page identifiers of each created tab page, and different created tab pages have different page identifiers.

[0123] The tab processing device provided by the embodiment of the present disclosure responds to the jump instruction for the target tab in the browser, obtains the uniform resource locator corresponding to the target tab, and obtains the target resource locator. If the target page identifier corresponding to the target resource locator is stored in the designated cache area, the tab displayed in the current interface is switched to the created tab indicated by the target page identifier, and the designated cache area stores the page identifiers of each created tab, and the page identifiers of different created tabs are different. Compared with the method of directly creating a new tab each time, in the embodiment of the present disclosure, it is first detected whether the tab indicated by the hyperlink has been opened before, that is, whether there is a created target tab indicated by the target page identifier corresponding to the target resource locator, and if so, the created tab is directly displayed, thereby avoiding unnecessary creation operations to a certain extent, reducing the number of tabs in the browser, and thus reducing performance consumption.

[0124] Optionally, the device 20 further includes:

[0125] A first matching module is configured to generate a current page identifier according to the target resource locator, and match the current page identifier with page identifiers of each created tab page in the designated cache area;

[0126] The first determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a page identifier of a created tab page that matches the current page identifier.

[0127] Optionally, the designated buffer area stores resource locators of each created tab page, and the resource locators of each created tab page are stored correspondingly to the page identifiers of each created tab page; the device 20 further includes:

[0128] A second matching module is configured to match the target resource locator with the resource locators of each created tab page in the designated cache area;

[0129] The second determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a resource locator of a created tab page that matches the target resource locator.

[0130] Optionally, the first matching module is specifically configured as follows:

[0131] Compressing the target resource locator based on an information digest algorithm to obtain a compressed value;

[0132] A first extended value is added to the compressed value to serve as the current page identifier; the first extended value is used to indicate the web page provider corresponding to the target tab page.

[0133] Optionally, the designated cache area further stores a second extended value corresponding to the resource locator of each created tab page, the second extended value being used to characterize the web page provider corresponding to the created tab page; the device 20 further includes:

[0134] a detection module configured to detect whether a target extended value is consistent with a first extended value; the target extended value is a second extended value corresponding to a resource locator of a created tab page that matches the target resource locator; the first extended value is used to characterize a webpage provider corresponding to the target tab page;

[0135] The execution module is configured to execute the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier when the target expansion value is consistent with the first expansion value.

[0136] Optionally, the device 20 further includes:

[0137] A creation module is configured to create the target tab page if the target page identifier is not stored in the designated buffer area; the target tab page is used to carry the web page pointed to by the target resource locator;

[0138] The second switching module is configured to switch the tab page displayed in the current interface to the target tab page, and to add a current page identifier in the designated buffer area; the current page identifier is generated based on the target resource locator.

[0139] Optionally, the second switching module 20 is specifically configured as follows:

[0140] The target resource locator and the current page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the current page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter.

[0141] Optionally, the target resource locator corresponds to a hyperlink triggered in the current tab page, and the hyperlink in the current tab page is bound to an event processing function; the device 20 further includes:

[0142] The output module is configured to: if the hyperlink in the current tab page is triggered, the method further includes:

[0143] The trigger event corresponding to the hyperlink is used as the input of the event processing function to output an interception instruction to the browser based on the event processing function; the interception instruction is used to instruct the browser to terminate the operation of directly creating a tab page corresponding to the hyperlink.

[0144] Optionally, the page identifier is a name value of a tab page name attribute.

[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0146] According to one embodiment of the present disclosure, an electronic device is provided, comprising: a processor and a memory for storing processor executable instructions, wherein the processor is configured to implement the steps in the tab processing method in any of the above embodiments when executing.

[0147] According to an embodiment of the present disclosure, a storage medium is further provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the steps in the tab processing method in any of the above embodiments.

[0148] According to one embodiment of the present disclosure, a computer program product is also provided, which includes readable program instructions. When the readable program instructions are executed by a processor of an electronic device, the electronic device can execute the steps in the tab processing method in any of the above embodiments.

[0149] Figure 5 700 is a block diagram of an apparatus for tab processing according to an exemplary embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0150] Reference Figure 5 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0151] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned tab processing method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0152] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0153] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0154] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0155] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0156] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0157] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0158] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0159] In an exemplary embodiment, the device 700 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned tab processing method.

[0160] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by a processor 720 of the device 700 to complete the above-mentioned tab processing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0161] Figure 6800 is a block diagram of another apparatus for tab page processing according to an exemplary embodiment. For example, apparatus 800 may be provided as a server. Figure 6 , the apparatus 800 includes a processing component 822, which further includes one or more processors, and a memory resource represented by a memory 832 for storing instructions executable by the processing component 822, such as an application. The application stored in the memory 832 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 822 is configured to execute instructions to perform the above-mentioned tab processing method.

[0162] The device 800 may also include a power supply component 826 configured to perform power management of the device 800, a wired or wireless network interface 850 configured to connect the device 800 to a network, and an input / output (I / O) interface 858. The device 800 may operate based on an operating system stored in the memory 832, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0163] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0164] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for processing a tab page, characterized in that: The method comprises: In response to a jump instruction for a target tab page in the browser, acquiring a uniform resource locator corresponding to the target tab page to obtain a target resource locator; The target resource locator is compressed based on an information digest algorithm to obtain a compressed value; a first extended value is added to the compressed value as a current page identifier; the first extended value is used to characterize the web page provider corresponding to the target tab page; and the current page identifier is matched with the page identifiers of each created tab page in the specified cache area; if there is a page identifier of a created tab page that matches the current page identifier, it is determined that the target page identifier is stored in the specified cache area; If the designated cache area stores a target page identifier corresponding to the target resource locator, the tab page displayed in the current interface is switched to the created tab page indicated by the target page identifier; the designated cache area stores the page identifiers of each created tab page, and different created tab pages have different page identifiers.

2. The method according to claim 1, characterized in that The designated buffer area stores resource locators of each created tab page, and the resource locators of each created tab page are stored correspondingly to the page identifiers of each created tab page; If the target page identifier corresponding to the target resource locator is stored in the designated cache area, before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the method further includes: Matching the target resource locator with the resource locators of each created tab page in the designated cache area; If there is a resource locator of a created tab page that matches the target resource locator, it is determined that the target page identifier is stored in the designated buffer area.

3. The method according to claim 2, characterized in that The designated cache area also stores a second extended value corresponding to the resource locator of each created tab page, wherein the second extended value is used to indicate the webpage provider corresponding to the created tab page; Before switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier, the method further includes: Detecting whether a target extended value is consistent with a first extended value; the target extended value is a second extended value corresponding to a resource locator of a created tab page that matches the target resource locator; the first extended value is used to characterize a webpage provider corresponding to the target tab page; When the target expansion value is consistent with the first expansion value, the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier is performed.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the target page identifier is not stored in the designated cache area, the target tab page is created; the target tab page is used to carry the web page pointed to by the target resource locator; The tab page displayed in the current interface is switched to the target tab page, and a current page identifier is added in the designated buffer area; the current page identifier is generated based on the target resource locator.

5. The method according to claim 4, characterized in that The switching the tab page displayed in the current interface to the target tab page includes: The target resource locator and the current page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the current page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter.

6. The method according to any one of claims 1 to 3, characterized in that: The target resource locator corresponds to a hyperlink triggered in the current tab page, and the hyperlink in the current tab page is bound to an event processing function; If the hyperlink in the current tab page is triggered, the method further includes: Using the trigger event corresponding to the hyperlink as the input of the event processing function, so as to output an interception instruction to the browser based on the event processing function; The interception instruction is used to instruct the browser to terminate the operation of directly creating a tab page corresponding to the hyperlink.

7. The method according to any one of claims 1 to 3, characterized in that: The page identifier is the name value of the tab page name attribute.

8. A tab page processing device, characterized in that: The device comprises: An acquisition module is configured to, in response to a jump instruction for a target tab page in the browser, acquire a uniform resource locator corresponding to the target tab page to obtain a target resource locator; The first switching module is configured to switch the tab page displayed in the current interface to the created tab page indicated by the target page identifier if the target page identifier corresponding to the target resource locator is stored in the designated cache area; the designated cache area stores page identifiers of each created tab page, and different created tab pages have different page identifiers; The device also includes: The first matching module is specifically configured to: compress the target resource locator based on an information digest algorithm to obtain a compressed value; add a first extended value to the compressed value to serve as a current page identifier; the first extended value is used to characterize a web page provider corresponding to the target tab page; and match the current page identifier with page identifiers of each created tab page in the designated cache area; The first determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a page identifier of a created tab page that matches the current page identifier.

9. The device according to claim 8, characterized in that The designated buffer area stores resource locators of each created tab page, and the resource locators of each created tab page are stored correspondingly to the page identifiers of each created tab page; the device further includes: A second matching module is configured to match the target resource locator with the resource locators of each created tab page in the designated cache area; The second determination module is configured to determine that the target page identifier is stored in the designated buffer area if there is a resource locator of a created tab page that matches the target resource locator.

10. The device according to claim 9, characterized in that The designated cache area also stores a second extended value corresponding to the resource locator of each created tab page, wherein the second extended value is used to indicate the webpage provider corresponding to the created tab page; The device also includes: a detection module configured to detect whether a target extended value is consistent with a first extended value; the target extended value is a second extended value corresponding to a resource locator of a created tab page that matches the target resource locator; the first extended value is used to characterize a webpage provider corresponding to the target tab page; The execution module is configured to execute the step of switching the tab page displayed in the current interface to the created tab page indicated by the target page identifier when the target expansion value is consistent with the first expansion value.

11. The device according to any one of claims 8 to 10, characterized in that: The device also includes: A creation module is configured to create the target tab page if the target page identifier is not stored in the designated buffer area; the target tab page is used to carry the web page pointed to by the target resource locator; The second switching module is configured to switch the tab page displayed in the current interface to the target tab page, and to add a current page identifier in the designated buffer area; the current page identifier is generated based on the target resource locator.

12. The device according to claim 11, characterized in that The second switching module is specifically configured as follows: The target resource locator and the current page identifier are used as input parameters of a specified command, the specified command is called to display the tab page indicated by the resource locator in the input parameter, and the current page identifier is specified as the page identifier of the tab page indicated by the resource locator in the input parameter.

13. The device according to any one of claims 8 to 10, characterized in that: The target resource locator corresponds to a hyperlink triggered in the current tab page, and the hyperlink in the current tab page is bound to an event processing function; the device further includes: The output module is configured to use the triggering event corresponding to the hyperlink as the input of the event processing function if the hyperlink in the current tab is triggered, so as to output an interception instruction to the browser based on the event processing function; the interception instruction is used to instruct the browser to terminate the operation of directly creating the tab corresponding to the hyperlink.

14. The device according to any one of claims 8 to 10, characterized in that The page identifier is the name value of the tab page name attribute.

15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.

16. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 7.

17. A computer program product, characterized in that The computer program product comprises readable program instructions, and when the readable program instructions are executed by a processor of an electronic device, the electronic device executes the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Page switching method and device

    CN109697263A