Information rebroadcasting method and device, equipment, storage medium and program product

By introducing the main tab page mechanism in the browser multi-page scenario, determining the current main tab page and sharing data, the problem of long background broadcast links in the multi-page scenario is solved, and efficient utilization of resources and reducing duplicate requests are achieved.

CN120508720APending Publication Date: 2025-08-19CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510515669.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the multi-tag scenario of the browser, the background broadcast link is long and the service data is coupled, and there is a problem of high consumption of server broadcast forwarding resources.

Method used

When the browser is in a multi-tab scenario, the tab identification of multiple business system tab pages is determined, and the service shared data is polled from the back-end server of the business system through the current main tab page, and the data is stored in the shared data pool. When a status change is detected, the data is broadcast to multiple sub-tab pages for information update, and the main tab page mechanism is used to reduce duplicate requests.

Benefits of technology

This reduces the multiple-level growth of requests in multi-tab scenarios, reducing the resource consumption and pressure of back-end servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508720A_ABST
    Figure CN120508720A_ABST
Patent Text Reader

Abstract

The invention discloses an information rebroadcasting method and device, equipment, a storage medium and a program product, and relates to the technical field of data sharing, and the method comprises the steps: determining tab identifiers of a plurality of service system tab pages when a browser is in a multi-tab scene; according to the tab identifier and the shared data pool, determining a current main tab page and a plurality of auxiliary tab pages from the tab identifier and the shared data pool; obtaining service sharing data from a back-end server of the service system through the current main label page, and storing the service sharing data to a sharing data pool; and when the state of the shared data pool is changed, rebroadcasting the service shared data to a plurality of auxiliary label pages for information updating. When the browser is in the multi-tab scene, the current main tab page is selected from the plurality of service system tab pages, and the communication between the current main tab page and the back-end server of the service system is kept. The situation that the request quantity is increased in a tab multiple level under a multi-tab scene is avoided, so that repeated requests are reduced, and the pressure of a back-end server for realizing information rebroadcasting is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data sharing technology, and in particular to an information relay method, apparatus, device, storage medium, and program product. Background Art

[0002] Currently, businesses of all types are transitioning to digital offices. Web systems often require high-real-time data, such as the number of unread messages, real-time electronic display data analysis, and user session status. These data require frequent updates to the browser's display. To ensure real-time data, business systems often employ high-frequency polling. This involves using a target data source server to broadcast data to the backend servers of each business system. The backend then broadcasts this information to its frontend, updating the browser's display.

[0003] However, the above method has a long link and many link nodes at each end. Especially in a multi-tab scenario, the request volume will increase at a multiple of the tab level, resulting in a large number of repeated requests, which consumes a lot of backend server resources. Summary of the Invention

[0004] The main purpose of this application is to provide an information relay method, device, equipment, storage medium and program product, aiming to solve the technical problems of long background broadcast links, business data coupling, and large consumption of server-side broadcast forwarding resources in the multi-tab scenario of the browser.

[0005] To achieve the above objectives, the present application proposes an information relay method, which includes:

[0006] When the browser is in a multi-tab scenario, determining the tab identifiers of multiple business system tabs in the browser;

[0007] Determining a current main tab page and a plurality of sub-tab pages from the plurality of business system tab pages according to the tab identifier and a preset shared data pool;

[0008] Obtaining business shared data from a backend server of a business system by polling through the current main tab, and storing the business shared data in the shared data pool;

[0009] When a state change of the shared data pool is detected, the business shared data is forwarded to the multiple sub-tabs for information update.

[0010] In one embodiment, the step of determining the current main tab page and the multiple sub-tab pages from the multiple business system tab pages based on the tab identifier and the preset shared data pool includes:

[0011] Based on the tab identification, each business system tab detects whether corresponding identification information exists in the preset shared data pool at a preset interval;

[0012] If the corresponding identification information does not exist in the shared data pool, the corresponding tab identification is written into the shared data pool through the business system tab page;

[0013] After the tab identifier is written successfully, the business system tab page corresponding to the successful writing is used as the current main tab page, and the remaining multiple business system tab pages are used as multiple sub-tab pages.

