System, method, device and medium for multi-tab communication in browser

By introducing a system with a unified messaging interface and an underlying communication interface in the browser, the complexity of multi-page communication in B/S multi-page applications is solved, and the effect of simplifying development and improving efficiency is achieved.

CN114116263BActive Publication Date: 2025-02-11工银科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111460819.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-02-11
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In B/S multi-page applications, the existing technology lacks a unified, standard and simple application programming interface (API) for message communication between multiple tabs, resulting in developers needing to master multiple communication implementation methods and Writing corresponding interfaces increases development costs and reduces work efficiency.

Method used

Provide a system for multi-page communication in a browser, including a multi-page unified messaging interface and M underlying communication interfaces, and a unified standardized transmission between a multi-page unified messaging interface and a page and an underlying communication interface through a unified standardized transmission between a multi-page unified messaging interface and a page and an underlying communication interface. Message, simplify the development process.

Benefits of technology

It provides developers with a unified, standard and simple way of use, which reduces learning and development costs, improves development efficiency, and realizes flexible and efficient message communication between multiple tabs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116263B_ABST
    Figure CN114116263B_ABST
Patent Text Reader

Abstract

The present disclosure provides a system for multi-tab communication in a browser, which can be applied in the financial field. The method includes M underlying communication interfaces and a multi-tab unified message transmission interface, wherein the multi-tab unified message transmission interface is respectively connected to the M underlying communication interfaces. The multi-tab unified message transmission interface is used to transmit the first message to the at least two pages in the browser according to the same information transmission specification, and to transmit the first message to at least one of the underlying communication interfaces; and at least one of the underlying communication interfaces is used to drive the sending and receiving processing of the first message. Among them, the sending and receiving processing logic of different underlying communication interfaces among the M underlying communication interfaces is different. The present disclosure also provides a method, device, storage medium and program product for multi-tab communication in a browser.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information technology and can be used in the financial field. More specifically, it relates to a system, method, device, medium and program product for multi-tab communication in a browser. Background Art

[0002] There are many ways to implement message communication between tabs in a browser / client (B / S) multi-page application, such as communication interfaces based on cookies (data stored on the user's local terminal), browser storage, Web Socket, post Message, or Shared Worker. Different implementations have different applicable scenarios, implementation methods, and usages. In the actual B / S multi-page application development process, developers need to select and write corresponding interfaces according to the scenario to implement communication between tabs. This not only requires developers to master the characteristics and applicable scenarios of various communication implementation methods, but also requires developers to write corresponding interfaces, which will undoubtedly increase the development cost of the application and reduce work efficiency. Summary of the invention

[0003] In view of the above problems, the embodiments of the present disclosure provide a system, method, device and medium for multi-tab communication in a browser to improve the efficiency of B / S multi-page application development.

[0004] According to the first aspect of the embodiments of the present disclosure, a system for multi-tab communication in a browser is provided. The system includes M underlying communication interfaces and a multi-tab unified messaging interface, wherein the multi-tab unified messaging interface is respectively communicatively connected with the M underlying communication interfaces, and M is an integer greater than or equal to 2. The multi-tab unified messaging interface is used to transmit the first message to the at least two pages respectively and to at least one of the underlying communication interfaces according to the same information transmission specification when transmitting a first message between at least two pages in the browser. At least one of the underlying communication interfaces is used to drive the sending and receiving processing of the first message; wherein different underlying communication interfaces among the M underlying communication interfaces have different sending and receiving processing logics.

[0005] According to an embodiment of the present disclosure, the multi-page unified message delivery interface includes a message sending module and a message receiving module. The message sending module is used to obtain the first message from the first page that sends the first message according to the message sending specification, and based on the information of the first underlying communication interface configured for the first page, send the first message to the first underlying communication interface, wherein the first underlying communication interface is one of the M underlying communication interfaces. The message receiving module is used to receive the first message sent by the first underlying communication interface to the second page, and pass the first message to the second page according to the message receiving specification. Wherein, the information transmission specification includes the message sending specification and the message receiving specification.

[0006] According to an embodiment of the present disclosure, the message sending module is also used to configure information of the first underlying communication interface for the first page.

[0007] According to an embodiment of the present disclosure, the multi-tab unified messaging interface further includes an underlying interface information acquisition module. The underlying interface information acquisition module is used to display information of the M underlying communication interfaces to the user based on the user's viewing operation during the development stage of the first page.

[0008] According to an embodiment of the present disclosure, the system further includes M implementation specification components. The implementation specification components are respectively connected to the M underlying communication interfaces in a one-to-one correspondence, and are all connected to the multi-tab unified messaging interface. Among them, the implementation specification component connected to the underlying communication interface for transmitting the first message is used to process the first message between the underlying communication interface and the multi-tab unified messaging interface according to the underlying interface implementation specification corresponding to the underlying communication interface, so that the first message is transmitted in the multi-tab unified messaging interface in a standardized format.

[0009] According to an embodiment of the present disclosure, the implementation specification component includes a sending specification module and a receiving specification module. The sending specification module is used to receive the first message from the multi-tab unified messaging interface according to the sending implementation specification, and send it to the corresponding underlying communication interface. The receiving specification module is used to receive the first message from the corresponding underlying communication interface, and send the first message to the multi-tab unified messaging interface according to the receiving implementation specification. Wherein, the underlying interface implementation specification includes the sending implementation specification and the receiving implementation specification.

[0010] According to an embodiment of the present disclosure, the receiving specification module is also used to monitor messages received by the corresponding underlying communication interface.

[0011] According to an embodiment of the present disclosure, the M underlying communication interfaces include at least one of the following: a cookie-based communication interface, a Storage-based communication interface, a Web Socket-based communication interface, a postMessage-based communication interface, or a SharedWorker-based communication interface.

[0012] The second aspect of the embodiment of the present disclosure provides a method for multi-tab communication in a browser. The method includes: when a first message is transmitted between at least two pages in the browser, the multi-tab unified message transmission interface is used to transmit the first message to the at least two pages respectively according to the same information transmission specification; the multi-tab unified message transmission interface is used to transmit the first message to at least one of the M underlying communication interfaces, where M is an integer greater than or equal to 2; and at least one of the underlying communication interfaces is used to drive the sending and receiving processing of the first message; wherein the sending and receiving processing logic of different underlying communication interfaces among the M underlying communication interfaces is different.

[0013] According to an embodiment of the present disclosure, the use of a multi-page unified message delivery interface to transmit the first message to the at least two pages respectively according to the same information transmission specification includes using the multi-page unified message delivery interface to perform the following operations: obtaining the first message from the first page that sends the first message according to the message sending specification; based on the information of the first underlying communication interface configured for the first page, sending the first message to the first underlying communication interface, wherein the first underlying communication interface is one of the M underlying communication interfaces; receiving the first message sent by the first underlying communication interface to the second page; and transmitting the first message to the second page according to the message receiving specification. The information transmission specification includes the message sending specification and the message receiving specification.

[0014] According to an embodiment of the present disclosure, the receiving of the first message sent by the first underlying communication interface to the second page includes: monitoring the message sending status of M underlying communication interfaces; and when the first message sent by the first underlying communication interface to the second page is monitored, receiving the first message.

[0015] According to an embodiment of the present disclosure, the transmission of the first message using the multi-tab unified messaging interface and at least one of the M underlying communication interfaces includes: utilizing an implementation specification component corresponding to each of the underlying communication interfaces, between the underlying communication interface and the multi-tab unified messaging interface, processing the first message in accordance with the underlying interface implementation specification corresponding to the underlying communication interface, so that the first message is transmitted in the multi-tab unified messaging interface in accordance with the specification format.

[0016] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided. The electronic device includes one or more processors and one or more memories. The one or more memories are used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the method as described above.

[0017] A fourth aspect of the embodiments of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.

[0018] The fifth aspect of the embodiments of the present disclosure also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0019] One or more of the above-mentioned embodiments have the following advantages or beneficial effects: the unified messaging interface of multiple tabs can act between the page and the M underlying communication interfaces, and the unified messaging interface of multiple tabs can transmit messages with the page according to unified specifications, which can at least partially provide developers with a unified, standard and simple way of use in the scenario of message communication between multiple tabs, thereby improving development efficiency and reducing development costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0021] Figure 1 A schematic diagram of an application scenario of a system, method, device, medium, and program product for multi-tab communication in a browser according to an embodiment of the present disclosure is shown;

