Remote browser-based webpage access method and device, medium and electronic equipment
Patent Information
- Application Number
- CN202210913346.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-07-29
AI Technical Summary
但传统的网络安全防范技术无法100%识别互联网风险,导致企业终端感染木马病毒、爬虫病毒、勒索病毒等,企业的敏感数据资产遭到泄露
通过本地浏览器与远程渲染服务器中的远程浏览器建立通信连接,其中,通信连接是基于扩展后的调试协议实现的。通过本地浏览器向远程浏览器发送目标网页中的事件指令,其中,目标网页在本地浏览器中打开。通过本地浏览器接收远程浏览器发送的目标图片,并通过本地浏览器将目标图片在目标网页中进行展示,其中,目标图片是根据事件指令生成的。本方案能够提高远程浏览器在实际应用场景中的可用性。
Smart Images

Figure CN117520006B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, and in particular to a method and apparatus for accessing web pages based on a remote browser, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In today's internet-based office environment, browsers handle the majority of internet request code and content execution. However, traditional cybersecurity technologies cannot identify 100% of internet risks, leading to enterprise terminals being infected with Trojan viruses, web crawlers, ransomware, and other malware, resulting in the leakage of sensitive enterprise data assets.
[0003] Without affecting user experience, "remote browser isolation technology" can be used to transfer the process of executing Internet requests on the user's local browser to a remote cloud space. The execution result is then transmitted from the remote cloud space to the user's local browser as an absolutely secure page mirror. This avoids the risk that hackers may hijack the local browser and launch attacks on the terminal, leading to the leakage of the company's core data assets, due to the user accessing the Internet.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a method and apparatus for accessing web pages based on a remote browser, a computer-readable storage medium and an electronic device, which can at least improve the usability of the remote browser in practical application scenarios to a certain extent.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to a first aspect of this application, a method for accessing a webpage based on a remote browser is provided, applied to a terminal, wherein the terminal is configured with a local browser. The method includes: establishing a communication connection between the local browser and a remote browser in a remote rendering server, wherein the communication connection is implemented based on an extended debugging protocol; sending an event command from a target webpage to the remote browser through the local browser, wherein the target webpage is opened in the local browser; receiving a target image sent by the remote browser through the local browser, and displaying the target image on the target webpage through the local browser, wherein the target image is generated according to the event command.
[0008] In one embodiment of this application, the extended debugging protocol described above is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0009] In one embodiment of this application, the local browser is configured with an extension, and the establishment of a communication connection between the local browser and a remote browser in the remote rendering server includes: terminating the local loading of the target webpage through the extension; sending a startup request to the remote rendering server through the extension, so that the remote rendering server creates the remote browser according to the startup request; receiving remote browser information sent by the remote rendering server through the extension, and establishing a WebSocket communication connection with the remote browser, wherein the remote browser information includes the WebSocket service address of the remote browser.
[0010] In one embodiment of this application, the local browser is configured with an extension. Before sending the event instruction from the target webpage to the remote browser through the local browser, the method further includes: sending an instruction to open the target webpage address to the remote browser through the extension, so that the remote browser opens the target webpage and executes the event instruction according to the instruction to open the target webpage address, thereby updating the page content of the target webpage of the remote browser and generating the target image according to the updated page content.
[0011] In one embodiment of this application, the local browser is configured with an extension, and the method further includes: sending a page instruction to the remote browser through the extension, so that the remote browser executes the page instruction, wherein the page instruction includes a page close instruction, a page open instruction, and a page activation instruction.
[0012] According to a second aspect of this application, a method for accessing a webpage based on a remote browser is provided, applied to a remote rendering server, wherein the remote rendering server is configured with a remote browser. The method includes: establishing a communication connection between the remote browser and a local browser in a terminal, wherein the communication connection is implemented based on an extended debugging protocol; receiving an event command from a target webpage sent by the local browser through the remote browser, wherein the target webpage is opened in the local browser; executing the event command in the remote browser and generating a target image according to the event command; and sending the target image to the local browser through the remote browser, so that the extension program displays the target image on the target webpage.
[0013] In one embodiment of this application, the extended debugging protocol described above is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0014] In one embodiment of this application, the local browser is configured with an extension, and the establishment of a communication connection between the local browser on the terminal and the remote browser includes: receiving a startup request sent by the extension and creating the remote browser according to the startup request; sending the remote browser information to the extension so that the extension receives the remote browser information and establishes a WebSocket communication connection with the remote browser, wherein the remote browser information includes the WebSocket service address of the remote browser.
[0015] In one embodiment of this application, the local browser is configured with an extension. Before receiving the event instruction from the target webpage sent by the local browser through the remote browser, the method further includes: receiving an instruction to open the target webpage address sent by the extension through the remote browser; opening the target webpage in the remote browser according to the instruction to open the target webpage address; executing the event instruction in the remote browser and generating the target image according to the event instruction includes: executing the event instruction in the target webpage of the remote browser to update the page content of the target webpage of the remote browser, and generating the target image according to the updated page content.
[0016] In one embodiment of this application, the local browser is configured with an extension, and the method further includes: receiving page instructions sent by the extension through the remote browser, wherein the page instructions include a page close instruction, a page open instruction, and a page activation instruction; and executing the page instructions in the remote browser.
[0017] According to a third aspect of this application, a webpage access device based on a remote browser is provided, configured in a terminal, wherein the terminal is equipped with a local browser. The device includes: a first connection module, configured to: establish a communication connection with a remote browser in a remote rendering server through the local browser, wherein the communication connection is implemented based on an extended debugging protocol; an event instruction sending module, configured to: send event instructions from a target webpage to the remote browser through the local browser, wherein the target webpage is opened in the local browser; and a target image receiving module, configured to: receive a target image sent by the remote browser through the local browser, and display the target image on the target webpage through the local browser, wherein the target image is generated according to the event instructions.
[0018] According to a fourth aspect of this application, a webpage access device based on a remote browser is provided, configured in a remote rendering server, wherein the remote rendering server is equipped with a remote browser. The device includes: a second connection module, configured to: establish a communication connection between the remote browser and a local browser in a terminal, wherein the communication connection is based on an extended debugging protocol; an event instruction receiving module, configured to: receive event instructions from a target webpage sent by the local browser through the remote browser, wherein the target webpage is opened in the local browser; a generation module, configured to: execute the event instructions in the remote browser and generate a target image according to the event instructions; and a target image sending module, configured to: send the target image to the local browser through the remote browser, so that the extension program displays the target image on the target webpage.
[0019] According to a fifth aspect of this application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the web page access method based on a remote browser as described in the first aspect, or to implement the web page access method based on a remote browser as described in the second aspect.
[0020] According to a sixth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the web page access method based on a remote browser as described in the first aspect, or implements the web page access method based on a remote browser as described in the second aspect.
[0021] The webpage access method and apparatus, computer storage medium and electronic device based on a remote browser provided in the embodiments of this application have the following technical effects: This solution establishes a communication connection between the local browser and a remote browser on a remote rendering server, based on an extended debugging protocol. The local browser sends event commands from the target webpage to the remote browser, which is then opened in the local browser. The local browser receives the target image sent by the remote browser and displays it on the target webpage; the target image is generated based on the event commands. This approach improves the usability of the remote browser in practical application scenarios.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0024] Figure 1 The flowchart illustrating an exemplary embodiment of the webpage access method based on a remote browser provided in this application is shown in the illustration. Figure 2 A schematic diagram of a local browser page provided in an exemplary embodiment of this application is shown; Figure 3 The illustration schematically shows a flowchart of establishing a WebSocket communication connection provided by an exemplary embodiment of this application; Figure 4 This illustration shows a schematic diagram of displaying an input method on a target webpage according to an exemplary embodiment of this application; Figure 5 This illustration shows a schematic diagram of displaying a right-click menu on a target webpage according to an embodiment of this application; Figure 6 This illustration shows a schematic diagram of displaying a system pop-up window on a target webpage according to an embodiment of this application; Figure 7 The diagram illustrates the structure of a web page access device based on a remote browser according to an embodiment of this application. Figure 8 This schematic diagram illustrates the structure of a web page access device based on a remote browser according to another embodiment of this application; Figure 9 The diagram illustrates the structure of a web page access device based on a remote browser according to another embodiment of this application. Figure 10 The diagram illustrates the structure of a web page access device based on a remote browser according to another embodiment of this application. Figure 11 A block diagram of an electronic device provided in one embodiment of this application is shown schematically. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0026] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0028] This application proposes a method and apparatus for accessing web pages based on a remote browser, as well as a computer storage medium and an electronic device, to improve the usability of the remote browser in practical application scenarios and the user experience.
[0029] The following will describe in more detail each step of the webpage access method based on a remote browser in this exemplary embodiment, with reference to the accompanying drawings and embodiments.
[0030] in, Figure 1 The diagram schematically illustrates the interaction of a webpage access method based on a remote browser according to an exemplary embodiment of this application. The following describes... Figure 1 The embodiments shown will be described in detail.
[0031] In an exemplary embodiment, such as Figure 1 As shown, the remote rendering service is first deployed on a remote server, and the extension is configured in the user's local browser. (Reference) Figure 2 The diagram shown is an illustration of a local browser page, as follows: Figure 2 The local browser shown has an extension enabled for Remote Browser Isolation (RBI). This extension can listen for events such as page opening, closing, and activation (page activation means the user is browsing the page) in the local browser, as well as mouse and keyboard events on the page, and can communicate with a remote rendering service via an HTTP interface.
[0032] In an exemplary embodiment, such as Figure 1As shown, the next step is to execute step S11: establish a WebSocket communication connection between the remote server and the terminal. One specific implementation of step S11 is as follows: Figure 3 The illustration shows a flowchart of establishing a WebSocket communication connection according to an exemplary embodiment of this application, with the terminal as the executing entity. The following... Figure 3 The embodiments shown are described in detail below. Please refer to the following: Figure 3 .
[0033] S310 terminates the local loading of the target webpage via an extension.
[0034] S320 sends a startup request to a remote rendering server via an extension, so that the remote rendering server can create a remote browser based on the startup request.
[0035] In an exemplary embodiment, when a user opens an address of a target webpage that requires remote access in their local browser, the aforementioned extension terminates the local loading of the target webpage and uses the user information from the local browser as a request parameter in the startup request. This user information includes the identity information used by the user when logging into the local browser, such as user ID, login credentials, etc. After sending the startup request to the remote rendering service, the extension waits for a response.
[0036] S330 receives remote browser information sent by the remote rendering server through an extension program and establishes a WebSocket communication connection with the remote browser. The remote browser information includes the WebSocket service address of the remote browser.
[0037] In an exemplary embodiment, after receiving a startup request from the terminal's extension, the remote rendering service creates a remote browser on a remote server and returns the remote browser information to the terminal, including the remote browser's WebSocket service address.
[0038] In an exemplary embodiment, after receiving information from the remote browser, the extension establishes a WebSocket communication connection with the remote browser and sends an instruction to open the target webpage address to the remote browser in the WebSocket message channel. Upon receiving the instruction to open the target webpage address, the remote browser opens the target webpage.
[0039] In an exemplary embodiment, this application implements WebSocket communication connections based on the extended Chrome-DevTools Protocol (CDP). The extensions to the Chrome-DevTools Protocol include the browser and page components, thereby enabling features not supported by the original protocol, such as multi-tab management, right-click menus, system pop-ups, local file uploads, file downloads, and local input methods.
[0040] In the exemplary embodiments, reference continues to be made to... Figure 1 When a user operates on a target webpage using external devices such as a mouse and keyboard in the local browser of the terminal, the extension in the local browser will intercept the corresponding events (mouse events, keyboard events, etc.) and execute step S12: send the event instructions in the target webpage to the remote browser through the WebSocket message channel.
[0041] In the exemplary embodiments, reference continues to be made to... Figure 1 Next, the remote browser executes step S13: receiving and executing the event command, and generating the target image according to the event command. After receiving the above event command, the remote browser will execute the above event command in the target webpage it has opened, to trigger the page content update of the target webpage in the remote browser, and generate the corresponding target image according to each page content change. After the remote browser generates the target image, it will execute step S14: sending the target image to the extension through the WebSocket message channel. And the extension executes step S15: receiving the target image and displaying the target image in the target webpage to complete the rendering of the target webpage. In other words, the event command is executed in the remote browser, while the local browser displays the mirror image corresponding to the result of the event command execution, thereby avoiding the risks of hacker hijacking and virus infection faced by the local browser when accessing the Internet.
[0042] In an exemplary embodiment, reference is made to Figure 4 The diagram illustrates how an input method is displayed on a target webpage. For example, as shown... Figure 4As shown, when a user types Chinese text in the search box of their local browser using an external device such as a keyboard, for example, if the user types "shu'ru" consecutively, the extension intercepts the corresponding keyboard event with each keystroke and sends the keyboard event instruction to a remote browser via a WebSocket message channel. The remote browser then executes the keyboard event instruction. For example, if the user finally types "u", the extension will intercept the keyboard event instruction and send it to the remote browser. The remote browser then executes the keyboard event instruction on its target webpage and generates the target image based on the executed instruction. Figure 4 The page content is then processed. Finally, the target image is sent to the extension, which then displays the target image on the target webpage.
[0043] In an exemplary embodiment, reference is made to Figure 5 The diagram illustrates how a right-click menu is displayed on a target webpage. For example, as shown... Figure 5 As shown, when a user right-clicks on an external device such as a mouse or touchpad on a target webpage in their local browser, the extension intercepts the mouse event and sends the event command to a remote browser. The remote browser then executes the mouse event command, and the result is the generated... Figure 5 The right-click menu shown. The remote browser generates the target image based on the target webpage after executing the command, i.e. Figure 5 The page content is processed, and the target image is sent to the extension, which then displays the target image on the target webpage.
[0044] In an exemplary embodiment, reference is made to Figure 6 The diagram illustrates the display of a system pop-up window on the target webpage. For example, as shown... Figure 6 As shown, when a user performs keyboard or mouse actions on a target webpage in their local browser, the extension intercepts these events and sends the corresponding event commands to the remote browser. The remote browser then executes these event commands, triggering... Figure 6 As shown in the system pop-up window, the remote browser then generates the target image based on the target webpage after executing the command. Figure 6 The page content is processed, and the target image is sent to the extension, which then displays the target image on the target webpage.
[0045] In an exemplary embodiment, when a user performs operations on multiple target web pages (i.e., multiple tabs) in a local browser (including operations such as opening, closing, and activating target web pages), the extension will send the corresponding page instructions to the remote browser through the aforementioned WebSocket message channel to ensure that the tab states of the remote browser and the local browser are synchronized.
[0046] For example, suppose a user opens three tabs—target webpage A, target webpage B, and target webpage C—in their local browser and remains on target webpage C (i.e., target webpage C is active, while target webpages A and B are inactive). The extension will then send the instructions to open the target webpage and activate target webpage C to the remote browser, making the tab state in the remote browser identical to that in the local browser. For example, if the user enters target webpage B (i.e., target webpage B is active while the other two are inactive), the extension will send the instructions to activate target webpage B to the remote browser, making target webpage B active in the remote browser as well. For example, if the user closes target webpage A, the extension will send the instructions to close target webpage A to the remote browser, closing target webpage A in the remote browser as well.
[0047] In the exemplary embodiments, it is understood that the browser pages and related screenshots provided in this application are merely examples.
[0048] The webpage access method based on a remote browser provided in this application enables the remote browser to support functions such as multi-tab management, right-click menus, system pop-ups, local file upload, file download, and local input methods. By transmitting a generated mirror image to the local browser via the remote browser, the risk of enterprise terminals being infected with Trojan viruses, web crawlers, ransomware, etc., due to user internet access, as well as the risk of hackers hijacking the local browser to launch attacks on the terminal, leading to the leakage of the enterprise's core data assets, can be avoided.
[0049] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0050] in, Figure 7 A structural diagram of a web page access device based on a remote browser, configured on a terminal, is shown in an exemplary embodiment of this application.
[0051] The web page access device 700 based on a remote browser in this embodiment includes: a first connection module 710, an event command sending module 720, and a target image receiving module 730. A local browser is configured in the terminal. The first connection module 710 is used to: establish a communication connection between a local browser and a remote browser in a remote rendering server, wherein the communication connection is based on an extended debugging protocol.
[0052] The event instruction sending module 720 is used to send event instructions from a target webpage to a remote browser via a local browser, wherein the target webpage is opened in the local browser.
[0053] The target image receiving module 730 is used to: receive a target image sent by a remote browser through a local browser, and display the target image on a target webpage through the local browser, wherein the target image is generated according to an event instruction.
[0054] Figure 8 A structural diagram of a web page access device based on a remote browser, configured on a terminal, is shown according to another exemplary embodiment of this application.
[0055] In an exemplary embodiment, based on the foregoing scheme, the extended debugging protocol is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0056] In an exemplary embodiment, based on the foregoing scheme, an extension is configured in the local browser.
[0057] The aforementioned first connection module 710 includes: a termination unit 7101, a startup request sending unit 7102, and a remote browser information receiving unit 7103. The termination unit 7101 is used to: terminate the local loading of the target webpage through an extension; the startup request sending unit 7102 is used to: send a startup request to a remote rendering server through an extension, so that the remote rendering server creates a remote browser based on the startup request; the remote browser information receiving unit 7103 is used to: receive remote browser information sent by the remote rendering server through an extension, and establish a WebSocket communication connection with the remote browser, wherein the remote browser information includes the remote browser's WebSocket service address.
[0058] The aforementioned device also includes: an address instruction sending module 740.
[0059] Before the event instruction sending module 720 sends the event instruction from the target webpage to the remote browser via the local browser, the open address instruction sending unit 740 is used to: send an instruction to open the target webpage address to the remote browser via an extension, so that the remote browser opens the target webpage and executes the event instruction according to the instruction to open the target webpage address, thereby updating the page content of the target webpage in the remote browser, and generating the target image based on the updated page content.
[0060] The aforementioned device also includes: a page instruction sending module 750.
[0061] The aforementioned page instruction sending module 750 is used to: send page instructions to a remote browser through an extension, so that the remote browser executes the page instructions, wherein the page instructions include page close instructions, page open instructions, and page activation instructions.
[0062] Figure 9 A structural diagram of a web page access device based on a remote browser, configured on a remote rendering server, is shown in another exemplary embodiment of this application.
[0063] The web page access device 900 based on a remote browser in this embodiment includes: a second connection module 910, an event instruction receiving module 920, a generation module 930, and a target image sending module 940. A remote rendering server is configured with a remote browser, wherein: The second connection module 910 is used to: establish a communication connection between a remote browser and a local browser in a terminal, wherein the communication connection is based on an extended debugging protocol.
[0064] The event instruction receiving module 920 is used to receive event instructions from a target webpage sent by a local browser via a remote browser, wherein the target webpage is opened in the local browser.
[0065] Module 930 is used to: execute event commands in a remote browser and generate a target image based on the event commands.
[0066] The target image sending module 940 is used to send a target image to a local browser via a remote browser, so that the extension can display the target image on the target webpage.
[0067] Figure 10 A structural diagram of a web page access device based on a remote browser, configured on a remote rendering server, is shown in yet another exemplary embodiment of this application.
[0068] In an exemplary embodiment, based on the foregoing scheme, the extended debugging protocol is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0069] In an exemplary embodiment, based on the foregoing scheme, an extension is configured in the local browser.
[0070] The second connection module 910 includes: a startup request receiving unit 9101 and a remote browser information sending unit 9102. The startup request receiving unit 9101 is used to: receive a startup request sent by the extension and create a remote browser based on the startup request; the remote browser information sending unit 9102 is used to: send remote browser information to the extension, so that the extension receives the remote browser information and establishes a WebSocket communication connection with the remote browser, wherein the remote browser information includes the WebSocket service address of the remote browser.
[0071] The aforementioned device also includes: an address instruction receiving module 950 and a target webpage opening module 960.
[0072] Before the event instruction receiving module 920 receives the event instruction from the target webpage sent by the local browser through the remote browser, the open address instruction receiving module 950 is used to: receive the instruction to open the target webpage address sent by the extension through the remote browser; the target webpage opening module 960 is used to: open the target webpage in the remote browser according to the instruction to open the target webpage address.
[0073] The aforementioned generation module 930 includes an event instruction execution unit 9301. The event instruction execution unit 9301 is used to: execute event instructions in the target webpage of the remote browser to update the page content of the target webpage, and generate a target image based on the updated page content.
[0074] The above-mentioned device also includes: a page instruction receiving module 970 and a page instruction execution module 980.
[0075] The aforementioned page instruction receiving module 970 is used to: receive page instructions sent by extensions through a remote browser, wherein the page instructions include page close instructions, page open instructions, and page activation instructions; the aforementioned page instruction execution module 980 is used to: execute page instructions in the remote browser.
[0076] It should be noted that the web page access device based on a remote browser provided in the above embodiments is only illustrated by the division of the above functional modules when executing the web page access method based on a remote browser. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the web page access device based on a remote browser provided in the above embodiments and the web page access method based on a remote browser are based on the same concept. Therefore, for details not disclosed in the device embodiments of this application, please refer to the above embodiments of the web page access method based on a remote browser of this application, which will not be repeated here.
[0077] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0078] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described in the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0079] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0080] Figure 11 This diagram schematically illustrates the structure of an electronic device according to an exemplary embodiment of this application. Please refer to... Figure 11 As shown, the electronic device 1100 includes a processor 1101 and a memory 1102.
[0081] In this embodiment, processor 1101 is the control center of the computer system, and can be a processor of a physical machine or a processor of a virtual machine. Processor 1101 may include one or more processing cores, such as a 4-core processor or an 8-core processor. Processor 1101 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1101 may also include a main processor and a coprocessor. The main processor is used to process data in the wake-up state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor used to process data in the standby state.
[0082] In this embodiment of the application, the processor 1101 is specifically used for: A communication connection is established between the local browser and the remote browser on the remote rendering server, wherein the communication connection is based on an extended debugging protocol; the local browser sends event commands from the target webpage to the remote browser, wherein the target webpage is opened in the local browser; the local browser receives the target image sent by the remote browser and displays the target image on the target webpage, wherein the target image is generated according to the event commands.
[0083] Furthermore, in one embodiment of this application, the extended debugging protocol described above is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0084] Optionally, the local browser is configured with an extension, and the establishment of a communication connection between the local browser and the remote browser in the remote rendering server includes: terminating the local loading of the target webpage through the extension; sending a startup request to the remote rendering server through the extension, so that the remote rendering server creates the remote browser according to the startup request; receiving remote browser information sent by the remote rendering server through the extension, and establishing a WebSocket communication connection with the remote browser, wherein the remote browser information includes the WebSocket service address of the remote browser.
[0085] Optionally, the local browser is configured with an extension, which, before sending the event instructions from the target webpage to the remote browser via the local browser, further includes: sending an instruction to open the target webpage address to the remote browser via the extension, so that the remote browser opens the target webpage and executes the event instructions according to the instruction to open the target webpage address, thereby updating the page content of the target webpage in the remote browser, and generating the target image based on the updated page content.
[0086] Optionally, the local browser is configured with an extension, and the browser further includes: sending page instructions to the remote browser through the extension so that the remote browser executes the page instructions, wherein the page instructions include page close instructions, page open instructions, and page activation instructions.
[0087] The aforementioned processor 1101 is also specifically used for: A communication connection is established between the remote browser and the local browser on the terminal, wherein the communication connection is based on an extended debugging protocol; the remote browser receives event commands from the target webpage sent by the local browser, wherein the target webpage is opened in the local browser; the remote browser executes the event commands and generates a target image based on the event commands; the remote browser sends the target image to the local browser so that the extension displays the target image on the target webpage.
[0088] Furthermore, in one embodiment of this application, the extended debugging protocol described above is obtained by extending at least the browser portion and the page portion of the Chrome-DevTools protocol.
[0089] Optionally, the local browser is configured with an extension. The above-mentioned establishment of a communication connection between the remote browser and the local browser in the terminal includes: receiving a startup request sent by the extension and creating the remote browser according to the startup request; sending the remote browser information to the extension so that the extension receives the remote browser information and establishes a WebSocket communication connection with the remote browser, wherein the remote browser information includes the WebSocket service address of the remote browser.
[0090] Optionally, the local browser is configured with an extension, and before receiving the event command from the target webpage sent by the local browser through the remote browser, the method further includes: receiving an instruction from the extension to open the target webpage address through the remote browser; opening the target webpage in the remote browser according to the instruction to open the target webpage address; executing the event command in the remote browser and generating the target image according to the event command, which includes: executing the event command in the target webpage of the remote browser to update the page content of the target webpage of the remote browser, and generating the target image according to the updated page content.
[0091] Optionally, the local browser is configured with an extension, and the browser further includes: receiving page instructions sent by the extension through the remote browser, wherein the page instructions include page close instructions, page open instructions, and page activation instructions; and executing the page instructions in the remote browser.
[0092] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage terminals or flash memory terminals. In some embodiments of this application, the non-transitory computer-readable storage media in the memory 1102 are used to store at least one instruction, which is executed by the processor 1101 to implement the methods in the embodiments of this application.
[0093] In some embodiments, the electronic device 1100 further includes a peripheral device interface 1103 and at least one peripheral device. The processor 1101, memory 1102, and peripheral device interface 1103 can be connected via a bus or signal line. Various peripheral terminals can be connected to the peripheral device interface 1103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a display screen 1104, a camera 1105, and an audio circuit 1106.
[0094] Peripheral device interface 1103 can be used to connect at least one input / output (I / O) related peripheral device to processor 1101 and memory 1102. In some embodiments of this application, processor 1101, memory 1102, and peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments of this application, any one or two of processor 1101, memory 1102, and peripheral device interface 1103 can be implemented on separate chips or circuit boards. This application does not specifically limit the implementation in this regard.
[0095] The audio circuit 1104 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 1101 for processing. For stereo sound acquisition or noise reduction purposes, there may be multiple microphones, each located in a different part of the electronic device 1100. The microphone may also be an array microphone or an omnidirectional microphone.
[0096] Power supply 1107 is used to supply power to various components in electronic device 1100. Power supply 1107 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 1107 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0097] The terminal structure block diagram shown in the embodiments of this application does not constitute a limitation on the electronic device 1100. The electronic device 1100 may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0098] In this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or order; the term "multiple" refers to two or more unless otherwise expressly defined. The terms "install," "connect," "link," "fix," etc., should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0099] In the description of this application, it should be understood that the terms "upper" and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0100] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, equivalent variations made in accordance with the claims of this application still fall within the scope of this application.
Claims
1. A webpage access method based on a remote browser, applied to a terminal, wherein the terminal is configured with a local browser, characterized in that, include: A communication connection is established between the local browser and the remote browser in the remote rendering server, wherein the communication connection is based on an extended debugging protocol; The local browser sends event commands from the target webpage to the remote browser, wherein the target webpage is opened in the local browser; The local browser receives the target image sent by the remote browser and displays the target image on the target webpage, wherein the target image is generated according to the event instruction. The extended debugging protocol is obtained by extending at least the browser and page parts of the Chrome-DevTools protocol; The local browser is configured with an extension, and the process of establishing a communication connection between the local browser and the remote browser on the remote rendering server includes: The extension terminates the local loading of the target webpage and uses the user information in the local browser as the request parameter for the startup request. The extension sends a startup request to the remote rendering server, so that the remote rendering server creates the remote browser based on the startup request. The extension receives remote browser information sent by the remote rendering server and establishes a WebSocket communication connection with the remote browser to send an instruction to open the target webpage address to the remote browser in the WebSocket message channel. The remote browser information includes the WebSocket service address of the remote browser.
2. The method for accessing web pages using a remote browser according to any one of claims 1, characterized in that, The local browser is configured with an extension, and before sending event instructions from the target webpage to the remote browser through the local browser, the method further includes: The extension sends an instruction to the remote browser to open the target webpage address, so that the remote browser opens the target webpage and executes the event instruction to update the page content of the target webpage in the remote browser, and generates the target image based on the updated page content.
3. The method for accessing web pages using a remote browser according to any one of claims 1, characterized in that, The local browser is configured with an extension, and the method further includes: The extension sends page commands to the remote browser so that the remote browser executes the page commands, wherein the page commands include page close commands, page open commands, and page activation commands.
4. A webpage access method based on a remote browser, applied to a remote rendering server, wherein the remote rendering server is configured with a remote browser, characterized in that, include: A communication connection is established between the remote browser and the local browser in the terminal, wherein the communication connection is based on an extended debugging protocol; The remote browser receives event commands from a target webpage sent by the local browser, wherein the target webpage is opened in the local browser; The event command is executed in the remote browser, and the target image is generated according to the event command; The target image is sent from the remote browser to the local browser so that the extension displays the target image on the target webpage. The extended debugging protocol is obtained by extending at least the browser and page parts of the Chrome-DevTools protocol; The local browser is configured with extensions, and the process of establishing a communication connection between the remote browser and the local browser on the terminal includes: The extension receives a startup request sent by the extension and creates the remote browser according to the startup request. The extension uses the user information in the local browser as the request parameter of the startup request. The remote browser information is sent to the extension so that the extension receives the remote browser information and establishes a WebSocket communication connection with the remote browser, and sends an instruction to open the target webpage address to the remote browser in the WebSocket message channel, wherein the remote browser information includes the remote browser's WebSocket service address.
5. The method for accessing web pages using a remote browser according to any one of claims 4, characterized in that, The local browser is configured with an extension, and before receiving event instructions from the target webpage sent by the local browser through the remote browser, the method further includes: The remote browser receives the instruction from the extension to open the target webpage address; According to the instruction to open the target webpage address, the target webpage is opened in the remote browser; The step of executing the event command in the remote browser and generating the target image according to the event command includes: The event instruction is executed on the target webpage of the remote browser to update the page content of the target webpage of the remote browser, and the target image is generated based on the updated page content.
6. The method for accessing web pages using a remote browser according to any one of claims 4, characterized in that, The local browser is configured with an extension, and the method further includes: The remote browser receives page commands sent by the extension, including page close commands, page open commands, and page activation commands. The page instructions are executed in the remote browser.
7. A webpage access device based on a remote browser, configured in a terminal, wherein the terminal is equipped with a local browser, characterized in that, include: The first connection module is used to: establish a communication connection between the local browser and a remote browser in the remote rendering server, wherein the communication connection is based on an extended debugging protocol; An event command sending module is used to: send event commands from a target webpage to a remote browser via the local browser, wherein the target webpage is opened in the local browser; The target image receiving module is configured to: receive a target image sent by the remote browser through the local browser, and display the target image on the target webpage through the local browser, wherein the target image is generated according to the event instruction; The extended debugging protocol is obtained by extending at least the browser and page parts of the Chrome-DevTools protocol; The local browser is configured with an extension, and the first connection module includes: The termination unit is used to: terminate the local loading of the target webpage through the extension, and use the user information in the local browser as the request parameter of the start request; The startup request sending unit is used to: send a startup request to the remote rendering server via an extension, so that the remote rendering server creates a remote browser based on the startup request; The remote browser information receiving unit is used to: receive remote browser information sent by the remote rendering server through an extension, and establish a WebSocket communication connection with the remote browser to send an instruction to open the target webpage address to the remote browser in the WebSocket message channel, wherein the remote browser information includes the WebSocket service address of the remote browser.
8. A webpage access device based on a remote browser, configured on a remote rendering server, wherein the remote rendering server is equipped with a remote browser, characterized in that, include: The second connection module is used to: establish a communication connection between the remote browser and the local browser in the terminal, wherein the communication connection is based on an extended debugging protocol; An event instruction receiving module is configured to: receive event instructions from a target webpage sent by the local browser through the remote browser, wherein the target webpage is opened in the local browser; A generation module is configured to: execute the event command in the remote browser and generate a target image based on the event command; The target image sending module is used to: send the target image to the local browser through the remote browser, so that the extension program can display the target image on the target webpage; The extended debugging protocol is obtained by extending at least the browser and page parts of the Chrome-DevTools protocol; The local browser is configured with an extension, and the second connection module includes: The startup request receiving unit is used to: receive a startup request sent by the extension, and create a remote browser according to the startup request, wherein the extension uses user information in the local browser as the request parameter of the startup request; The remote browser information sending unit is used to: send remote browser information to the extension, so that the extension receives the remote browser information and establishes a WebSocket communication connection with the remote browser, and sends an instruction to the remote browser to open the target webpage address in the WebSocket message channel, wherein the remote browser information includes the WebSocket service address of the remote browser.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the web page access method based on a remote browser as described in any one of claims 1 to 3; And to implement the web page access method based on a remote browser as described in any one of claims 4 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the web page access method based on a remote browser as described in any one of claims 1 to 3; And to implement the web page access method based on a remote browser as described in any one of claims 4 to 6.
Citation Information
Patent Citations
Method, system, device and medium for capturing dynamic page
CN109471979A
Method for realizing high-speed rendering in remote browser system
CN112836161A
Cloud-based web content processing system providing client threat isolation and data integrity
US20200314121A1