[0014] In one embodiment, after the step of each business system tab page detecting whether corresponding identification information exists in a preset shared data pool based on the tab identification at a preset interval, the method further includes:

[0015] If the corresponding identification information exists in the shared data pool, determining that the business system tab page corresponding to the identification information is the target main tab page;

[0016] Determining whether the target main tab successfully updates the business shared data within a preset cycle;

[0017] If the business shared data is not updated successfully, determining that the target main tab page is an expired main tab page;

[0018] The identification information corresponding to the expired main tab is deleted from the shared data pool, and the step of writing the corresponding tab identification into the shared data pool through the business system tab is performed.

[0019] In one embodiment, the step of polling the backend server of the business system through the current main tab page to obtain business shared data and storing the business shared data in the shared data pool includes:

[0020] Sending an information update request to the business system through polling of the current main tab page, so that the back-end server of the business system feeds back business shared data based on the information update request;

[0021] After receiving the business shared data, the business shared data is stored in the shared data pool through the current main tab page.

[0022] In one embodiment, the step of determining the current main tab page and the multiple sub-tab pages from the multiple business system tab pages based on the tab identifier and the preset shared data pool further includes:

[0023] Determine whether there is a cross-domain system tab page among the multiple business system tab pages;

[0024] If the cross-domain system tab page exists, obtaining a data sharing intermediate page pre-set in the plurality of business system tab pages, wherein the data sharing intermediate page is obtained by nesting in the business system tab page based on an inline frame;

[0025] Extracting the page tag identifier of the data sharing intermediate page;

[0026] According to the tab identifier of the data sharing intermediate page and a preset shared data pool, a current main tab page and a plurality of sub-tab pages are determined from the data sharing intermediate page.

[0027] In one embodiment, when a state change of the shared data pool is detected, the step of forwarding the business shared data to the multiple sub-tabs for information update includes:

[0028] Detecting the data status of the shared data pool by polling the shared intermediate page;

[0029] Comparing the data state with the shared data value stored in the shared intermediate page;

[0030] When the data state changes, obtaining business shared data from the shared data pool through the shared intermediate page;

[0031] The business shared data is broadcast to the corresponding business system tab page through a preset cross-source communication method, so that the business system tab page updates information according to the business shared data.

[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes an information relay device, which includes:

[0033] A tab identification module is used to determine the tab identifications of multiple business system tabs in the browser when the browser is in a multi-tab scenario;

[0034] A homepage selection module is used to determine a current main tab page and multiple sub-tab pages from the multiple business system tab pages according to the tab identifier and a preset shared data pool;

[0035] A data pool module, configured to obtain business shared data from a backend server of a business system through the current main tab page, and store the business shared data in the shared data pool;

[0036] The data relay module is configured to relay the business shared data to the plurality of sub-tab pages for information update when a state change of the shared data pool is detected.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes an information relaying device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the information relaying method described above.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the information relaying method described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the information relaying method described above.

[0040] One or more technical solutions proposed in this application have at least the following technical effects: The information relay method of this application includes: when the browser is in a multi-tab scenario, determining the tab identifiers of multiple business system tabs in the browser; determining the current main tab and multiple sub-tabs from the multiple business system tabs based on the tab identifiers and a preset shared data pool; obtaining business shared data from the back-end server of the business system through the current main tab, and storing the business shared data in the shared data pool; when a status change of the shared data pool is detected, relaying the business shared data to the multiple sub-tabs for information update.

[0041] Because this application selects the current primary tab from multiple business system tabs when the browser is in a multi-tab scenario, maintaining communication between the current primary tab and the business system's backend server, while the remaining secondary tabs complete information updates from a shared data pool. This avoids the situation in which the number of requests in a multi-tab scenario will increase at a multiple of the number of tabs, thereby reducing duplicate requests and alleviating the resources and pressure on the backend server to implement information transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1A flowchart of the first embodiment of the information relay method of this application is provided;

[0045] Figure 2 A schematic diagram of a scenario for selecting a null value for the main tab page provided in Example 1 of the present application;

[0046] Figure 3 A schematic diagram of the process of preempting the expired main tab provided in Example 1 of this application;

[0047] Figure 4 This is a schematic diagram of the election for the main tab page expiration scenario provided in Example 1 of this application;

[0048] Figure 5 A schematic diagram of a scenario for sharing data in the same domain provided in Example 1 of this application;

[0049] Figure 6 A flowchart of Example 2 of the information relay method of this application is provided;

[0050] Figure 7 A schematic diagram of a cross-domain data sharing scenario provided in Example 2 of this application;

[0051] Figure 8 This is a schematic diagram of the module structure of the information relay device according to an embodiment of the present application;

[0052] Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the information relay method in the embodiment of the present application.

[0053] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0055] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0056] It should be noted that the execution subject of this embodiment can be a computing service device with data sharing and web page update functions, such as a personal computer, a front-end server, etc., or an electronic device capable of implementing the above functions, an information relay device that executes the information relay method of this application, etc., and this embodiment is not limited to this. The following uses an information relay device as an example to illustrate this embodiment and the following embodiments.