[0022] Figure 2 The schematic diagram shows the interface of multiple tabs in the browser;

[0023] Figure 3 The system architecture of the system, method, device, medium and program product for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 4 A schematic diagram of a system for multi-tab communication in a browser according to an embodiment of the present disclosure is shown;

[0025] Figure 5 A structural block diagram of a multi-tab unified message delivery interface in a system for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 6 A structural diagram of a system for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown;

[0027] Figure 7 A structural diagram of a system for multi-tab communication in a browser according to yet another embodiment of the present disclosure is schematically shown;

[0028] Figure 8 The message processing process of each implementation specification component when sending information in a system for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown;

[0029] Fig. 9 The message processing process of each implementation specification component when receiving information in a system for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown;

[0030] Fig.10 A flowchart of a method for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown;

[0031] Fig.11 A flowchart schematically shows a message sending and receiving process in a method for multi-tab communication in a browser according to an embodiment of the present disclosure; and

[0032] Fig.12 A block diagram of an electronic device suitable for implementing the method for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0033] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0035] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0036] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0037] It should be understood herein that any number of elements in the specification and drawings is for illustration rather than limitation, and any naming (eg, first, second) is only for distinction but not for limitation.

[0038] In view of the fact that there is no unified, standard, ready-made, simple application programming interface (API) in the prior art for realizing message communication between tabs in B / S multi-page applications, which leads to the problem of low development efficiency of developers, the inventors conceived that a network application programming interface (WEB API) can be designed, which is specifically used for message communication between multiple tabs in the browser, and can provide developers with simple, unified, and standard usage, so that developers can directly access the WEB API when they need to communicate messages between tabs. Specifically, this WEB API can still rely on various existing message communication implementation methods of tabs (for example, cookie API, Storage API, Web Socket API, postMessage API, SharedWorker API, etc.) to provide the underlying message communication technology implementation in different scenarios, but it can provide developers with a simple, unified, and standard usage method, allowing developers to choose a specific message communication implementation method according to the scenario requirements. In this way, developers only need to master and learn the usage method of this WEB API, and do not need to know the specific principle of how to achieve message communication inside this WEB API, thereby reducing the learning cost and development investment of developers and improving work efficiency.

