A control method for display devices and accessing tabs
By comparing tab indication information with the display device's controller, duplicate tab loading is avoided, thus resolving the browser usage issue caused by duplicate tabs in video conferencing and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JUHAOKAN TECH CO LTD
- Filing Date
- 2022-09-09
- Publication Date
- 2026-05-26
AI Technical Summary
In video conferencing scenarios, if a user repeatedly opens the same tab, it will cause two identical images and sounds to be output simultaneously in the video conference, resulting in the invalid use of browser space and affecting the normal conduct of the video conference.
The device controller responds to user input, loads the first tab, and compares the information with the already opened second tab. If they match, loading the first tab stops, and a prompt message is displayed to prevent duplicate tabs from being opened.
This avoids business errors caused by duplicate tabs in the browser, saves browser space, and improves the user experience.
Smart Images

Figure CN116304444B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and more particularly to a display device and a method for controlling access to tabs. Background Technology
[0002] Currently, display devices support video conferencing and voice chat within browsers. Browsers can open multiple tabs simultaneously, each acting as a separate window. In a video conferencing scenario, if a user has already opened a tab in their browser to join a meeting, but then clicks the meeting link to open the same tab again, this will result in two identical images and audio outputs being displayed simultaneously. This wastes browser space and prevents the video conference from proceeding properly, causing inconvenience for the user. Summary of the Invention
[0003] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a control method for display devices and accessing tabs, which can avoid browser service abnormalities caused by opening the same tabs simultaneously.
[0004] To achieve the above objectives, the technical solutions provided by the embodiments of this disclosure are as follows:
[0005] In a first aspect, this disclosure provides a display device, comprising:
[0006] The controller is configured to: in response to an access request received through a user input interface, the access request including a first address, trigger the loading of a first tab based on the first address;
[0007] Compare the first instruction information of the first tab with the second instruction information of the already opened second tab;
[0008] If the first instruction information matches the second instruction information, the loading of the first tab will stop, and the display will be controlled to show a prompt message to the user that the second tab has been opened.
[0009] Secondly, this disclosure provides a method for controlling access to tabs, including:
[0010] In response to an access request received through the user input interface, the access request including a first address, the loading of the first tab is triggered based on the first address;
[0011] Compare the first instruction information of the first tab with the second instruction information of the already opened second tab;
[0012] If the first instruction information matches the second instruction information, the loading of the first tab will stop, and the display will be controlled to show a prompt message to the user that the second tab has been opened.
[0013] Thirdly, this disclosure provides a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements a control method for accessing tabs as shown in the second page.
[0014] Fourthly, this disclosure provides a computer program product comprising a computer program that, when run on a computer, enables the computer to implement the control method for accessing tabs as described in the second aspect.
[0015] This disclosure provides a control method for a display device and accessing tabs. The display device, in response to an access request received through a user input interface, triggers the loading of a first tab based on a first address included in the access request. Then, it compares first indication information of the first tab with second indication information of an already opened second tab. If the first and second indication information match, indicating that the user's desired first tab is the same as the already opened second tab, loading of the first tab stops, and a timely prompt message is displayed on the screen to indicate that the second tab is already open. This avoids business anomalies caused by simultaneously opening duplicate tabs, saves browser space, and improves the user experience. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the browser interface in a meeting scenario using existing technology;
[0019] Figure 2A These are schematic diagrams of scenarios provided in some embodiments of the present disclosure;
[0020] Figure 2B This is a schematic diagram of the browser interface provided in the embodiments of this disclosure;
[0021] Figure 3This is a block diagram showing the configuration of the control device in an embodiment of this disclosure;
[0022] Figure 4 This is a hardware configuration block diagram of the display device in an embodiment of this disclosure;
[0023] Figure 5 This is a schematic diagram of software configuration in a display device according to one or more embodiments of the present disclosure;
[0024] Figure 6 This is a flowchart illustrating a method for controlling access to tabs provided in an embodiment of this disclosure. Figure 1 ;
[0025] Figure 7A A schematic diagram illustrating the loading of a first tab page according to an embodiment of this disclosure;
[0026] Figure 7B This is a schematic diagram of the display prompt information provided in the embodiments of this disclosure. Figure 1 ;
[0027] Figure 8 A schematic flowchart of a method for controlling access to tabs provided in this embodiment of the present disclosure is shown below;
[0028] Figure 9A Schematic diagram 2 showing the display of prompt information provided in this embodiment of the disclosure;
[0029] Figure 9B This is a schematic diagram of the display prompt information provided in the embodiments of this disclosure. Figure 3 ;
[0030] Figure 10A A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 3 ;
[0031] Figure 10B A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 4 ;
[0032] Figure 11 This is a schematic diagram of in-browser data interaction provided in an embodiment of this disclosure;
[0033] Figure 12 A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 5 . Detailed Implementation
[0034] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0035] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0036] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the technical terms used in the description of the embodiments or the prior art will be briefly introduced below:
[0037] Web Real-Time Communications (WebRTC) is a real-time communication technology that allows web applications or websites to establish peer-to-peer connections between browsers without the need for an intermediary, enabling the transmission of video and / or audio streams or other arbitrary data. The standards included in WebRTC make it possible for users to create peer-to-peer data sharing and teleconferencing without installing any plugins or third-party software.
[0038] WebRTC enables web-based video conferencing. The standard is the WHATWG protocol, and its purpose is to achieve real-time communication (RTC) capabilities through simple JavaScript provided by a browser.
[0039] Currently, display devices utilize WebRTC technology to conduct video conferencing and voice chat functions within browsers. Browsers can open multiple tabs simultaneously, with each tab acting as a separate window. In a video conferencing scenario, if a user has already opened a tab in their browser to join a meeting, but then clicks the meeting link to open the same tab again, this will result in two identical images and audio outputs being displayed simultaneously in the video conference. Figure 1 As shown, Figure 1 This diagram illustrates a browser interface in a prior art meeting scenario. The browser interface 101 includes a previously opened online meeting tab 11 and a currently opened online meeting tab 12. When online meeting tab 11 is open in the browser, opening online meeting tab 12 again causes both tabs to share the same user information. Online meeting tab 12 repeatedly displays user 1's meeting screen and simultaneously outputs user 1's audio data, causing service anomalies and preventing the video conference from proceeding normally, thus inconveniencing the user.
[0040] To address the aforementioned technical problems, this disclosure provides a control method for a display device and accessing tabs. The display device, in response to an access request received through a user input interface, triggers the loading of a first tab based on a first address included in the access request. Then, it compares first indication information of the first tab with second indication information of an already opened second tab. If the first and second indication information match, indicating that the user's desired first tab is the same as the already opened second tab, loading of the first tab stops, and a timely notification message is displayed on the screen to indicate that the second tab is already open. This avoids business conflicts caused by simultaneously opening duplicate tabs, saves browser space, and improves the user experience.
[0041] It should be noted that this disclosure is based on the browser's Broadcast Channel feature. Broadcast Channel creates a (broadcast) channel that can be shared by all tabs of the same origin. Therefore, messages sent by any tab in the browser can be listened to by other tabs.
[0042] Figure 2A These are schematic diagrams illustrating scenarios from some embodiments provided in this disclosure. For example... Figure 2A As shown, users can operate the display device 200 through the smart device 300 or the control device 100 to conduct video conferences on the display device 200.
[0043] like Figure 2B As shown, Figure 2BThis is a schematic diagram of the browser interface provided in this embodiment of the disclosure. The diagram shows a browser interface 101, including an already opened second tab 21. User 1 has already opened the second tab 21 and joined an online meeting, but user 1 may accidentally click the meeting link through the control device 100 to rejoin the online meeting. The control device 100 will send an access request to the display device, which includes the first address of the first tab. In this case, the display device 200 responds to the access request received through the user input interface by triggering the loading of the first tab according to the first address to respond to the access request issued by the control device 100; then it compares the first indication information of the first tab with the second indication information of the already opened second tab 21; if the first indication information matches the second indication information, it means that the first tab that the user expects to access is the same as the already opened second tab 21, then it stops loading the first tab and controls the display to display a timely prompt message, which is used to remind user 1 that the second tab 21 has been opened. In online meeting scenarios, having only one user join the meeting ensures that the meeting proceeds normally, avoids business conflicts caused by opening duplicate tabs at the same time, saves browser space, and improves the user experience.
[0044] In some embodiments, the control device 100 may be a remote control, and communication between the remote control and the display device may include infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the display device 200. Users can input user commands through buttons on the remote control, voice input, control panel input, etc., to control the display device 200. In some embodiments, mobile terminals, tablet computers, computers, laptops, and other smart devices may also be used to control the display device 200.
[0045] In some embodiments, the smart device 300 can install software applications with the display device 200 to achieve connection and communication via network communication protocols, enabling one-to-one control operations and data communication. Audio and video content displayed on the smart device 300 can also be transmitted to the display device 200 for synchronized display. The display device 200 also communicates with the server 400 via various communication methods. The display device 200 can communicate via a local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 can provide various content and interactive features to the display device 200. The display device 200 can be a liquid crystal display, an OLED display, or a projection display device. In addition to providing broadcast television reception functions, the display device 200 can also be equipped with a smart network television function that provides computer support.
[0046] Figure 3 This is a block diagram showing the configuration of the control device in an embodiment of this disclosure. Figure 3As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input commands and convert them into commands that the display device 200 can recognize and respond to, acting as an intermediary for interaction between the user and the display device 200. The communication interface 130 is used for external communication and includes at least one of a Wi-Fi chip, a Bluetooth module, NFC, or a replacement module. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, buttons, or a replacement module.
[0047] Figure 4 This is a hardware configuration block diagram of the display device in an embodiment of this disclosure. For example... Figure 4 The display device 200 includes: a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, etc. The controller 250 includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to nth interface for input / output. The display 260 can be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and can also be a projection device and a projection screen. The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. The detector 230 is used to collect signals from the external environment or signals interacting with the external environment. The controller 250 and the tuner / demodulator 210 can be located in different separate devices; that is, the tuner / demodulator 210 can also be an external device of the main device where the controller 250 is located, such as an external set-top box.
[0048] In some embodiments, the display device described above is a terminal device with display function, such as a television, mobile phone, computer, or learning machine.
[0049] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200. The user can input user commands through a graphical user interface (GUI) displayed on the monitor 260, and the user input interface receives the user input commands through the GUI. Alternatively, the user can input user commands by inputting specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0050] The output interface (display 260, and / or audio output interface 270) is configured to output user interaction information;
[0051] Communicator 220 is used to communicate with server 400 or other devices.
[0052] This disclosure provides a display device, which includes:
[0053] Controller 250 is configured to: in response to an access request received through a user input interface, the access request including a first address, trigger the loading of a first tab based on the first address;
[0054] Compare the first instruction information of the first tab with the second instruction information of the already opened second tab;
[0055] If the first instruction information matches the second instruction information, the loading of the first tab will stop, and the display will be controlled to show a prompt message to the user that the second tab has been opened.
[0056] The aforementioned display device accurately determines whether the same tab will be opened repeatedly by comparing the first indication information of the first tab that the user expects to access with the second indication information of the second tab that is already open in the browser. If the first indication information and the second indication information are the same, in order to avoid business anomalies caused by repeatedly opening the same tab, the device stops loading the content of the first tab and displays a prompt message to inform the user that the second tab that is the same as the first tab has been opened. This helps the browser to perform business normally, reduces adverse effects on users, and improves the user experience.
[0057] In some embodiments, the first indication information is a first address, and the second indication information is a second address of the second tab; after triggering the loading of the first tab based on the first address, the controller 250 is further configured to: control the first tab to broadcast an inquiry message, the inquiry message including the first address; after the second tab receives the inquiry message, compare the second address with the first address; if the second address matches the first address, the second tab generates a feedback message and sends it to the first tab; after the first tab receives the feedback message, stop loading the first tab and control the display to show a prompt message.
[0058] In some embodiments, the first indication information is a first identifier, and the second indication information is a second identifier. The first identifier is used to indicate the service corresponding to the first tab, and the second identifier is used to indicate the service corresponding to the second tab. After triggering the loading of the first tab according to the first address, the controller 250 is further configured to: compare the first identifier of the first tab with the identifiers corresponding to other tabs already opened in the browser; if the second identifier of the second tab matches the first identifier, then stop loading the first tab and control the display to show a prompt message; if the second identifier of the second tab does not match the first identifier, then load the content of the first tab and control the display to show the content of the first tab.
[0059] In some embodiments, the controller 250, after comparing the service corresponding to the first tab with the services corresponding to other tabs already opened in the browser, is configured to: if no service corresponding to the second tab matches the service corresponding to the first tab, load the content of the first tab and control the display to show the content of the first tab.
[0060] In some embodiments, the controller 250 compares the first identifier of the first tab with the identifiers corresponding to other tabs already opened in the browser, and is configured to: listen for local storage change events, the local storage change events indicating a change in the correspondence between service identifiers in local storage; generate the first identifier of the first tab based on the timestamp corresponding to when the first tab is loaded, store the first correspondence between the first identifier and the service identifier, and trigger the local storage change event; obtain the historical correspondence between service identifiers in local storage; if the first correspondence in the historical correspondence is different from the second correspondence, it is determined that there is a service corresponding to the second tab that matches the service corresponding to the first tab; wherein, the second correspondence is the correspondence between the service identifier and the second identifier of the second tab, and the second identifier is generated based on the timestamp corresponding to when the second tab is loaded.
[0061] In some embodiments, after determining that there is a service corresponding to the second tab that matches the service corresponding to the first tab, the controller 250 is further configured to: delete the first correspondence between the service identifier and the first identifier in the local storage.
[0062] In some embodiments, after the controller 250 controls the display to show the prompt information, it is further configured to: close the first tab; jump to the second tab; and control the display to show the content of the second tab.
[0063] In some embodiments, the query message further includes: the page document of the first tab, and / or, page layout information; the controller 250, which generates and sends a feedback message, is configured to: after the open second tab receives the query message, compare the second address of the second tab, the page document of the second tab, and / or, the page layout information with the first address, the page document, and / or, the page layout information of the first tab; if the second address matches the first address, the page document of the second tab matches the page document of the first tab, and the page layout information of the second tab matches the page layout information of the first tab, then generate and send a feedback message.
[0064] In some embodiments, after triggering the loading of the first tab page according to the first address, the controller 250 is further configured to: send a request message to the server so that the server can determine the content of the first tab page according to the first address included in the request message; after generating and sending a feedback message, the controller 250 is further configured to: send a blocking message to the server, the blocking message being used to indicate stopping the sending of the content of the first tab page.
[0065] like Figure 5 As shown, Figure 5 This is a schematic diagram of software configuration in a display device according to one or more embodiments of the present disclosure, such as... Figure 5 As shown, the system is divided into four layers, from top to bottom: the Applications layer (hereinafter referred to as the "Application Layer"), the Application Framework layer (hereinafter referred to as the "Framework Layer"), the Android runtime and system library layer (hereinafter referred to as the "System Runtime Layer"), and the kernel layer. The kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, Wi-Fi driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver. The video data transmission method provided in this embodiment can be implemented based on the above-mentioned display device, specifically through a player within the display device.
[0066] To illustrate this solution in more detail, the following will use examples to illustrate it. Figure 6 To explain, it is understandable that Figure 6 The steps involved may include more or fewer steps in actual implementation, and the order of these steps may also be different, as long as the six methods provided in the embodiments of this disclosure can be implemented.
[0067] like Figure 6 As shown, Figure 6This is a flowchart illustrating a method for controlling access to tabs provided in an embodiment of this disclosure. Figure 1 The method includes the following steps S601 to S603:
[0068] S601. In response to an access request received through the user input interface, trigger the loading of the first tab page based on the first address.
[0069] The access request includes a first address, which can be a Uniform Resource Locator (URL) entered by the user in the browser interface.
[0070] In some embodiments, the display device responds to an access request received through a user input interface by sending a request message to the server, the request message including a first address, for requesting the server to determine the content of a first tab based on the first address and send the content of the first tab to the display device.
[0071] like Figure 7A As shown, Figure 7A This is a schematic diagram of loading a first tab page according to an embodiment of the present disclosure. The diagram includes the current browser interface 101 of the display device, which includes an already opened second tab page 21 and a first tab page 22 that is being loaded, but the content of the first tab page 22 has not yet been displayed.
[0072] The above embodiment responds to the access request by triggering the loading of the first tab, thereby responding to the user's expectation to access the first tab corresponding to the first address. In order not to affect the display of the content of other tabs already opened in the browser, only the loading of the first tab is triggered, and the content of the first tab is not directly displayed.
[0073] S602. Compare the first instruction information of the first tab with the second instruction information of the already opened second tab.
[0074] The second tab is any one of the tabs that the browser has already opened.
[0075] S603. If the first instruction information matches the second instruction information, stop loading the first tab and control the display to show the prompt information.
[0076] The notification message is used to inform the user that a second tab has been opened, indicating that the first tab the user expects to access is the same as the second tab that has already been opened.
[0077] like Figure 7B As shown, Figure 7B This is a schematic diagram of the display prompt information provided in the embodiments of this disclosure. Figure 1The browser interface 101 shown in the figure includes a second tab 21 and a first tab 22. If the second tab 21 and the first tab 22 are determined to be a match based on their services, and two identical online meeting tabs are opened at the same time, a prompt message 23 will be displayed. For example, the prompt message 23 includes the message: "Please do not open multiple online meetings at the same time".
[0078] In some embodiments, the first indication information is a first address of a first tab, and the second indication information is a second address of a second tab; or, the first indication information is a first identifier, and the second indication information is a second identifier. The first identifier is generated based on the timestamp corresponding to when the first tab is triggered to load, and is used to indicate the service corresponding to the first tab; the second identifier is generated based on the timestamp corresponding to when the second tab is triggered to load, and is used to indicate the service corresponding to the second tab.
[0079] Steps S602 to S603 will be explained below based on the two different first and second instruction information:
[0080] (1) The first instruction information is the first address of the first tab, and the second instruction information is the second address of the second tab.
[0081] like Figure 8 As shown, Figure 8 A second flowchart illustrates a control method for accessing a tab provided in this embodiment. After the controller of the display device triggers the loading of the first tab based on the first address, the following steps S11 to S14 are executed:
[0082] S11, Control the broadcast query message of the first tab.
[0083] This step is performed after the first tab is opened. The query message includes the first address. The query message may also include the page document of the first tab and / or page layout information.
[0084] In some embodiments, the display device, based on the browser's broadcast function, controls the first tab to broadcast an inquiry message on a broadcast channel shared by all tabs in the browser, inquiring whether the browser's currently open tabs match the first tab. Specifically, the browser's broadcast function proxies a named channel through an interface, allowing any tab within a specified browser to subscribe to this named channel, thereby enabling communication between different tabs. By triggering a message event, this inquiry message can be broadcast to all tabs listening to this channel.
[0085] S12. After receiving the query message on the second tab, compare the second address with the first address.
[0086] In some embodiments, the browser's second tab, which is already open, listens to the broadcast channel, receives an inquiry message broadcast by the first tab, and then compares the first address included in the inquiry message with its own second address.
[0087] If the second address does not match the first address, the second tab will not process the query message. If all the tabs already opened in the browser have been compared with the first address and determined to be mismatched, the received query message will not be processed, indicating that the first tab has not been opened and is a completely new tab. In this case, the browser will continue to load the content of the first tab and control the display to show the content of the first tab.
[0088] If the second address matches the first address, then proceed to step S13.
[0089] In some embodiments, the query message includes: a first address, page document, and page layout information of a first tab; the second tab listens to a broadcast channel, receives the query message broadcast by the first tab, and then compares the first address, page document, and / or page layout information of the first tab included in the query message with the second address, page document, and / or page layout information of the second tab itself.
[0090] S13. If the second address matches the first address, the second tab generates a feedback message and sends it to the first tab.
[0091] The feedback message indicates that a second tab, identical to the first tab, exists among other tabs already opened in the browser.
[0092] In some embodiments, when the second tab receives an inquiry message that includes the first address, page document, and page layout information of the first tab, and after comparison it is determined that the second address of the second tab is the same as the first address of the first tab, the page document of the second tab is the same as the page document of the first tab, and the page layout information of the second tab is the same as the page layout information of the first tab, then the second tab generates a feedback message and sends it to the first tab to indicate that there is a second tab with the same information in other tabs that are already open in the browser of the first tab.
[0093] S14. After receiving the feedback message on the first tab, stop loading the first tab and control the display to show the prompt message.
[0094] In some embodiments, if the first tab does not receive a feedback message within a second preset time period, it indicates that the browser does not have a tab identical to the first tab among its other open tabs, and thus continues to receive the content of the first tab from the server for loading and display. The second preset time period is a pre-set duration for waiting for feedback messages, typically set to 50ms.
[0095] In some embodiments, the display is controlled to show a prompt message for a third preset duration, which is a pre-set display duration for the prompt message, for example, the third preset duration can be set to 10 seconds. After the third preset duration, the first tab is closed, thereby saving browser space and making the display more concise. Then, the system jumps to the second tab and controls the display to show the content of the second tab.
[0096] For example, such as Figure 9A As shown, Figure 9A The second illustration shows the display of prompt information provided in the embodiment of this disclosure. Prompt information 23 is displayed. After 10 seconds, the first tab 22 is closed, and the user jumps to the second tab 21 to display the content of the second tab 21.
[0097] In some embodiments, the prompt message also includes a confirmation option, which indicates that the user is sure they want to jump to the second tab. After displaying the prompt message and obtaining the user's operation instruction for the confirmation option, the prompt message is closed and the user is jumped to the second tab.
[0098] For example, such as Figure 9B As shown, Figure 9B This is a schematic diagram of the display prompt information provided in the embodiments of this disclosure. Figure 3 The browser interface shown in the figure includes a second tab 21, a first tab 22, and a prompt message 23. The prompt message 23 includes a confirmation option 231. After the user selects the confirmation option, the prompt message 23 is closed and the user is redirected to the second tab 21.
[0099] In steps S11 to S14 above, when the first indication information is the first address and the second indication information is the second address, the browser's broadcast function enables communication between different tabs to determine whether the desired tab has been opened. If the desired tab has been opened based on the tab's address, a prompt message is displayed to alert the user, preventing browser service errors caused by opening the same tab simultaneously. This provides convenience to the user, saves browser resources, and improves the user experience.
[0100] (2) The first instruction information is the first identifier, and the second instruction information is the second identifier.
[0101] like Figure 10A As shown, Figure 10A A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 3 After the controller of the display device triggers the loading of the first tab page based on the first address, the following steps S21 to S23 are executed:
[0102] S21. Compare the first identifier of the first tab with the identifiers of other tabs that are already open in the browser.
[0103] In comparing the services corresponding to the first tab with the services corresponding to other tabs already opened in the browser, this disclosure provides an implementation method, such as... Figure 10B As shown, Figure 10B A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 3 The steps include S21a to S21d: taking the first opened label as the second label as an example, and the later opened label as the first label as an example.
[0104] S21a, Listen for local storage change events.
[0105] In some embodiments, a local storage change event refers to an event in which the correspondence between service identifiers in local storage changes. Local storage is a storage space shared by all browser tabs.
[0106] In some embodiments, the memory of a tab is memory that can only be accessed by the tab itself and not by other tabs.
[0107] In some embodiments, other tabs already opened in the browser are controlled to listen for local storage change events. Taking a second tab already opened in the browser as an example, the process of listening for local storage change events is as follows: First, in response to the user's access request to access the second tab, the second tab is loaded, and a unique identifier value_2 for the second tab is generated based on the timestamp corresponding to the triggering of the second tab loading. Then, value_2 is stored in the memory of the second tab, for example (serverID, value_2), or, if the second tab corresponds to a unique serverID, only value_2 needs to be stored. While storing value_2 in the memory of the second tab, value_2 is also written to the service identifier serverID in the local storage, stored in the format of a data pair (key, value) (serverID, value_2). After waiting for a preset time, such as 50ms, the serverID is retrieved from the local storage and compared with the ID1 stored in the memory to determine whether the value corresponding to the serverID is still value_2. If the value corresponding to the serverID is still value_2, it means that the second tab is the first tab opened in the browser, and all other tabs already opened in the browser are different from the second tab.
[0108] In some embodiments, the (key, value) data format can also be replaced by other existing methods for mapping two data items, such as a numeric mapping table. Therefore, a mapping relationship between serverID and value is sufficient. The mapping relationship between serverID and value stored in the tab's memory is not accessed by other tabs and therefore cannot be modified by them. The mapping relationship between serverID and value stored in local storage is shared by multiple tabs; therefore, the value in the serverID and value mapping relationship will change according to the instruction information sent by the tab.
[0109] Furthermore, control the registration of the second tab to listen for local change events, and periodically listen for local storage change events.
[0110] In some embodiments, the serverID is generated based on the access address of the tab. The same access address results in the same serverID, and different serverIDs correspond to tabs with different access addresses.
[0111] S21b: Based on the timestamp corresponding to the trigger loading of the first tab, generate the first identifier of the first tab, store the first correspondence between the first identifier and the service identifier, and trigger a local storage change event.
[0112] In some embodiments, while listening for local change events in a tab that is already open in the browser, if the loading of the first tab is triggered, the first tab is controlled to generate a first identifier based on the timestamp and random number corresponding to the triggering of the loading of the first tab. This first identifier is used to uniquely identify the first tab.
[0113] In some embodiments, after generating the first identifier of the first tab, the first identifier is first stored in the memory corresponding to the first tab, and then the first correspondence between the first identifier and the service identifier is stored in local storage. Optionally, it is stored in a (key, value) data format, where the key stores the service identifier serverID, and the value stores the first identifier of the first tab. This can be understood as writing the first identifier value_1 under the service identifier serverID, and the first correspondence is represented as (serverID, value_1), triggering a local storage change event. Therefore, other tabs already opened in the browser will listen for this local storage change event. In some embodiments, writing the first identifier value_1 under the service identifier serverID may include, when there is no serverID corresponding to the first tab (e.g., server123), writing (server123, value_1) into local storage for access by different tabs; when there is a serverID corresponding to the first tab (e.g., (server123, value_2), modifying the value corresponding to server123 according to value_1, and the (key, value) in local storage after modification becomes (server123, value_1).
[0114] S21c: Obtain the historical correspondence of service identifiers in local storage.
[0115] After the second tab listens for the local storage change event in other tabs already opened in the browser, it determines the historical correspondence of the service identifier in the local storage before the local storage change event occurred based on the serverID, including the first correspondence between the first identifier and the service identifier.
[0116] The system compares the first and second mappings in the historical mapping relationships to determine if they differ. The second mapping refers to the mapping between the service identifier and the second identifier of the second tab, stored locally in a (key, value) data format. Since the second tab is already open in the browser, a second identifier is generated based on the corresponding timestamp when the second tab is loaded. This second identifier is then stored in the memory corresponding to the second tab.
[0117] In some embodiments, after the (key, value) in the local storage is modified to (server123, value_1), the second tab compares the data pair in memory corresponding to the second tab with the data pair in the local storage based on the serverID (server123) to determine whether the value values of the two are the same.
[0118] In some embodiments, other tags with serverID server456 may also be included. These other tags will also compare the data of the corresponding server456 with the data after receiving the change broadcast.
[0119] In some embodiments, the parameter for triggering a local storage change event may not include the changed serverID, and the tab will perform a comparison process to see if the value is the same after listening to the broadcast.
[0120] In some embodiments, the local storage change event can include the parameter of the changed serverID. After the tab listens to the broadcast, it first determines whether the parameter of serverID in the broadcast is the same as the parameter of serverID in the tab's memory. If they are the same, it performs a comparison process to see if the values are the same; otherwise, it does not perform the comparison to improve the comparison speed.
[0121] S21d. If the first correspondence and the second correspondence in the historical correspondence are different, then it is determined that there is a service corresponding to the second tab that matches the service corresponding to the first tab.
[0122] In some embodiments, the second tab page compares the second identifier in memory with the first identifier in the historical correspondence in local storage. If the second identifier is different from the first identifier, the second tab page rewrites the second correspondence between the service identifier and the second identifier in local storage based on the second identifier of the second tab page stored in memory. This can be understood as the second tab page rewriting (serverID, value_2) in local storage based on value_2 stored in its memory.
[0123] In some embodiments, after the (key, value) in the local storage is modified to (server123, value_1), the second tab compares the data pair in the memory corresponding to the second tab with the data pair in the local storage based on the serverID (server123), and determines that the value values of the two are different. The second tab then rewrites value_2 into the local storage based on the value_2 stored in its memory, that is, it modifies (server123, value_1) to (server123, value_2) again.
[0124] After the first tab is configured to store the first mapping between the first identifier and the service identifier, after a first preset duration, the first tab retrieves the mapping between the service identifier and the service identifier from local storage to obtain the tab identifier corresponding to the service identifier, and compares it with the first identifier in the memory of the first tab. The first preset duration is a pre-set time for comparing the mapping between the service identifier and the tab identifier, typically set to 50 milliseconds.
[0125] For example, wait 50 milliseconds, retrieve the correspondence of service identifiers from local storage, obtain (server123, value_2), and compare value_2 with the first identifier value_1 stored in the memory of the first tab.
[0126] If the tab identifier corresponding to the service identifier in the local storage is different from the first identifier in the memory, it is determined that there is a service corresponding to the second tab that matches the service corresponding to the first tab. This means that the browser has opened the second tab that is the same as the first tab. Further steps are then executed, such as step S22, which stops loading the first tab and controls the display to show a prompt message.
[0127] Furthermore, the first mapping between service identifiers and first identifiers in local storage is deleted. This is to avoid abnormal judgments when blocking the opening of the same tab in subsequent operations. Only the mapping between service identifiers of already opened tabs in local storage is retained, which facilitates accurate and rapid judgment in subsequent operations based on this mapping.
[0128] like Figure 11 As shown, Figure 11This is a schematic diagram of data interaction within a browser provided in this embodiment of the disclosure. Taking an already opened second tab and a first tab that the user expects to open as examples, it illustrates the data interaction between the memory of different tabs and the local memory shared by the tabs. First, when the already opened second tab is triggered to load, a second identifier value_2 is generated, stored in the memory of the second tab, and written to the local storage in the data format (serverID, value_2). Then, when the user expects to open the first tab, a first identifier value_1 is generated, stored in the memory of the first tab, and written to the local storage in the data format (serverID, value_1), triggering a local storage change event. When the second tab listens to this local storage change event, it rewrites the correspondence between the service identifiers in the local memory according to the second identifier value_2 (serverID, value_2). After writing (serverID, value_1) to local storage for 50ms, the first tab retrieves the service identifier mapping from local storage to obtain the second identifier, value_2. It then compares value_2 with value_1. If they match, it means the service of the second tab is different from the service of the first tab, and the browser can still prevent the opening of tabs different from the first tab based on the (serverID, value_2) stored locally. If they differ, it means the service of the second tab is the same as the first tab, and the browser deletes (serverID, value_1) from local storage, retaining (serverID, value_2). The browser can then prevent the opening of tabs identical to the second tab based on the (serverID, value_2) stored locally.
[0129] In some embodiments, after the second tab detects that the value corresponding to the serverID of the second tab in the local storage has changed and modifies it, it can actively send a broadcast containing the serverID indicating that the tab has been opened repeatedly. After receiving the broadcast, other tabs determine whether their own serverID is the same as the serverID in the broadcast. If they are the same, they will prompt that the tab has been opened repeatedly.
[0130] S22. If a second identifier of a second tab matches the first identifier, stop loading the first tab and control the display to show a prompt message.
[0131] In some embodiments, if a second identifier of a second tab matches the first identifier, the display device sends a blocking message to the server. The blocking message includes the first address of the first tab, which is used to block the server from sending the content of the first tab to the display device. This avoids the display device repeatedly receiving and caching the content of already opened tabs, avoids unnecessary data transmission consumption, saves bandwidth, and better loads the content of the second tab, thereby improving data transmission efficiency.
[0132] S23. If there is no second identifier of the second tab that matches the first identifier, then load the content of the first tab and control the display to show the content of the first tab.
[0133] If no second identifier of the second tab matches the first identifier, it means that there is no tab with the same name as the first tab among the other tabs that the browser has opened, and then continues to receive the content of the first tab from the server for loading and display.
[0134] The above embodiments compare whether the correspondence between service identifiers and tab identifiers in local storage has changed. If the second correspondence between the service identifier and the second identifier changes to the first correspondence between the service identifier and the first identifier, it is determined that the service corresponding to the first tab matches the service corresponding to the second tab, indicating that the second tab, which is the same as the first tab, has been opened. Therefore, loading the content of the first tab is stopped and a prompt message is displayed. If the correspondence between the service identifier and the first identifier has not changed, it is determined that the first tab is a newly opened tab in the browser, which is different from other tabs already opened in the browser. Therefore, loading the content of the first tab continues and the content of the first tab is displayed.
[0135] In summary, this disclosure provides a method for controlling tab access. The method, in response to an access request received through a user input interface, triggers the loading of a first tab based on a first address included in the access request. Then, it compares first indication information of the first tab with second indication information of an already opened second tab. If the first and second indication information match, indicating that the user expects to access the same first tab as the already opened second tab, loading of the first tab is stopped, and a timely notification is displayed on the screen to indicate that the second tab is already open. This avoids business conflicts caused by simultaneously opening duplicate tabs, saves browser space, and improves the user experience.
[0136] This disclosure provides an implementation method for achieving access control between different tabs in different browsers, such as... Figure 12 As shown, Figure 12 A flowchart illustrating a method for controlling access to tabs provided in this embodiment of the disclosure. Figure 5 The method includes steps S1201 to S1206:
[0137] S1201. In response to the access request received through the user input interface, trigger the loading of the first tab page based on the first address.
[0138] S1202. Obtain user login information from at least two browsers.
[0139] The user login information is the information that the user registers and authenticates in the system during registration, including at least one of the following: user identification code (ID), user ID number, and user password.
[0140] S1203. If the user login information of at least two browsers matches, control the first tab to broadcast an inquiry message.
[0141] In some embodiments, if the user login information of at least two browsers matches, an inquiry message is broadcast to at least two browsers through the communication connection between the at least two browsers to inquire whether there is a tab that is the same as the first tab.
[0142] S1204. After receiving the query message on the third tab, compare the third address of the third tab with the first address.
[0143] The third tab is any one of the other tabs that are already open in at least two browsers.
[0144] S1205. If the third address matches the first address, then generate and send a feedback message.
[0145] S1206. After receiving the feedback message, the first tab stops loading and controls the display to show the prompt message.
[0146] It should be noted that the implementation methods of the above steps are the same as or similar to those of steps S601 to S603, and will not be repeated here.
[0147] The above steps, based on the same user login information, use communication connections between different browsers to avoid opening the same tab in different browsers, thereby saving browser resources and making the browser interface simpler. This satisfies users' need to access the first tab while avoiding business anomalies caused by repeatedly opening the same tab. It is suitable for diverse scenarios of interactive live streaming using WebRTC and improves the user experience.
[0148] This disclosure provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described control method for accessing tabs and achieves the same technical effect. To avoid repetition, further details are omitted here.
[0149] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0150] This disclosure provides a computer program product that includes a computer program that, when run on a computer, enables the computer to implement the aforementioned control method for accessing tabs.
[0151] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the discussion in some embodiments above is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of the embodiments suitable for specific application considerations.
Claims
1. A display device, characterized in that, include: The controller is configured to: in a real-time web communication scenario, respond to an access request received through a user input interface, wherein the access request includes a first address, trigger loading of a first tab based on the first address; compare a first indication information of the first tab with a second indication information of an already opened second tab; the indication information is the address of the tab, or an identifier used to indicate the service corresponding to the tab; If the first indication information matches the second indication information, then loading the first tab will stop, and the display will be controlled to show a prompt message, which is used to indicate to the user that the second tab has been opened; The controller is configured to compare the first indication information of the first tab with the second indication information of the already opened second tab, and to listen for local storage change events, wherein the local storage change events indicate a change in the correspondence of service identifiers in local storage; Based on the timestamp corresponding to when the first tab is loaded, generate a first identifier for the first tab, store the first correspondence between the first identifier and the service identifier, and trigger a local storage change event; Obtain the historical correspondence of the service identifier in the local storage; The first correspondence and the second correspondence in the historical correspondence are compared; wherein, the second correspondence is the correspondence between the service identifier and the second identifier of the second tab, and the second identifier is generated according to the timestamp corresponding to the trigger loading of the second tab; if the first correspondence and the second correspondence are different, it is determined that the second identifier matches the first identifier.
2. The display device according to claim 1, characterized in that, The first indication information is the first address, and the second indication information is the second address of the second tab; After the controller triggers the loading of the first tab page based on the first address, it is also configured to: Control the first tab to broadcast an inquiry message, the inquiry message including the first address; After receiving the query message on the second tab, the second address is compared with the first address; If the second address matches the first address, the second tab generates a feedback message and sends it to the first tab. After receiving the feedback message on the first tab, the loading of the first tab is stopped, and the display is controlled to show the prompt information.
3. The display device according to claim 1, characterized in that, The first indication information is a first identifier, and the second indication information is a second identifier. The first identifier is used to indicate the service corresponding to the first tab, and the second identifier is used to indicate the service corresponding to the second tab. The controller, after comparing the first and second correspondences in the historical correspondence, is further configured to: If no second identifier of the second tab matches the first identifier, the content of the first tab is loaded, and the display is controlled to show the content of the first tab.
4. The display device according to claim 1, characterized in that, After determining that a second identifier of a second tab matches the first identifier, the controller is further configured to: Delete the first correspondence between the service identifier and the first identifier in the local storage.
5. The display device according to claim 1, characterized in that, The controller, after controlling the display to show the prompt information, is further configured to: Close the first tab; Jump to the second tab and control the display to show the content of the second tab.
6. The display device according to claim 2, characterized in that, The query message also includes: the page document of the first tab, and / or, page layout information; The controller generates and sends feedback messages, and is configured as follows: After receiving the query message on the already opened second tab, the second address, the page document, and / or the page layout information of the second tab are compared with the first address, the page document, and / or the page layout information of the first tab. If the second address matches the first address, the page document of the second tab matches the page document of the first tab, and the page layout information of the second tab matches the page layout information of the first tab, then the feedback message is generated and sent.
7. The display device according to claim 6, characterized in that, After the controller triggers the loading of the first tab page based on the first address, it is also configured to: A request message is sent to the server so that the server can determine the content of the first tab page based on the first address included in the request message; After generating and sending a feedback message, the controller is further configured to send a blocking message to the server, the blocking message being used to instruct the cessation of sending the content of the first tab.
8. A method for controlling access to tabs, characterized in that, include: In a real-time web communication scenario, in response to an access request received through a user input interface, wherein the access request includes a first address, a first tab is loaded based on the first address. The first indication information of the first tab is compared with the second indication information of the already opened second tab; the indication information is the address of the tab, or an identifier used to indicate the service corresponding to the tab; If the first indication information matches the second indication information, then loading the first tab will stop, and the display will be controlled to show a prompt message, which is used to indicate to the user that the second tab has been opened; The step of comparing the first indication information of the first tab with the second indication information of the already opened second tab includes: listening for a local storage change event, the local storage change event indicating a change in the correspondence between service identifiers in local storage; generating a first identifier for the first tab based on the timestamp corresponding to when the first tab is loaded, storing the first identifier and the first correspondence between the service identifier, and triggering the local storage change event; obtaining the historical correspondence between the service identifiers in the local storage; comparing the first correspondence with a second correspondence in the historical correspondence; wherein the second correspondence is the correspondence between the service identifier and the second identifier of the second tab, the second identifier being generated based on the timestamp corresponding to when the second tab is loaded; if the first correspondence and the second correspondence are different, then determining that the second identifier matches the first identifier.
9. The method according to claim 8, characterized in that, The first indication information is the first address, and the second indication information is the second address of the second tab; after triggering the loading of the first tab based on the first address, the method further includes: Control the first tab to broadcast an inquiry message, the inquiry message including the first address; After receiving the query message, the second tab compares the second address with the first address; if the second address matches the first address, the second tab generates a feedback message and sends it to the first tab. After receiving the feedback message on the first tab, the loading of the first tab is stopped, and the display is controlled to show the prompt information.