[0057] Based on this, the first embodiment of the present application is proposed. The embodiment of the present application provides an information relay method, referring to Figure 1 , Figure 1A flowchart of the first embodiment of the information relay method of this application is provided.

[0058] In this embodiment, the information relay method includes steps S10 to S40:

[0059] Step S10: When the browser is in a multi-tab scenario, determine the tab identifiers of multiple business system tabs in the browser.

[0060] It should be noted that a multi-tab scenario can be a scenario in which a user opens multiple web pages simultaneously in a browser, each corresponding to a separate tab (i.e., a business system tab). In a multi-tab scenario, users can quickly switch between different tasks. For example, a user can check news information in one tab, search for shopping in another, and open a social network page in a third tab. This can improve work efficiency and eliminate the need for users to frequently open and close individual browser windows.

[0061] It is understandable that the tab identifier (abbreviated as uuid) can be an identifier used to distinguish different business system tabs. Each business system tab of the browser can generate a unique identifier to confirm the identity of the tab.

[0062] Exemplarily, each business system tab has a unique tab identifier, which can be the title of the business system tab, the URL corresponding to the business system tab (because each business system URL is unique), the index position of the business system tab in the browser, etc. This embodiment does not limit this.

[0063] Step S20: determining a current main tab page and a plurality of sub-tab pages from the plurality of business system tab pages according to the tab identifier and a preset shared data pool.

[0064] It should be noted that the shared data pool can be used to centrally store and manage the data required by each business system tab. Since the shared data pool aggregates the data required by each business system tab, each business system tab can directly update data from the shared data pool.

[0065] It is understood that the current main tab page can be the page currently responsible for updating and maintaining the business data shared by the broadcast business system among the numerous business system tab pages. The secondary tab page can be a page other than the current main tab page among the numerous business system tab pages.

[0066] Therefore, in order to solve the technical problem that in the multi-tab scenario, the request volume will increase at a multiple level of the tab, there will be a large number of duplicate requests, and more back-end server resources will be consumed, this embodiment introduces a main tab mechanism. That is, to ensure that in the multi-tab scenario of the browser, there is only one tab as the business data manager (i.e., the main tab), and the main tab is responsible for updating and maintaining the shared data required by the broadcast business system. The above-mentioned shared data will be stored in a shared data pool where each business system tab can obtain the data. The remaining business system tabs serve as sub-tabs and are only responsible for receiving shared data.

[0067] In a specific implementation, when a browser is in a multi-tab scenario, the information relay device first determines the tab identifiers of the multiple business system tabs in the browser. It then introduces a master tab mechanism. Based on the tab identifiers and a preset shared data pool, it determines the current master tab from the multiple business system tabs as the primary tab for business data management. The remaining business system tabs are only responsible for receiving shared data as secondary tabs.

[0068] In a feasible implementation, step S20 of this embodiment may include the following steps: based on the tab identifier, each business system tab detects whether corresponding identification information exists in a preset shared data pool at a preset interval; if the corresponding identification information does not exist in the shared data pool, the corresponding tab identifier is written into the shared data pool through the business system tab; after the tab identifier is successfully written, the business system tab corresponding to the successful writing is used as the current main tab, and the remaining multiple business system tabs are used as multiple sub-tabs.