[0039] Based on the above conception of the inventor, the embodiments of the present disclosure provide a system, method, device and medium for multi-tab communication in a browser. The system may include M underlying communication interfaces and a multi-tab unified message transmission interface, wherein the multi-tab unified message transmission interface is respectively communicated and connected with the M underlying communication interfaces, and M is an integer greater than or equal to 2. The multi-tab unified message transmission interface is used to transmit the first message to at least two pages respectively according to the same information transmission specification when the first message is transmitted between at least two pages in the browser, and to transmit the first message to at least one underlying communication interface. At least one underlying communication interface is used to drive the sending and receiving processing of the first message; wherein different underlying communication interfaces among the M underlying communication interfaces have different sending and receiving processing logics. The M underlying communication interfaces may be the underlying implementation methods of message communication between tabs that are existing or continuously developed with the evolution of technology.

[0040] In actual use, the system for multi-tab communication in the browser of the embodiment of the present disclosure can be integrated into an independent JavaScript library (JS library for short). When the developer develops a B / S multi-page application, the JS library is introduced into the B / S multi-page application as needed, so that the system for multi-tab communication in the browser of the embodiment of the present disclosure can be used to provide tab communication for the B / S multi-page application. When the developer introduces the JS library into the B / S multi-page application, what needs to be concerned about is the message transmission specification between the page and the multi-tab unified message transmission interface, and the selection of an underlying communication interface according to the scenario, but there is no need to write different programs for different types of underlying communication interfaces, or design different docking methods according to different page message transmission methods. In this way, when the developer is developing a B / S multi-page application, he can focus more on the functions to be implemented by the page itself, reduce the learning cost, and effectively improve the development efficiency.

[0041] Figure 1 The following schematically illustrates an application scenario diagram of a system, method, device, medium, and program product for multi-tab communication in a browser according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0042] like Figure 1 As shown, the application scenario 100 according to this embodiment may include at least one terminal device (three are shown in the figure, 101, 102 and 103), a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0043] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptops, desktop computers, etc.

[0044] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0045] Various client applications may be installed on the terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples). These client applications may include multi-page B / S applications, and the content in the client applications may be displayed in multiple tabs.

[0046] Figure 2 The schematic diagram shows a multi-tab interface in a browser, wherein a tab is a page with a tab label in a browser, and the web page of the view can be switched by clicking the tab label.

[0047] like Figure 2 As shown, the multi-tab interface 200 may include business management, financial management and system management first-level tabs, and the financial management first-level tab may also include multiple second-level tabs such as channel classification, channel management, and partition management. A multi-tab communication scenario may be, for example, when a user fills in information in the current channel management tab, the information filled in by the user needs to be synchronized and updated to the business management and / or system management tabs. Figure 2 When the application to which the multi-tab interface 200 shown is attached introduces the system for multi-tab communication in a browser according to the embodiment of the present disclosure during the development phase, the communication requirements in this situation can be realized by the system for multi-tab communication in a browser according to the embodiment of the present disclosure. The communication realization process can be referred to in Figure 3 's hint.

[0048] Figure 3 The system architecture of the system, method, device, medium and program product for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown. Figure 3 Page 1, Page 2, and Page 3 illustrate three tabs in a multi-page B / S application.

[0049] according to Figure 3 As can be seen from the system architecture diagram, the multi-page unified messaging interface 310 can act between pages (page 1, page 2 and page 3) and M underlying communication interfaces. When pages 1, 2 and 3 need to communicate messages, pages 1, 2 and 3 operate through the multi-page unified messaging interface 310 and do not directly access various underlying communication interfaces. The actual message sending and receiving capabilities of the multi-page unified messaging interface 310 are completed by the combination of each underlying communication interface and the multi-page unified messaging interface.

[0050] Among them, Figure 3In the diagram, each underlying communication interface can be a cookie-based communication interface (cookie API for short), a Storage-based communication interface (Storage API for short), a Web Socket-based communication interface (Web Socket API for short), a postMessage-based communication interface (postMessage API for short), or a SharedWorker-based communication interface (SharedWorker API for short), etc.

[0051] The cookie API is an API provided by the browser in very early versions. It has good compatibility. Based on the cookie API, each tab can access the cookies of the current web page. This feature can be used to implement message communication between tabs. However, the cookie API is limited by the same-origin policy, is not real-time, and has message size restrictions. Among them, the same-origin policy is a security policy in WEB applications. If the protocol, port, and host in the address of two web pages are the same, then the two web pages are of the same origin. If the two web pages are from different sources, such as a bank website and a website with a virus program, because of the existence of the same-origin policy, many WEB APIs cannot be used between pages of different sources, so it can play an important role in protecting the interests of users. Otherwise, the website with the virus program can easily get the content of the bank website through the WEB API.

[0052] Storage API is a web API that was launched after HTML5 was released, so it has higher requirements for browser versions and can only be used in higher-version browsers. With the help of Storage API, one tab uses Storage API to store messages in the browser, and another tab combines timers and Storage API to read messages from the browser, thus realizing message communication between tabs. Compared with cookie API, Storage API can complete message transmission without relying on timers, but it is also limited by the same-origin policy and has message size restrictions.

[0053] When using Web Socket API, the two pages that need to communicate first establish a socket connection with the server, and use the socket connection to achieve message communication between the two pages. This is not affected by the same-origin policy, but it consumes server resources, is costly and difficult to use, is not real-time enough, and is limited by network speed.

[0054] The PostMessag API is a relatively intuitive way to communicate messages between two tabs that have an open relationship. However, it is limited to communication between two tabs and between tabs that have an open relationship, so its usage scenarios are relatively narrow.

[0055] The SharedWorker API is also a relatively intuitive way to communicate messages between tabs. It is not limited to communication between two tabs, but can communicate between multiple tabs, and is also limited by the same-origin policy.

[0056] It can be seen that the five underlying communication interfaces, cookie API, Storage API, Web Socket API, postMessage API, and SharedWorker API, have different communication logics for sending and receiving messages between tabs and have different application scenarios. Among them, the original purpose of designing the cookie API, Storage API, and Web Socket API was not for message communication between multiple tabs. It was only because of the characteristics of these APIs that they have the ability to implement message communication scenarios that they were discovered to provide ideas for message communication. Although the postMessage API and SharedWorkerAPI are closely related to message communication, their usage is not uniform.

[0057] According to the embodiments of the present disclosure, the underlying communication interfaces such as cookie API, Storage API, Web Socket API, postMessage API, and SharedWorker API can be integrated with the multi-tab unified messaging interface 310 (for example, integrated into an independent JS library), so that the multi-tab unified messaging interface 310 acts between the page and these underlying communication interfaces. In this way, the developer can focus on the development of the page during development, and then when page communication is required, the JS library can be introduced into the application of the page developed by the developer in the way of introducing a third-party library in the web, and the developer can select an underlying communication interface in the multi-tab unified messaging interface 310 according to the scene or usage preference of the page developed by the developer, so as to realize the communication between the multiple tabs. In this way, the multi-tab unified messaging interface 310 is exposed to the developer. The developer only needs to connect the information of the page with the multi-tab unified messaging interface 310, without having to care about the implementation details of the underlying communication interface, thereby improving the development efficiency and reducing the development investment.

[0058] In addition, the system for multi-tab communication in a browser according to the embodiment of the present disclosure can realize communication between two pages, and can also realize communication between multiple pages. Figure 2 For example, in the multi-tab 200 of FIG. 1 , the communication between two pages can be, for example, synchronizing the message filled in by the user in the financial management page to a certain page in the business management; and the communication between multiple pages can be, for example, synchronizing the message filled in by the user in the financial management page to a certain page in the business management and system management respectively. It can be seen that the system of the embodiment of the present disclosure is more flexible in realizing multi-tab communication, and the usage scenarios can be more extensive.

[0059] Based on Figure 1~Figure 3 After outlining the application scenarios and system architecture of the system for multi-tab communication in a browser according to an embodiment of the present disclosure, the following will be described. Figure 4~Figure 9 Various possible structures and implementation methods of the system for multi-tab communication in a browser according to an embodiment of the present disclosure are exemplarily introduced.

[0060] Figure 4 The structure diagram of a system 400 for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown.

[0061] like Figure 4 As shown, the system 400 may include a multi-page unified messaging interface 410 and M underlying communication interfaces (ie, underlying communication interfaces 1-M), where M is an integer greater than or equal to 2. The multi-page unified messaging interface 410 is communicatively connected to the underlying communication interfaces 1-M respectively.

[0062] The multi-tab unified message transmission interface 410 is used to transmit the first message between at least two pages in the browser, and to transmit the first message to the at least two pages respectively according to the same information transmission specification, and to transmit the first message to at least one of the underlying communication interfaces 1~M.

[0063] The underlying communication interface 1 to M that transmits the first message is used to drive the sending and receiving processing of the first message; wherein the sending and receiving processing logics of the underlying communication interfaces 1 to M are different. The underlying communication interfaces 1 to M may include any one or more of a cookie API, a Storage API, a Web Socket API, a postMessage API, and a SharedWorker API.

[0064] The communication connection between the multi-page unified message delivery interface 410 and the underlying communication interfaces 1~M can be implemented by hard coding for each of the underlying communication interfaces 1~M in some embodiments; in other embodiments, the message transmitted by the underlying communication interfaces 1~M can be converted into the standard format of the multi-page unified message delivery interface 410 through the corresponding implementation specification component. For the specific content of the implementation specification component, please refer to the following about Figure 5 Examples of ~ and 9.

[0065] It should be noted that the first page is used in this article to refer to any page in the multi-page communication, and the second page is any page that communicates with the first page. Figure 3 In the system architecture, the first page may be any one of page 1, page 2 or page 3. The second page is at least one of page 1, page 2 and page 3 that communicates with the first page except the first page.

[0066] Figure 5 The structure block diagram of a multi-tab unified messaging interface 410 in a system for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown.

[0067] like Figure 5 As shown, according to some embodiments of the present disclosure, the multi-page unified message delivery interface 410 may include a message sending module 411 and a message receiving module 412. According to other embodiments of the present disclosure, the multi-page unified message delivery interface 410 may further include an underlying interface information acquisition module 413. According to an embodiment of the present disclosure, the information transmission specification may include a message sending specification and a message receiving specification.

[0068] The message sending module 411 can be used to obtain the first message from the first page that sends the first message according to the message sending specification, and send the first message to the first underlying communication interface based on the information of the first underlying communication interface configured for the first page, wherein the first underlying communication interface is one of the above-mentioned underlying communication interfaces 1~M.

[0069] The message receiving module 412 is used to receive a first message sent by the first bottom-layer communication interface to the second page, and transmit the first message to the second page according to the message receiving specification.