[0069] It should be noted that the preset interval time can be a pre-set time in the information relay device, which is used for the polling time of each business system tab to elect the main tab page, such as every 30 seconds, every minute, etc. This embodiment does not limit this.

[0070] It is understandable that the identification information can be data related to the tab identification of the current main tab page stored in the shared data pool. That is, when the identification information exists in the shared data pool, it means that the business system tab page corresponding to the identification information has been successfully preempted as the current main tab page.

[0071] The main tab can reduce duplicate requests. For example, if a user opens five business system tabs, it saves 4*memory usage in front-end resources and 4*n times / minute in back-end requests.

[0072] In this implementation, to understand the process of selecting the main tab page when the shared data pool is empty, refer to Figure 2 , Figure 2Schematic diagram of the scenario of the null value election of the main tab provided in Example 1 of the present application. Each business system tab (such as business system tab 1, business system tab 2, business system tab 3, etc.) will query the tab identifier in the shared data pool at a certain time interval. When a business system tab (such as business system tab 3) first queries the shared data pool and finds that the identification information is empty, it will successfully write its own tab identifier into the shared data pool. At this time, the election of the main tab by this business system tab is successful. Other business system tabs (such as business system tab 1 and business system tab 2) follow the preemption principle. When the existing identification information does not match their own tab identifier when queried in subsequent intervals, that is, when the preemption is not successful, they will consider that they have failed the election and become a sub-tab, which only consumes data. At this time, a simple election process is completed. Through the election mechanism of the main tab, in the multi-business system tab scenario, only one business system tab is kept communicating with the back-end server, which can reduce repeated requests and greatly save front-end and back-end resources.

[0073] In a feasible implementation, after the step of each business system tab detecting whether there is corresponding identification information in a preset shared data pool at a preset interval based on the tab identification described in this embodiment, it also includes: if the corresponding identification information exists in the shared data pool, determining that the business system tab corresponding to the identification information is the target main tab; judging whether the target main tab successfully updates the business shared data within a preset cycle period; if the business shared data is not successfully updated, determining that the target main tab is an expired main tab; deleting the identification information corresponding to the expired main tab from the shared data pool, and executing the step of writing the corresponding tab identification into the shared data pool through the business system tab.

[0074] It should be noted that the target main tab page can be the page that has been successfully selected as the current main tab page. Considering the situation of closing, exiting or blocking the tab page, in order to ensure the function of the main tab page, it is necessary to determine whether the target main tab page is working properly.

[0075] It is understandable that the preset cycle period may be a pre-set time period for determining whether the target main tab is operating normally, such as 30 seconds, 60 seconds, etc., and this embodiment does not impose any limitation on this.

[0076] It should be understood that if the tab page is closed, exited or blocked, the target main tab page will be difficult to implement the function of updating data for the shared data pool. At this time, the target tab page expires and becomes an expired main tab page.

[0077] For example, to understand the process of determining whether the target main tab is expired, refer to Figure 3 and Figure 4 , Figure 3 This is a flow chart of the main tab page expiration preemption process provided in Example 1 of this application. Figure 4 Schematic diagram of the election of the main tab page expiration scenario provided in Example 1 of the present application. At the beginning, each business system tab page first determines whether there is a main tab page. If so, it determines whether the previous main tab page has updated the shared data of the shared data pool within the validity period (for example, 60s). If the shared data has not been updated, the previous main tab page is determined to be an expired main tab page and there is a disconnection. At this time, business system tab page 1 finds that the previous main tab page has timed out and has not been maintained, and it successfully preempts and becomes the new main tab page, polling and updating the shared data; other business system tab pages (for example, business system tab page 2) fail to preempt and continue to serve as sub-tab pages. If the previous main tab page has updated the shared data of the shared data pool within the validity period, it means that the status of the previous main tab page is normal, and the main tab page is in the storage state of consuming the shared data pool. After the judgment process of whether the target main tab page is expired is completed, the process ends.

[0078] This implementation incorporates an expiration preemption process into the primary tab election mechanism to account for situations where the primary tab is closed, exited, or blocked. If the primary tab fails to update its shared business data for more than one cycle, another secondary tab can elect a new primary tab. This new primary tab election also adheres to the same priority preemption principle. This prevents situations where the primary tab is disconnected and unable to maintain shared business data in a timely manner.

[0079] Step S30: obtaining business shared data from the backend server of the business system through polling via the current main tab page, and storing the business shared data in the shared data pool.

[0080] It should be noted that the business shared data can be the business data that the main tab is responsible for updating and maintaining and that is shared by the broadcast business system.

[0081] In a feasible implementation, step S30 of this embodiment may include the steps of: sending an information update request to the business system through polling the current main tab, so that the back-end server of the business system feeds back business shared data based on the information update request; after receiving the business shared data, storing the business shared data to the shared data pool through the current main tab.

[0082] Exemplary, reference Figure 5 , Figure 5 This is a schematic diagram of the same-domain data sharing scenario provided by Example 1 of this application. When business system tab 1 is elected successfully, it becomes the current main tab and polls the backend server storing the shared data to obtain the latest shared data and update the data sharing pool.

[0083] In this embodiment, the information relay device sends an information update request to the business system via polling on the current main tab, so that the backend server of the business system returns business shared data based on the information update request. After receiving the business shared data, the business shared data is stored in the shared data pool via the current main tab. This allows shared information data to be relayed through the front end, saving backend server resources.

[0084] Step S40: When a status change of the shared data pool is detected, the business shared data is forwarded to the plurality of sub-tabs for information update.

[0085] In the specific implementation, Figure 5 As shown, to enable data sharing between business system tabs, the browser's API local storage (i.e., API storage mechanism) can be used as a technical foundation, serving as a shared data pool within the same domain to store shared data. The current main tab polls to obtain and update shared data from the backend server. Since each business system tab is under the same domain, they can all access this shared data pool. Since each business system tab (e.g., Business System Tab 2 and Business System Tab 3) fails in the election, it acts as a secondary tab to poll and check the stored shared data. If the status changes, it retrieves the shared data and updates the information.

[0086] In the technical solution provided by this embodiment, when the browser is in a multi-tab scenario, the information relay device first determines the tab identifiers of the multiple business system tabs in the browser. Then the main tab mechanism is introduced, and according to the tab identifier and the preset shared data pool, the current main tab for business data management is determined from the multiple business system tabs, and the remaining business system tabs are only responsible for receiving shared data as sub-tabs. The current main tab polls to obtain and update shared data from the back-end server. Since each business system tab is under the same domain name, it can access this shared data pool. At this time, each business system tab fails in the election, and as a sub-tab, it polls to check the stored shared data. If the status changes, the shared data is obtained to update the information. Because this embodiment selects the current main tab from multiple business system tabs when the browser is in a multi-tab scenario, the current main tab is kept in communication with the back-end server of the business system, and the remaining sub-tabs complete the information update from the shared data pool. This avoids the situation where the number of requests increases at a multiple of the number of tabs in a multi-tab scenario, thereby reducing duplicate requests and alleviating the resources and pressure on the back-end server to relay information.

[0087] Based on the above embodiment 1 of this application, the second embodiment of this application is proposed. In the second embodiment of this application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be repeated hereafter. Figure 6 , Figure 6 A flow chart of the second embodiment of the information relay method of this application is provided.

[0088] Considering data sharing between cross-domain systems, step S20 in this example further includes steps S201 to S204:

[0089] Step S201: Determine whether there is a cross-domain system tab page among the multiple business system tab pages.

[0090] It should be noted that in a business system tab, if the associated content or functions come from different domains, the relationship between the business system tabs is cross-domain, which is called a cross-domain system tab.

[0091] Step S202: If the cross-domain system tab page exists, a data sharing intermediate page pre-set in the plurality of business system tab pages is obtained, wherein the data sharing intermediate page is nested in the business system tab page based on an inline frame.

[0092] It should be noted that an inline frame (iframe) can be an HTML element that can embed another HTML document in an HTML document, that is, embed a data sharing intermediate page in a business system tab page.

[0093] Because localtorage information is not interoperable between cross-domain systems and cannot be directly accessed, for cross-domain system tabs, the cross-domain communication API of inline frames and the browser's Postmessage (a mechanism for cross-domain message transmission between different windows or different browsing contexts) can be used as the technical foundation to embed a data sharing intermediate page in the business system tab, and use the localtorage under the domain name of the data sharing intermediate page as a shared data pool to store shared data. This data sharing intermediate page is used to provide a special area for unified data interaction and display, and is responsible for proxying the election and broadcasting of tabs to achieve cross-domain message transmission.