[0070] The underlying interface information acquisition module 413 is used to display the information of the underlying communication interfaces 1~M to the user based on the user's viewing operation during the development stage of the first page, so that when the first page is developed, the message sending module 411 can be used to select the information of the first underlying communication interface based on the information of the underlying communication interfaces 1~M.

[0071] Assuming that the multi-page unified message delivery interface is named "PageMessage API", from the perspective of API usage, the multi-page unified message delivery interface 410 can be designed as the following structure:

[0072] interface PageMessageAPI {

[0073] getAvailableImplementations() : string[ ],

[0074] postMessage(message: any, implementation?: string) : void,

[0075] onMessage(listener: (message: ant) ​​=> void) : void,

[0076] }

[0077] Among them, the message sending module 411 corresponds to "postMessage", the message receiving module 412 corresponds to "onMessage", and the bottom interface information acquisition module 413 corresponds to "getAvailableImplementations".

[0078] postMessage(message: any, implementation: string): void This capability (corresponding to the function of the message sending module 411) is provided to developers to send messages to other pages in a single page, as shown in Table 1 below:

[0079] Table 1

[0080] onMessage(listener: (message: any) => void) : void This capability (corresponding to the function of the message receiving module 412) is also provided to developers to receive messages sent by other pages in a single page, as shown in Table 2 below:

[0081] Table 2

[0082] getAvailableImplementations() : string[ ] This capability (corresponding to the function of the underlying interface information acquisition module 413 ) is provided to developers to allow them to view the specific implementation names of the M underlying communication interfaces supported by the current PageMessageAPI during the development phase, thereby helping them to make a selection. See Table 3 for details.

[0083] Table 3

[0084] Developers can view the names of various underlying communication interfaces by calling getAvailableImplementations. Therefore, when developers use the PageMessageAPI.postMessage capability, they can select the underlying communication interface to use. For example, when configuring the first page to use the first underlying communication interface for communication, you can set send to the name of the first underlying communication interface in the second parameter (implementation) of postMessage.

[0085] Figure 6 The structure diagram of a system 600 for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown.

[0086] like Figure 6 As shown, according to an embodiment of the present disclosure, the system 600 may include a multi-tab unified messaging interface 610, M underlying communication interfaces (ie, underlying communication interfaces 1-M), and M implementation specification components (ie, implementation specification components 621-62M).

[0087] The multi-tab unified messaging interface 610 is similar to the multi-tab unified messaging interface 410. For details, please refer to the detailed description of the multi-tab unified messaging interface 410 above, which will not be repeated here. The underlying communication interfaces 1 to M are consistent with the above description, which will not be repeated here.

[0088] The implementation specification components 621~62M are respectively connected to the underlying communication interfaces 1~M in a one-to-one correspondence, and are all connected to the multi-tab unified messaging interface 610, thereby implementing the communication connection between the multi-tab unified messaging interface 610 and the underlying communication interfaces 1~M.

[0089] According to the embodiment of the present disclosure, the multi-tab unified messaging interface 610 itself does not have actual message communication capabilities. The message communication capabilities are all provided and implemented by the underlying communication interfaces 1~M, and the processing logic and usage of the underlying communication interfaces 1~M are different. In view of this, the embodiment of the present disclosure uses the implementation specification components corresponding to each underlying communication interface, so that the underlying communication interfaces 1~M can be connected to the multi-tab unified messaging interface 610 in a unified manner.

[0090] Specifically, each implementation specification component 621~62M in system 600 is used to process messages between the underlying communication interface connected to it and the multi-page tab unified messaging interface according to the underlying interface implementation specification corresponding to the underlying communication interface, so that the messages are transmitted in the multi-page tab unified messaging interface according to the standard format.

[0091] For example, when the underlying communication interface 1 drives the sending and receiving processing of the first message, the implementation specification component 621 is used to process the first message between the underlying communication interface 1 and the multi-page tab unified messaging interface 610 according to the underlying interface implementation specification corresponding to the underlying communication interface 1, so that the first message is transmitted in the multi-page tab unified messaging interface 610 according to the standard format.

[0092] Specifically, when the first page sends the first message to the second page, in the stage of sending the first message on the first page, the first page transmits the first message to the multi-page tab unified message delivery interface 610 according to the information transmission specification, and then the implementation specification component 621 can receive the first message from the multi-page tab unified message delivery interface 610 according to the predetermined specification, and after processing it into a message format that can be used by the underlying communication interface 1, send it to the underlying communication interface 1. Next, in the stage of receiving the first message on the second page, the first implementation specification component 621 can receive the message according to the usage of the underlying communication interface 1, and then process it into a format that conforms to the transmission of the multi-page tab unified message delivery interface 610, and then transmit it to the multi-page tab unified message delivery interface 610, and then the multi-page tab unified message delivery interface 610 transmits the first message to the second page according to the information transmission specification.

[0093] According to an embodiment of the present disclosure, the implementation specification components 621 - 62M are used to convert the usage modes of the underlying communication interfaces 1 -M into a unified mode compatible with the multi-tab unified messaging interface 610 .

[0094] According to the embodiments of the present disclosure, each underlying communication interface 1~M needs to involve corresponding implementation specification components 621~62M according to its own usage. For example, when the underlying communication interfaces 1~M are five underlying communication interfaces, namely, cookie API, Storage API, Web Socket API, postMessage API, and SharedWorker API, and the implementation specification component is named PageMessageImplementation, the corresponding implementation specification components 621~62M can be named as shown in Table 4 below according to PageMessageImplementation.