[0094] Step S203: extracting the page tab identifier of the data sharing intermediate page.

[0095] Step S204: determining a current main tab page and a plurality of sub-tab pages from the data sharing intermediate page according to the tab identifier of the data sharing intermediate page and a preset shared data pool.

[0096] In this embodiment, considering that localtorage information is not interoperable between cross-domain systems and cannot be directly accessed, when electing for the main tab page, you can first determine whether there is a cross-domain system tab page among multiple business system tab pages; if there is a cross-domain system tab page, extract the tab identifier of the data sharing intermediate page pre-set in the business system tab page; based on the tab identifier of the data sharing intermediate page and the shared data pool under the domain name of the data sharing intermediate page, determine the current main tab page and multiple sub-tab pages from the data sharing intermediate page. In this way, the successfully elected data sharing intermediate page can poll and obtain and update the shared data to the shared data pool to realize the transmission of cross-domain messages.

[0097] Furthermore, based on the above-mentioned data sharing between cross-domain systems, step S40 of this embodiment may include the steps of: detecting the data status of the shared data pool through polling the shared intermediate page; comparing the data status with the shared data value saved in the shared intermediate page; when the data status changes, obtaining business shared data from the shared data pool through the shared intermediate page; broadcasting the business shared data to the corresponding business system tab page through a preset cross-source communication method, so that the business system tab page updates information according to the business shared data.

[0098] It should be noted that the preset cross-source communication method may be a communication method for transmitting messages between cross-domain systems, such as the above-mentioned Postmessage cross-domain communication API method.

[0099] For ease of understanding, refer to Figure 7 , Figure 7 A schematic diagram of the cross-domain data sharing scenario provided for Example 2 of the present application. When the data sharing intermediate page of business system tab 1 is successfully elected, it can be used as the current main tab to poll the back-end server of the data source where the shared data is stored to obtain the latest shared data, and update the data sharing pool of the intermediate page to store the shared data. At this time, the data sharing intermediate pages of other business system tabs (such as business system tab 2 and business system tab 3) have failed in the election, so they act as sub-tabs to poll and check the shared data stored in the data sharing pool. If the data sharing pool status changes, the shared data is obtained from the data sharing pool, and the Postmessage cross-domain communication API is used to broadcast the shared data to the corresponding business system tab for information update, so as to realize the broadcast of shared data between cross-domain systems.

[0100] In this implementation, a master tab election mechanism is employed in cross-site, multi-tab browser scenarios to ensure that only one tab within a browser communicates with the backend service to obtain shared data. Data sharing and broadcasting are accomplished using local storage and iframe technologies, enabling information relay and reducing server-side request pressure.

[0101] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the information relaying method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0102] This application also provides an information relay device, please refer to Figure 8 , Figure 8 This is a schematic diagram of the module structure of the information relay device according to an embodiment of the present application; the information relay device includes:

[0103] The tab identification module 801 is used to determine the tab identifications of multiple business system tabs in the browser when the browser is in a multi-tab scenario;

[0104] A homepage selection module 802 is configured to determine a current main tab page and multiple sub-tab pages from the multiple business system tab pages according to the tab identifier and a preset shared data pool;

[0105] The data pool module 803 is configured to obtain business shared data from the backend server of the business system through the current main tab page, and store the business shared data in the shared data pool;

[0106] The data relay module 804 is configured to relay the business shared data to the multiple sub-tabs for information update when a status change of the shared data pool is detected.

[0107] As an embodiment, the homepage election module 802 is also used to detect whether corresponding identification information exists in a preset shared data pool based on the tab identification, and each business system tab page detects at a preset interval time; if the corresponding identification information does not exist in the shared data pool, the corresponding tab identification is written into the shared data pool through the business system tab page; after the tab identification is successfully written, the business system tab page corresponding to the successful writing is used as the current main tab page, and the remaining multiple business system tab pages are used as multiple sub-tab pages.