[0095] Table 4

[0096] According to the embodiments of the present disclosure, corresponding implementation specification components 621-62M are developed for the underlying communication interfaces 1-M respectively, which can facilitate componentized and standardized design when the multi-tab unified messaging interface 610 is integrated with the underlying communication interfaces 1-M.

[0097] Figure 7 The structure diagram of a system 700 for multi-tab communication in a browser according to yet another embodiment of the present disclosure is schematically shown.

[0098] like Figure 7 As shown, according to an embodiment of the present disclosure, each implementation specification component may include a sending specification module and a receiving specification module. Figure 7 As shown in the figure, in addition to the multi-tab unified messaging interface 710 and the underlying communication interfaces 1-M, the system 700 also includes sending specification modules 721-72M connected to the underlying communication interfaces 1-M in a one-to-one correspondence, and receiving specification modules 721'-72M' connected to the underlying communication interfaces 1-M in a one-to-one correspondence.

[0099] The multi-tab unified messaging interface 710 is similar to the multi-tab unified messaging interface 410. For details, please refer to the detailed description of the multi-tab unified messaging interface 410 above, which will not be repeated here. The underlying communication interfaces 1 to M are consistent with the above description and will not be repeated here.

[0100] The sending specification modules 721 - 72M are respectively used to receive messages from the multi-tab unified message delivery interface 710 according to the sending implementation specification, and send the messages to the corresponding underlying communication interfaces 1 -M.

[0101] The receiving specification module 721'-72M' is used to receive messages from the corresponding underlying communication interfaces 1-M and send the messages to the multi-tab unified messaging interface 710 according to the receiving implementation specification. According to some embodiments of the present disclosure, the receiving specification module 721'-72M' is also used to monitor the messages received by the underlying communication interfaces 1-M.

[0102] For example, when the multi-page unified message delivery interface 710 obtains the first message from the first page, and the sending and receiving processing logic of the first message is driven by the underlying communication interface 1, the sending specification module 721 can receive the first message from the multi-page unified message delivery interface 710 according to the sending implementation specification, and send it to the underlying communication interface 1. Then the underlying communication interface 1 drives the first message to be sent from the first page to the underlying sending and receiving logic processing of the second page. After the underlying communication interface 1 completes the underlying sending and receiving logic processing, the receiving specification module 721' receives the message from the underlying communication interface 1, and sends the message to the multi-page unified message delivery interface 710 according to the receiving specification, and the multi-page unified message delivery interface 710 passes the message to the second page.

[0103] Assuming that the implementation specification component is named PageMessageImplementation, the structure of the implementation specification component in the system 700 can be designed as follows:

[0104]

[0105] Among them, postMessage(message: any):void corresponds to any one of the sending specification modules 721~72M, which specifies the implementation specifications for sending messages by each underlying communication interface 1~M. Each underlying communication interface 1~M should describe its ability to send messages in the form of postMessage(message: any) instead of other forms, so that it can be convenient for the unified management and use of the multi-tab unified messaging interface 710. During implementation, the information transmitted by each underlying communication interface 1~M is first formatted according to postMessage(message: any):void, and then transmitted to the multi-tab unified messaging interface 710. For detailed usage of postMessage(message: any), refer to Table 5.

[0106] Table 5

[0107] onMessage(listener:(message: any) => void) : void corresponds to any one of the receiving specification modules 721'~72M', and specifies the implementation specification of each underlying communication interface 1~M receiving messages. Each underlying communication interface 1~M should describe its ability to receive messages in the form of: onMessage(listener: (message: any) =>void): void, rather than other forms, so that it is convenient for the unified management and use of the multi-tab unified messaging interface 710. For detailed usage of onMessage(listener:(message: any) => void) : void, refer to Table 6.

[0108] Table 6

[0109] Figure 8 The message processing process of each implementation specification component when sending information in a system for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown.

[0110] like Figure 8 As shown, refer to Figure 7 As shown in Table 4, when the underlying communication interfaces 1 to M are cookie API, StorageAPI, Web Socket API, postMessage API, and SharedWorker API, the underlying communication interfaces 1 to M are connected to the corresponding implementation specification components CookieMessageImplementation, StorageMessageImplementation, WebSocketMessageImplementation, PostMessageImplementation, and sharedworkerImplementation, respectively. Each implementation specification component converts the message received from the underlying communication interface according to the postMessage (message: any) format, and then transmits it to the multi-tab unified messaging interface 710.

[0111] When using the multi-page unified messaging interface 710 to send a message, there are several steps: First, the multi-page unified messaging interface 710 calls PageMessageAPI.postMessage(message,implementation) to specify the message to be sent and the implementation specification component corresponding to the underlying communication interface to be adopted; then, the multi-page unified messaging interface 710 internally determines the implementation specification component to be adopted for this sending based on the name of the selected implementation specification component. For example, if the value of implementation is cookie, CookieMessageImplementation is adopted. Next, according to the determined implementation specification component, postMessage is called to pass in the received message to complete the final message sending.

[0112] Fig. 9 The message processing process of each implementation specification component when receiving information in a system for multi-tab communication in a browser according to another embodiment of the present disclosure is schematically shown.