[0108] As an implementation method, the homepage election module 802 is also used to determine that the business system tab corresponding to the identification information is the target main tab if there is corresponding identification information in the shared data pool; determine whether the target main tab successfully updates the business shared data within a preset cycle period; if the business shared data is not successfully updated, determine that the target main tab is an expired main tab; delete the identification information corresponding to the expired main tab from the shared data pool, and execute the operation of writing the corresponding tab identification into the shared data pool through the business system tab.

[0109] As an embodiment, the data pool module 803 is also used to send an information update request to the business system through polling the current main tab, so that the back-end server of the business system can feedback business shared data based on the information update request; after receiving the business shared data, the business shared data is stored in the shared data pool through the current main tab.

[0110] As an embodiment, the homepage selection module 802 is also used to determine whether there is a cross-domain system tab page among the multiple business system tab pages; if the cross-domain system tab page exists, then obtain the data sharing intermediate page pre-set in the multiple business system tab pages, and the data sharing intermediate page is nested in the business system tab page based on the inline frame; extract the tab identifier of the data sharing intermediate page; and determine the current main tab page and multiple sub-tab pages from the data sharing intermediate page according to the tab identifier of the data sharing intermediate page and the preset shared data pool.

[0111] As an embodiment, the data relay module 804 is also used to detect the data status of the shared data pool through the shared intermediate page polling; compare the data status with the shared data value saved in the shared intermediate page; when the data status changes, obtain the business shared data from the shared data pool through the shared intermediate page; broadcast the business shared data to the corresponding business system tab page through a preset cross-source communication method, so that the business system tab page updates information according to the business shared data.

[0112] Other embodiments or specific implementations of the information relay device of this application can refer to the above-mentioned method embodiments and will not be repeated here.

[0113] The information relay device provided in this application, using the information relay method of the above-mentioned embodiment, can solve the technical problems of long background broadcast links, business data coupling, and high server-side broadcast forwarding resource consumption in a multi-tab browser scenario. Compared with the prior art, the beneficial effects of the information relay device provided in this application are the same as those of the information relay method provided in the above-mentioned embodiment, and the other technical features of the information relay device are the same as those disclosed in the above-mentioned embodiment method, which are not further described here.

[0114] The present application provides an information relaying device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the information relaying method in the above-mentioned embodiment one.

[0115] Reference below Figure 9 , Figure 9 The following is a schematic diagram of the device structure of the hardware operating environment involved in the information relay method according to the embodiment of the present application, which shows a schematic diagram of the structure of the information relay device suitable for implementing the embodiment of the present application. The information relay device according to the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The information relaying device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0116] like Figure 9 As shown, the information relay device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the information relay device. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or hard disk; and a communication device 1009. The communication device 1009 can allow the information relay device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows an information relay device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0117] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0118] The information relay device provided in this application utilizes the information relay method of the aforementioned embodiment to address the technical issues of long background broadcast links, coupled business data, and high server-side broadcast forwarding resource consumption in a multi-tab browser scenario. Compared to the prior art, the beneficial effects of the information relay device provided in this application are the same as those of the information relay method provided in the aforementioned embodiment, and the other technical features of the information relay device are the same as those disclosed in the aforementioned embodiment, which are not further elaborated here.

[0119] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0120] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0121] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the information relaying method in the above-mentioned embodiment.

[0122] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0123] The computer-readable storage medium may be included in the information relaying device; or it may exist independently without being assembled into the information relaying device.

[0124] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the information relaying device, the information relaying device enables: when the browser is in a multi-tab scenario, to determine the tab identifiers of multiple business system tabs in the browser; based on the tab identifiers and the preset shared data pool, to determine the current main tab and multiple sub-tabs from the multiple business system tabs; to obtain business shared data from the back-end server of the business system through the current main tab, and to store the business shared data in the shared data pool; and when a status change of the shared data pool is detected, to relay the business shared data to the multiple sub-tabs for information update.

[0125] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0127] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0128] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described information relay method. This computer-readable storage medium can address the technical issues of long background broadcast links, coupled business data, and high server-side broadcast forwarding resource consumption in a multi-tab browser scenario. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the information relay method provided in the above-described embodiments, and are not further elaborated here.

[0129] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned information relaying method when executed by a processor.

[0130] The computer program product provided in this application can address the technical issues of long background broadcast links, coupled business data, and high server-side broadcast forwarding resource consumption in multi-tab browser scenarios. Compared to the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the information relay method provided in the aforementioned embodiments, and are not further elaborated here.

[0131] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An information relay method, characterized in that: The method comprises: When the browser is in a multi-tab scenario, determining the tab identifiers of multiple business system tabs in the browser; Determining a current main tab page and a plurality of sub-tab pages from the plurality of business system tab pages according to the tab identifier and a preset shared data pool; Obtaining business shared data from a backend server of a business system by polling through the current main tab, and storing the business shared data in the shared data pool; When a state change of the shared data pool is detected, the business shared data is forwarded to the multiple sub-tabs for information update.

2. The method according to claim 1, wherein The step of determining the current main tab page and the multiple sub-tab pages from the multiple business system tab pages according to the tab identifier and the preset shared data pool includes: Based on the tab identification, each business system tab detects whether corresponding identification information exists in the preset shared data pool at a preset interval; If the corresponding identification information does not exist in the shared data pool, the corresponding tab identification is written into the shared data pool through the business system tab page; After the tab identifier is written successfully, the business system tab page corresponding to the successful writing is used as the current main tab page, and the remaining multiple business system tab pages are used as multiple sub-tab pages.

3. The method according to claim 2, wherein After the step of detecting whether corresponding identification information exists in a preset shared data pool based on the tab identification on each business system tab at a preset interval, the method further includes: If the corresponding identification information exists in the shared data pool, determining that the business system tab page corresponding to the identification information is the target main tab page; Determining whether the target main tab successfully updates the business shared data within a preset cycle; If the business shared data is not updated successfully, determining that the target main tab page is an expired main tab page; The identification information corresponding to the expired main tab is deleted from the shared data pool, and the step of writing the corresponding tab identification into the shared data pool through the business system tab is performed.

4. The method according to any one of claims 1 to 3, characterized in that The step of polling and acquiring business shared data from a backend server of a business system through the current main tab page, and storing the business shared data in the shared data pool, comprises: Sending an information update request to the business system through polling of the current main tab page, so that the back-end server of the business system feeds back business shared data based on the information update request; After receiving the business shared data, the business shared data is stored in the shared data pool through the current main tab page.

5. The method according to claim 1, wherein The step of determining the current main tab page and the multiple sub-tab pages from the multiple business system tab pages according to the tab identifier and the preset shared data pool further includes: Determine whether there is a cross-domain system tab page among the multiple business system tab pages; If the cross-domain system tab page exists, obtaining a data sharing intermediate page pre-set in the plurality of business system tab pages, wherein the data sharing intermediate page is obtained by nesting in the business system tab page based on an inline frame; Extracting the page tag identifier of the data sharing intermediate page; According to the tab identifier of the data sharing intermediate page and a preset shared data pool, a current main tab page and a plurality of sub-tab pages are determined from the data sharing intermediate page.

6. The method according to claim 5, wherein The step of forwarding the business shared data to the multiple sub-tabs for information update when a state change of the shared data pool is detected includes: Detecting the data status of the shared data pool by polling the shared intermediate page; Comparing the data state with the shared data value stored in the shared intermediate page; When the data state changes, obtaining business shared data from the shared data pool through the shared intermediate page; The business shared data is broadcast to the corresponding business system tab page through a preset cross-source communication method, so that the business system tab page updates information according to the business shared data.

7. An information relay device, characterized in that: The device comprises: A tab identification module is used to determine the tab identifications of multiple business system tabs in the browser when the browser is in a multi-tab scenario; A homepage selection module is used to determine a current main tab page and multiple sub-tab pages from the multiple business system tab pages according to the tab identifier and a preset shared data pool; A data pool module, configured to obtain business shared data from a backend server of a business system through the current main tab page, and store the business shared data in the shared data pool; The data relay module is configured to relay the business shared data to the plurality of sub-tab pages for information update when a state change of the shared data pool is detected.

8. An information relay device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the information relaying method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the information relaying method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the information relaying method according to any one of claims 1 to 6 are implemented.