[0113] like Fig. 9 As shown, refer to Figure 7 As shown in Table 4, when the underlying communication interfaces 1 to M are cookie API, StorageAPI, Web Socket API, postMessage API, and SharedWorker API, respectively, the underlying communication interfaces 1 to M are connected to the corresponding implementation specification components CookieMessageImplementation, StorageMessageImplementation, WebSocketMessageImplementation, PostMessageImplementation, and sharedworkerImplementation, respectively. Among them, each implementation specification component receives a message from the multi-tab unified messaging interface 710 in the form of onMessage(listener:(message: any) => void) : void, and then sends it to the corresponding underlying communication interface. Among them, the received message can be monitored by the listener so that it can be transmitted to the corresponding underlying communication interface in a timely manner.

[0114] The specific message receiving process of the specific system 700 is as follows: when the multi-page tab unified message delivery interface 710 is started, a listening callback function is set for the receiving specification module 721'~72M' through the onMessage capability, so that when the underlying communication interface 1~M receives a message respectively, the page tab unified message delivery interface 710 can sense it. Then, the page (for example, the first page) sets a listening callback function through PageMessageAPI.onMessage(listener) to listen to all messages received by the page tab unified message delivery interface 710 (messages received by any underlying communication interface in the underlying communication interface 1~M). Therefore, when any of the underlying communication interfaces 1~M receives a message, the listener in the receiving specification module 721'~72M' corresponding to the underlying communication interface in the page tab unified message delivery interface 710 will be executed, and the message will be forwarded to the listening function in the multi-page tab unified message delivery interface 710, so that the first page will not miss any message received by the underlying component.

[0115] According to the embodiments of the present invention, any one or more of the interfaces, components, and modules, or at least part of the functions of any one of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the interfaces, components, and modules can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the interfaces, components, and modules can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the interfaces, components, and modules can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0116] Based on the above system for multi-tab communication in a browser, the present disclosure also provides a method for multi-tab communication in a browser. Fig.10 and Fig.11 The method for multi-tab communication in a browser according to an embodiment of the present disclosure is exemplarily introduced.

[0117] Fig.10 A flowchart of a method for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown.

[0118] like Fig.10As shown, the method for multi-tab communication in a browser according to an embodiment of the present disclosure may include operations S1010 to S1030. The method may be implemented by any one of the systems 400, 600, or 700 described above.

[0119] First, in operation S1010, when a first message is transmitted between at least two pages in a browser, the first message is transmitted to the at least two pages respectively using a multi-tab unified message transmission interface according to the same information transmission specification.

[0120] Then, in operation S1020, the first message is transmitted using the multi-tab unified messaging interface and at least one of the M underlying communication interfaces, where M is an integer greater than or equal to 2.

[0121] When using systems 600 and 700 to implement the method of the embodiment of the present disclosure, in operation S1020, an implementation specification component corresponding to each underlying communication interface can be used to process the first message between the underlying communication interface and the multi-tab unified messaging interface according to the underlying interface implementation specification corresponding to the underlying communication interface, so that the first message is transmitted in the multi-tab unified messaging interface according to the specification format. The process of implementing the specification component processing the message can refer to the above description and will not be repeated here.

[0122] Next, in operation S1030, at least one underlying communication interface is used to drive the sending and receiving processing of the first message; wherein different underlying communication interfaces among the M underlying communication interfaces have different sending and receiving processing logics.

[0123] In this way, when multiple tabs communicate, the page can transmit messages with the unified messaging interface of the multiple tabs according to the same information transmission specification, so that web page developers can avoid learning and developing the usage of various underlying communication interfaces and improve development efficiency.

[0124] Fig.11 A flowchart of message sending and receiving processing in a method for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown.

[0125] like Fig.11 As shown, according to an embodiment of the present disclosure, the message sending and receiving processing in operation S1020 may include using a multi-tab unified messaging interface to perform operations S1101 to S1104.

[0126] In operation S1101, a first message is obtained from a first page that sends the first message according to a message sending specification.

[0127] In operation S1102, based on information of a first underlying communication interface configured for a first page, a first message is sent to the first underlying communication interface, wherein the first underlying communication interface is one of the M underlying communication interfaces.

[0128] In operation S1103, a first message sent by the first underlying communication interface to the second page is received. In some embodiments, the multi-page unified message delivery interface can monitor the message sending status of M underlying communication interfaces, and when the first message sent by the first underlying communication interface to the second page is monitored, the first message is received. For example, the first page and the second page can respectively monitor the message received by the multi-page unified message delivery interface from the underlying communication interface by setting a monitoring callback function.

[0129] In operation S1104, the first message is transmitted to the second page according to the message receiving specification, wherein the information transmission specification includes a message sending specification and a message receiving specification.

[0130] It can be seen that according to the embodiments of the present disclosure, in the scenario of message communication between multiple tabs, a unified, standard and simple usage method can be provided to developers, thereby improving development efficiency and reducing development costs.

[0131] Fig.12 A block diagram of an electronic device 1200 suitable for implementing the method for multi-tab communication in a browser according to an embodiment of the present disclosure is schematically shown.

[0132] like Fig.12 As shown, the electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 to a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include an onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0133] In RAM 1203, various programs and data required for the operation of electronic device 1200 are stored. Processor 1201, ROM 1202 and RAM 1203 are connected to each other via bus 1204. Processor 1201 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1202 and / or RAM 1203. It should be noted that the program can also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.

[0134] According to an embodiment of the present disclosure, the electronic device 1200 may further include an input / output (I / O) interface 1205, which is also connected to the bus 1204. The electronic device 1200 may further include one or more of the following components connected to the I / O interface 1205: an input portion 1206 including a keyboard, a mouse, etc.; an output portion 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1208 including a hard disk, etc.; and a communication portion 1209 including a network interface card such as a LAN card, a modem, etc. The communication portion 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage portion 1208 as needed.

[0135] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0136] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1202 and / or RAM 1203 described above and / or one or more memories other than ROM 1202 and RAM 1203.

[0137] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.

[0138] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1201. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0139] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1209, and / or installed from the removable medium 1211. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0140] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0141] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0142] The flow charts 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 disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order 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 or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0143] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0144] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A system for multi-tab communication in a browser, comprising: M underlying communication interfaces, where M is an integer greater than or equal to 2; A multi-tab unified message delivery interface is connected to the M underlying communication interfaces respectively; wherein, The multi-tab unified message transmission interface is used to transmit the first message to the at least two pages in the browser according to the same information transmission specification, and to transmit the first message to at least one of the underlying communication interfaces; and At least one of the underlying communication interfaces is used to drive the sending and receiving processing of the first message; wherein different underlying communication interfaces among the M underlying communication interfaces have different sending and receiving processing logics; The multi-tab unified message delivery interface includes a message sending module and a message receiving module: The message sending module is used to obtain the first message from the first page that sends the first message according to the message sending specification, and send the first message to the first underlying communication interface based on the information of the first underlying communication interface configured for the first page, wherein the first underlying communication interface is one of the M underlying communication interfaces; The message receiving module is used to receive the first message sent by the first bottom communication interface to the second page, and transmit the first message to the second page according to the message receiving specification; wherein the information transmission specification includes the message sending specification and the message receiving specification; The system further includes: M implementation specification components, which are respectively connected to the M underlying communication interfaces in a one-to-one correspondence, and are all connected to the multi-tab unified message delivery interface in a communication manner; Among them, the implementation specification component connected to the underlying communication interface that transmits the first message is used to process the first message between the underlying communication interface and the multi-page tab unified messaging interface according to the underlying interface implementation specification corresponding to the underlying communication interface, so that the first message can be transmitted in the multi-page tab unified messaging interface in accordance with the standard format.

2. The system according to claim 1, wherein: The message sending module is further used to configure the information of the first underlying communication interface for the first page.

3. The system according to claim 1, wherein: The multi-tab unified messaging interface also includes: The underlying interface information acquisition module is used to display information of the M underlying communication interfaces to the user based on the user's viewing operation during the development stage of the first page.

4. The system according to claim 1, wherein: The implementation specification components include: a sending specification module, configured to receive the first message from the multi-tab unified messaging interface according to a sending implementation specification, and send the first message to the corresponding underlying communication interface; and A receiving specification module, configured to receive the first message from the corresponding underlying communication interface, and send the first message to the multi-tab unified message delivery interface according to the receiving implementation specification; The underlying interface implementation specification includes the sending implementation specification and the receiving implementation specification.

5. The system according to claim 4, wherein: The receiving specification module is also used to monitor the messages received by the corresponding underlying communication interface.

6. The system according to claim 1, wherein: The M underlying communication interfaces include at least one of the following: A cookie-based communication interface, a Storage-based communication interface, a Web Socket-based communication interface, a postMessage-based communication interface, or a SharedWorker-based communication interface.

7. A method for multi-tab communication in a browser, comprising: When the first message is transmitted between at least two pages in the browser, the first message is transmitted to the at least two pages respectively according to the same information transmission specification by using the multi-tab unified message transmission interface; The first message is transmitted by using the multi-tab unified message delivery interface and at least one of the M underlying communication interfaces, where M is an integer greater than or equal to 2; as well as Using at least one of the underlying communication interfaces to drive the sending and receiving processing of the first message; wherein different underlying communication interfaces among the M underlying communication interfaces have different sending and receiving processing logics; The transmitting of the first message to the at least two pages respectively according to the same information transmission specification by using the multi-page tab unified message transmission interface includes performing the following operations by using the multi-page tab unified message transmission interface: Acquire the first message from the first page that sends the first message according to a message sending specification; Based on information of a first underlying communication interface configured for the first page, sending the first message to the first underlying communication interface, wherein the first underlying communication interface is one of the M underlying communication interfaces; receiving the first message sent by the first underlying communication interface to the second page; and Passing the first message to the second page according to a message receiving specification; wherein the information transmission specification includes the message sending specification and the message receiving specification; The transmitting of the first message by using the multi-tab unified message delivery interface and at least one of the M underlying communication interfaces includes: Utilizing an implementation specification component corresponding to each of the underlying communication interfaces, the first message is processed between the underlying communication interface and the multi-tab unified messaging interface in accordance with the underlying interface implementation specification corresponding to the underlying communication interface, so that the first message is transmitted in the multi-tab unified messaging interface in accordance with the specification format.

8. The method according to claim 7, wherein: The receiving the first message sent by the first bottom layer communication interface to the second page includes: Monitoring the message sending status of the M underlying communication interfaces; and When the first message sent by the first underlying communication interface to the second page is monitored, the first message is received.

9. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to claim 7 or 8.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 7 or 8.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to claim 7 or 8 is implemented.

Citation Information

Patent Citations

  • Set top box based communication interface device

    CN102497582A

  • Method and system for receiving and transmitting message of browser and computer accessible storage media to store program thereof

    TW200905502A