Rendering server, web page rendering method and device
By using multiple virtual machines running different browser kernels on the rendering server to receive and parse web page data and send it to the browser for display, the problem of web pages failing to display due to incompatibility between the browser kernel and the operating system is solved, and cross-platform web page rendering capability is achieved.
Patent Information
- Application Number
- CN202111677208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The rendering capability of a browser kernel is related to the operating system of the terminal device running the browser. When the webpage to be rendered requires a specific browser kernel that the terminal device does not support, the browser will be unable to load and display the webpage.
A rendering server is provided, which contains multiple virtual machines, each running a different browser kernel. It receives web page data from the browser's URL request, selects the appropriate virtual machine for parsing and rendering, and sends the rendering result to the browser for display.
It enables web page content to be displayed even when the browser lacks rendering capabilities, thus solving the problem of incompatibility between the browser kernel and the operating system.
Smart Images

Figure CN114329281B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of browser technology, and in particular to a rendering server, web page rendering method and apparatus. Background Technology
[0002] The most important part of a browser is its engine. The browser engine is responsible for parsing and rendering the webpage data to display the webpage's content.
[0003] However, the rendering capability of a browser kernel is related to the operating system of the terminal device running the browser. When a webpage to be rendered requires a specific browser kernel, and the operating system of the terminal device running the browser does not support that specific browser kernel, then the browser on the terminal device will be unable to load and display the webpage. Summary of the Invention
[0004] This application provides a rendering server, a webpage rendering method, and an apparatus. The main purpose is to render the webpage by a rendering server when the browser does not have the ability to render the webpage, thereby enabling the browser to load and display the webpage content of the webpage to be rendered.
[0005] To address the aforementioned technical problems, this application provides the following technical solutions:
[0006] In a first aspect, this application provides a rendering server, including: multiple virtual machines, a receiving unit, a requesting unit, a selecting unit, and a sending unit;
[0007] Each of the virtual machines runs a browser kernel, and the browser kernels running in any two of the virtual machines are different.
[0008] The receiving unit is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser;
[0009] The request unit is used to request web page data corresponding to the first web page to be rendered from the first web page server according to the URL corresponding to the first web page to be rendered, wherein the first web page server is a web page server that stores the web page data corresponding to the first web page to be rendered.
[0010] The selection unit is used to select a first target virtual machine from among the multiple virtual machines according to the URL corresponding to the first webpage to be rendered;
[0011] The first target virtual machine is used to parse and render the web page data corresponding to the first web page to be rendered based on its own running browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0012] The sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0013] Optionally, the rendering server further includes: a preset data table;
[0014] The preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name;
[0015] The selection unit is specifically used to extract the domain name corresponding to the first webpage to be rendered from the URL corresponding to the first webpage to be rendered; to look up the unique identifier of the browser kernel corresponding to the first webpage to be rendered in the preset data table according to the domain name; and to determine the virtual machine running the browser kernel corresponding to the unique identifier of the browser kernel as the first target virtual machine.
[0016] Optionally, the rendering server further includes: an operation unit and a determination unit;
[0017] The receiving unit is also used to receive operation behavior data sent by the target browser;
[0018] The operation unit is used to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data, so as to obtain the operation result.
[0019] The determining unit is used to determine the URL corresponding to the second webpage to be rendered based on the operation result.
[0020] The request unit is further configured to request webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered;
[0021] The selection unit is further configured to select a second target virtual machine from among the multiple virtual machines based on the URL corresponding to the second webpage to be rendered;
[0022] The second target virtual machine is used to parse and render the web page data corresponding to the second web page to be rendered based on its own running browser kernel, so as to obtain the rendered web page content corresponding to the second web page to be rendered.
[0023] The sending unit is further configured to send the rendered webpage content corresponding to the second webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0024] Secondly, this application also provides a webpage rendering method, which is applied to the rendering server described in the first aspect, comprising:
[0025] Receive the URL of the first webpage to be rendered sent by the target browser;
[0026] The first webpage requests webpage data corresponding to the first webpage to be rendered from the first webpage according to the URL corresponding to the first webpage to be rendered, wherein the first webpage is a webpage server that stores the webpage data corresponding to the first webpage to be rendered.
[0027] Select the first browser engine based on the URL corresponding to the first webpage to be rendered;
[0028] Based on the first browser kernel, the web page data corresponding to the first web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the first web page to be rendered.
[0029] The rendered webpage content corresponding to the first webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0030] Optionally, selecting the first browser engine based on the URL corresponding to the first webpage to be rendered includes:
[0031] Obtain a preset data table, wherein the preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name;
[0032] Extract the domain name corresponding to the first webpage to be rendered from the URL of the first webpage to be rendered;
[0033] Based on the domain name, search the preset data table for the unique browser kernel identifier corresponding to the first webpage to be rendered;
[0034] The browser kernel corresponding to the unique identifier of the browser kernel is determined as the first browser kernel.
[0035] Optionally, the first browser kernel runs in the target virtual machine in the rendering server; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes:
[0036] The webpage data corresponding to the first webpage to be rendered is sent to the target virtual machine, so that the target virtual machine can parse and render the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0037] Receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the target virtual machine.
[0038] Optionally, the first browser kernel runs on other servers within the server cluster where the rendering server is located; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes:
[0039] The webpage data corresponding to the first webpage to be rendered is sent to the other server, so that the other server can parse and render the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0040] Receive the rendered webpage content corresponding to the first webpage to be rendered from the feedback of the other servers.
[0041] Optionally, after sending the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, the method further includes:
[0042] Receive operation behavior data sent by the target browser;
[0043] Based on the operation behavior data, perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered, so as to obtain the operation result;
[0044] The URL corresponding to the second webpage to be rendered is determined based on the operation result;
[0045] Request the webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered;
[0046] Select the second browser engine based on the URL corresponding to the second webpage to be rendered;
[0047] Based on the second browser kernel, the web page data corresponding to the second web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the second web page to be rendered.
[0048] The rendered webpage content corresponding to the second webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0049] Thirdly, this application also provides a web page rendering apparatus, comprising:
[0050] The first receiving unit is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser.
[0051] The first request unit is configured to request webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL corresponding to the first webpage to be rendered, wherein the first webpage server is a webpage server that stores the webpage data corresponding to the first webpage to be rendered.
[0052] The first selection unit is used to select a first browser kernel based on the URL corresponding to the first webpage to be rendered.
[0053] The first rendering unit is used to parse and render the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0054] The first sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0055] Optionally, the first selection unit includes:
[0056] The acquisition module is used to acquire a preset data table, wherein the preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name;
[0057] The extraction module is used to extract the domain name corresponding to the first webpage to be rendered from the URL corresponding to the first webpage to be rendered;
[0058] The lookup module is used to look up the browser kernel unique identifier corresponding to the first webpage to be rendered in the preset data table based on the domain name.
[0059] The determination module is used to determine the browser kernel corresponding to the unique identifier of the browser kernel as the first browser kernel.
[0060] Optionally, the first browser kernel runs in the target virtual machine in the rendering server; the first rendering unit includes:
[0061] The first sending module is used to send the web page data corresponding to the first web page to be rendered to the target virtual machine, so that the target virtual machine performs parsing and rendering processing on the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0062] The first receiving module is used to receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the target virtual machine.
[0063] Optionally, the first browser kernel runs on other servers within the server cluster where the rendering server is located; the first rendering unit includes:
[0064] The second sending module is used to send the web page data corresponding to the first web page to be rendered to the other server, so that the other server can perform parsing and rendering processing on the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0065] The second receiving module is used to receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the other servers.
[0066] Optionally, the device further includes:
[0067] The second receiving unit is configured to receive operation behavior data sent by the target browser after the first sending unit sends the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered.
[0068] An operation unit is used to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered based on the operation behavior data, so as to obtain the operation result.
[0069] A determining unit is used to determine the URL corresponding to the second webpage to be rendered based on the operation result;
[0070] The second request unit is used to request web page data corresponding to the second web page from the second web server according to the URL corresponding to the second web page to be rendered.
[0071] The second selection unit is used to select a second browser kernel based on the URL corresponding to the second webpage to be rendered.
[0072] The second rendering unit is used to parse and render the web page data corresponding to the second web page to be rendered based on the second browser kernel, so as to obtain the rendered web page content corresponding to the second web page to be rendered.
[0073] The second sending unit is used to send the rendered webpage content corresponding to the second webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0074] Fourthly, embodiments of this application provide a storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the web page rendering method described in the second aspect.
[0075] Fifthly, embodiments of this application provide a web page rendering apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the web page rendering method described in the second aspect.
[0076] By employing the above-described technical solution, the technical solution provided in this application has at least the following advantages:
[0077] This application provides a rendering server, a webpage rendering method, and an apparatus. The rendering server includes: multiple virtual machines, a receiving unit, a requesting unit, a selection unit, and a sending unit. Each virtual machine runs a browser kernel, and the browser kernels running in any two virtual machines are different. The receiving unit is used to receive the URL corresponding to a first webpage to be rendered sent by a target browser. The requesting unit is used to request webpage data corresponding to the first webpage to be rendered from a first webpage server according to the URL corresponding to the first webpage to be rendered. The selection unit is used to select a first target virtual machine from the multiple virtual machines according to the URL corresponding to the first webpage to be rendered. The first target virtual machine is used to parse and render the webpage data corresponding to the first webpage to be rendered based on its own running browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered. The sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, thereby enabling the target browser to display the webpage content corresponding to the first webpage to be rendered even when it does not have the ability to render the first webpage to be rendered.
[0078] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0079] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein:
[0080] Figure 1 This illustration shows a schematic diagram of the structure of a rendering server provided in an embodiment of this application;
[0081] Figure 2 This paper illustrates a schematic diagram of another rendering server provided in an embodiment of this application.
[0082] Figure 3 A flowchart of a webpage rendering method provided in an embodiment of this application is shown;
[0083] Figure 4 This paper illustrates a flowchart of another webpage rendering method provided in an embodiment of this application;
[0084] Figure 5 This illustration shows a block diagram of a web page rendering apparatus provided in an embodiment of this application;
[0085] Figure 6 A block diagram of another web page rendering apparatus provided in an embodiment of this application is shown. Detailed Implementation
[0086] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0087] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.
[0088] This application provides a rendering server, such as... Figure 1 As shown, the rendering server includes: multiple virtual machines 1, a receiving unit 2, a requesting unit 3, a selection unit 4, and a sending unit 5;
[0089] Each virtual machine 1 runs a browser kernel, and the browser kernels running in any two virtual machines 1 are different; receiving unit 2 is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser; requesting unit 3 is used to request the webpage data corresponding to the first webpage to be rendered from the first web server according to the URL corresponding to the first webpage to be rendered, wherein the first web server is a web server that stores the webpage data corresponding to the first webpage to be rendered; selecting unit 4 is used to select the first target virtual machine 11 from multiple virtual machines 1 according to the URL corresponding to the first webpage to be rendered; the first target virtual machine 11 is used to parse and render the webpage data corresponding to the first webpage to be rendered based on its own running browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered; sending unit 5 is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0090] The specific workflow of the rendering server is as follows: When a user expects the target browser to load and display the first webpage to be rendered, but the target browser does not have the ability to render the first webpage, the target browser will send the URL corresponding to the first webpage to be rendered to the rendering server. At this time, the receiving unit 2 in the rendering server can receive the URL corresponding to the first webpage to be rendered sent by the target browser. The requesting unit 3 requests the webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL corresponding to the first webpage to be rendered received by the receiving unit 2. The selection unit 4 selects the first target virtual machine 11 from multiple virtual machines 1 according to the URL corresponding to the first webpage to be rendered received by the receiving unit 2. The first target virtual machine 11 parses and renders the webpage data corresponding to the first webpage to be rendered requested by the requesting unit 3 based on its own running browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered. The sending unit 5 sends the rendered webpage content corresponding to the first webpage to be rendered obtained by the first target virtual machine 11 to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0091] This application provides a rendering server, which includes: multiple virtual machines, a receiving unit, a requesting unit, a selection unit, and a sending unit. Each virtual machine runs a browser kernel, and the browser kernels running in any two virtual machines are different. The receiving unit is used to receive the URL corresponding to a first webpage to be rendered sent by a target browser. The requesting unit is used to request webpage data corresponding to the first webpage to be rendered from a first web server based on the URL. The selection unit is used to select a first target virtual machine from the multiple virtual machines based on the URL. The first target virtual machine is used to parse and render the webpage data corresponding to the first webpage to be rendered based on its own running browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered. The sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, thus enabling the target browser to display the webpage content corresponding to the first webpage to be rendered even when it lacks the ability to render the first webpage.
[0092] Furthermore, such as Figure 2 As shown, the rendering server also includes: a preset data table 6; wherein the preset data table 6 records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name; a selection unit 4, specifically used to first extract the domain name corresponding to the first webpage to be rendered from the URL corresponding to the first webpage to be rendered; then search for the unique browser kernel identifier corresponding to the first webpage to be rendered in the preset data table 6 according to the domain name corresponding to the first webpage to be rendered; finally, determine the virtual machine 1 running the browser kernel corresponding to the found unique browser kernel identifier as the first target virtual machine 11.
[0093] Furthermore, such as Figure 2As shown, the rendering server further includes: an operation unit 7 and a determination unit 8; wherein, the receiving unit 2 is further configured to receive operation behavior data sent by the target browser; the operation unit 7 is configured to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data, so as to obtain the operation result; the determination unit 8 is configured to determine the URL corresponding to the second webpage to be rendered according to the operation result, wherein the second webpage to be rendered is the webpage that will be redirected to after performing corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data; the request unit 3 is further configured to request the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered. The second web server is a web server that stores the web page data corresponding to the second web page to be rendered. The selection unit 4 is also used to select a second target virtual machine 12 from multiple virtual machines 1 according to the URL corresponding to the second web page to be rendered. The second target virtual machine 12 is used to parse and render the web page data corresponding to the second web page to be rendered based on its own running browser kernel to obtain the rendered web page content corresponding to the second web page to be rendered. The sending unit 5 is also used to send the rendered web page content corresponding to the second web page to be rendered to the target browser so that the target browser can output and display the rendered web page content corresponding to the second web page to be rendered.
[0094] In this embodiment, after the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered, when the user performs an operation on the rendered webpage content, such as clicking a link in the rendered webpage content, entering data into an input box in the rendered webpage content and clicking a query button, the target browser records the user's operation behavior data and sends the recorded operation behavior data to the rendering server. At this time, the receiving unit 2 in the rendering server can receive the operation behavior data sent by the target browser; the operation unit 7 performs corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data received by the receiving unit 2, thereby obtaining the operation result; the determining unit 8 determines the second webpage to be rendered based on the operation result obtained by the operation unit 7. The request unit 3 requests the webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL of the second webpage to be rendered determined by the determination unit 8. The selection unit 4 selects the second target virtual machine 12 from multiple virtual machines 1 according to the URL of the second webpage to be rendered determined by the determination unit 8. The second target virtual machine 12 parses and renders the webpage data corresponding to the second webpage to be rendered requested by the request unit 3 based on its own running browser kernel, thereby obtaining the rendered webpage content corresponding to the second webpage to be rendered. The sending unit 5 sends the rendered webpage content corresponding to the second webpage to be rendered obtained by the second target virtual machine 12 to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0095] It should be noted that in practical applications, when the domain name contained in the URL corresponding to the second webpage to be rendered is the same as the domain name contained in the URL corresponding to the first webpage to be rendered, the selection unit 4 can directly determine the first target virtual machine 11 as the second target virtual machine 12, thus eliminating the need to perform the operation of selecting the second target virtual machine 12 from multiple virtual machines 1 based on the URL corresponding to the second webpage to be rendered.
[0096] This application provides a webpage rendering method, which is applied to the aforementioned rendering server, specifically as follows: Figure 3 As shown, the method includes:
[0097] 101. Receive the URL of the first webpage to be rendered sent by the target browser.
[0098] In this embodiment, the execution entity in each step is a rendering server that is independent of the terminal device where the target browser is located and the server corresponding to the webpage to be rendered.
[0099] In this embodiment of the application, when the user expects the target browser to load and display the first webpage to be rendered, but the target browser does not have the ability to render the first webpage to be rendered, the target browser will send the URL corresponding to the first webpage to be rendered to the rendering server. At this time, the rendering server can receive the URL corresponding to the first webpage to be rendered sent by the target browser.
[0100] 102. Request the webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL of the first webpage to be rendered.
[0101] The first web server is a web server that stores the web page data corresponding to the first web page to be rendered; the web page data corresponding to the first web page to be rendered may be, but is not limited to, the HTML file corresponding to the first web page to be rendered.
[0102] In this embodiment of the application, after receiving the URL corresponding to the first webpage to be rendered sent by the target browser, the rendering server can request the webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL corresponding to the first webpage to be rendered.
[0103] 103. Select the first browser engine based on the URL corresponding to the first webpage to be rendered.
[0104] The first browser kernel is a browser kernel capable of parsing and rendering the webpage data corresponding to the first webpage to be rendered.
[0105] In this embodiment of the application, multiple virtual machines can be run in advance on the rendering server, wherein the multiple virtual machines run different operating systems, and each virtual machine runs a corresponding browser kernel based on the operating system it is running; alternatively, multiple other servers can be built in advance within the server cluster where the rendering server is located, wherein the multiple other servers run different operating systems, and each other server runs a corresponding browser kernel based on the operating system it is running.
[0106] After receiving the URL corresponding to the first webpage to be rendered, the rendering server also needs to select, from among multiple running browser kernels, the browser kernel capable of parsing and rendering the webpage data corresponding to the first webpage to be rendered (i.e., the first browser kernel).
[0107] It should be noted that in practical applications, the execution order of steps 102 and 103 is not specifically limited in this application embodiment. That is, step 102 can be executed first and then step 103 can be executed, or step 103 can be executed first and then step 102 can be executed.
[0108] 104. Based on the first browser kernel, parse and render the webpage data corresponding to the first webpage to be rendered to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0109] In this embodiment of the application, after the rendering server requests the webpage data corresponding to the first webpage to be rendered and selects the first browser kernel, it can perform parsing and rendering processing on the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered.
[0110] 105. Send the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0111] In this embodiment of the application, after the rendering server obtains the rendered webpage content corresponding to the first webpage to be rendered based on the first browser kernel rendering, it can send the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered. This enables the target browser to display the webpage content corresponding to the first webpage to be rendered even when it does not have the ability to render the first webpage to be rendered.
[0112] To provide a more detailed explanation, this application provides another webpage rendering method, which is applied to the aforementioned rendering server, as follows: Figure 4 As shown, the method includes:
[0113] 201. Receive the URL of the first webpage to be rendered sent by the target browser.
[0114] Regarding step 201, receiving the URL corresponding to the first webpage to be rendered sent by the target browser, please refer to... Figure 3 The description of the corresponding parts will not be repeated here in the embodiments of this application.
[0115] 202. Request the webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL of the first webpage to be rendered.
[0116] Regarding step 202, requesting the webpage data corresponding to the first webpage to be rendered from the first webpage server based on the URL of the first webpage to be rendered, please refer to [link / reference]. Figure 3 The description of the corresponding parts will not be repeated here in the embodiments of this application.
[0117] 203. Select the first browser engine based on the URL corresponding to the first webpage to be rendered.
[0118] In this embodiment of the application, after receiving the URL corresponding to the first webpage to be rendered, the rendering server also needs to select, from multiple running browser kernels, a browser kernel (i.e., the first browser kernel) that can parse and render the webpage data corresponding to the first webpage to be rendered.
[0119] Specifically, in this step, the rendering server can select the first browser engine based on the URL corresponding to the first webpage to be rendered in the following way:
[0120] First, a pre-set data table is obtained, which records multiple pre-set domain names and a unique browser kernel identifier corresponding to each pre-set domain name. Second, the domain name corresponding to the first webpage to be rendered is extracted from the URL of the first webpage to be rendered. Third, the unique browser kernel identifier corresponding to the first webpage to be rendered is searched in the pre-set data table based on the domain name of the first webpage to be rendered. Finally, the browser kernel corresponding to the found unique browser kernel identifier is determined as the first browser kernel.
[0121] 204. Based on the first browser kernel, parse and render the webpage data corresponding to the first webpage to be rendered to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0122] In this embodiment of the application, after the rendering server requests the webpage data corresponding to the first webpage to be rendered and selects the first browser kernel, it can perform parsing and rendering processing on the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered.
[0123] Specifically, in this step, when the first browser kernel is running in a virtual machine (i.e., the target virtual machine) in the rendering server, the rendering server needs to send the web page data corresponding to the first web page to be rendered to the target virtual machine so that the target virtual machine can parse and render the web page data corresponding to the first web page to be rendered based on the first browser kernel, thereby obtaining the rendered web page content corresponding to the first web page to be rendered, and then receiving the rendered web page content corresponding to the first web page to be rendered fed back by the target virtual machine.
[0124] When the first browser kernel is running on another server in the server cluster where the rendering server is located, the rendering server needs to send the web page data corresponding to the first web page to be rendered to that other server so that the other server can parse and render the web page data corresponding to the first web page to be rendered based on the first browser kernel, obtain the rendered web page content corresponding to the first web page to be rendered, and then receive the rendered web page content corresponding to the first web page to be rendered from the feedback of the other server.
[0125] 205. Send the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0126] Regarding step 205, which involves sending the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, please refer to [reference needed]. Figure 3 The description of the corresponding parts will not be repeated here in the embodiments of this application.
[0127] 206. Receive operation behavior data sent by the target browser, obtain the rendered webpage content corresponding to the second webpage to be rendered based on the operation behavior data, and send the rendered webpage content corresponding to the second webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0128] In this embodiment of the application, after the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered, when the user performs an operation on the rendered webpage content corresponding to the first webpage to be rendered, such as clicking a link in the rendered webpage content, entering data into the input box in the rendered webpage content and clicking the query button, the target browser will record the operation behavior data generated by the user and send the recorded operation behavior data to the rendering server. After receiving the operation data sent by the target browser, the rendering server first performs corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered locally, based on the received operation data, to obtain the operation result. Second, it determines the URL corresponding to the second webpage to be rendered based on the operation result. The second webpage to be rendered is the webpage that the user will be redirected to after performing the corresponding operations on the rendered webpage content corresponding to the first webpage. Third, it requests the webpage data corresponding to the second webpage from the second web server based on the URL of the second webpage to be rendered, selects the second browser kernel based on the URL of the second webpage to be rendered, and performs parsing and rendering processing on the webpage data corresponding to the second webpage based on the second browser kernel, thereby obtaining the rendered webpage content corresponding to the second webpage. The second web server is a web server that stores the webpage data corresponding to the second webpage to be rendered. Finally, it sends the rendered webpage content corresponding to the second webpage to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage.
[0129] The specific process of requesting webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL of the second webpage to be rendered, selecting the second browser kernel according to the URL of the second webpage to be rendered, and parsing and rendering the webpage data corresponding to the second webpage to be rendered based on the second browser kernel to obtain the rendered webpage content corresponding to the second webpage to be rendered can be referred to the description of obtaining the rendered webpage content corresponding to the first webpage to be rendered in steps 201-204. This embodiment of the application will not be repeated here.
[0130] It should be noted that in practical applications, when the domain name contained in the URL corresponding to the second webpage to be rendered is the same as the domain name contained in the URL corresponding to the first webpage to be rendered, the rendering server can directly determine the first browser kernel as the second browser kernel without performing the operation of selecting the second browser kernel based on the URL corresponding to the second webpage to be rendered.
[0131] To achieve the above objectives, according to another aspect of this application, an embodiment of this application also provides a storage medium, the storage medium including a stored program, wherein, when the program is running, it controls the device where the storage medium is located to execute the web page rendering method described above.
[0132] To achieve the above objectives, according to another aspect of this application, an embodiment of this application also provides a web page rendering apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the web page rendering method described above.
[0133] Furthermore, as a response to the above Figure 3 and Figure 4 In addition to the implementation of the method shown, another embodiment of this application also provides a webpage rendering apparatus, which is applied to a rendering server. This apparatus embodiment corresponds to the foregoing method embodiment. For ease of reading, this apparatus embodiment will not repeat the details of the foregoing method embodiment, but it should be understood that the apparatus in this embodiment can implement all the content of the foregoing method embodiment. This apparatus is applied when the browser does not have the ability to render the webpage to be rendered, and renders the webpage to be rendered through a rendering server, thereby enabling the browser to load and display the webpage content to be rendered, specifically as follows... Figure 5 As shown, the device includes:
[0134] The first receiving unit 301 is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser;
[0135] The first request unit 302 is used to request web page data corresponding to the first web page to be rendered from the first web page server according to the URL corresponding to the first web page to be rendered, wherein the first web page server is a web page server that stores the web page data corresponding to the first web page to be rendered.
[0136] The first selection unit 303 is used to select a first browser kernel according to the URL corresponding to the first webpage to be rendered.
[0137] The first rendering unit 304 is used to parse and render the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0138] The first sending unit 305 is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0139] Furthermore, such as Figure 6 As shown, the first selection unit 303 includes:
[0140] The acquisition module 3031 is used to acquire a preset data table, wherein the preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name;
[0141] Extraction module 3032 is used to extract the domain name corresponding to the first webpage to be rendered from the URL corresponding to the first webpage to be rendered;
[0142] The lookup module 3033 is used to look up the browser kernel unique identifier corresponding to the first webpage to be rendered in the preset data table according to the domain name.
[0143] The determination module 3034 is used to determine the browser kernel corresponding to the browser kernel unique identifier as the first browser kernel.
[0144] Furthermore, such as Figure 6 As shown, the first browser kernel runs in the target virtual machine in the rendering server; the first rendering unit 304 includes:
[0145] The first sending module 3041 is used to send the web page data corresponding to the first web page to be rendered to the target virtual machine, so that the target virtual machine performs parsing and rendering processing on the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0146] The first receiving module 3042 is used to receive the rendered webpage content corresponding to the first webpage to be rendered fed back by the target virtual machine.
[0147] Furthermore, such as Figure 6 As shown, the first browser kernel runs on other servers within the server cluster where the rendering server is located; the first rendering unit 304 includes:
[0148] The second sending module 3043 is used to send the web page data corresponding to the first web page to be rendered to the other server, so that the other server performs parsing and rendering processing on the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered.
[0149] The second receiving module 3044 is used to receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the other server.
[0150] Furthermore, such as Figure 6 As shown, the device also includes:
[0151] The second receiving unit 306 is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser by the first sending unit 305, so that after the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered, it receives the operation behavior data sent by the target browser.
[0152] Operation unit 307 is used to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data, so as to obtain operation results;
[0153] The determining unit 308 is used to determine the URL corresponding to the second webpage to be rendered based on the operation result.
[0154] The second request unit 309 is used to request web page data corresponding to the second web page from the second web server according to the URL corresponding to the second web page to be rendered.
[0155] The second selection unit 310 is used to select a second browser kernel according to the URL corresponding to the second webpage to be rendered.
[0156] The second rendering unit 311 is used to parse and render the web page data corresponding to the second web page to be rendered based on the second browser kernel, so as to obtain the rendered web page content corresponding to the second web page to be rendered.
[0157] The second sending unit 312 is used to send the rendered webpage content corresponding to the second webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0158] This application provides a rendering server, a webpage rendering method, and an apparatus. The rendering server in this application includes: multiple virtual machines, a receiving unit, a requesting unit, a selection unit, and a sending unit. Each virtual machine runs a browser kernel, and the browser kernels running in any two virtual machines are different. The receiving unit is used to receive the URL corresponding to a first webpage to be rendered sent by a target browser. The requesting unit is used to request webpage data corresponding to the first webpage to be rendered from a first webpage server according to the URL corresponding to the first webpage to be rendered. The selection unit is used to select a first target virtual machine from the multiple virtual machines according to the URL corresponding to the first webpage to be rendered. The first target virtual machine is used to parse and render the webpage data corresponding to the first webpage to be rendered based on its own running browser kernel, thereby obtaining the rendered webpage content corresponding to the first webpage to be rendered. The sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, thereby enabling the target browser to display the webpage content corresponding to the first webpage to be rendered even when the target browser does not have the ability to render the first webpage to be rendered.
[0159] The web page rendering device includes a processor and a memory. The first receiving unit, the first request unit, the first selection unit, the first rendering unit, and the first sending unit are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0160] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, when the browser lacks the capability to render the webpage, a rendering server is used to render the webpage, thus enabling the browser to load and display the webpage content.
[0161] This application provides a storage medium that includes a stored program, wherein the program controls the device where the storage medium is located to execute the web page rendering method described above when it is running.
[0162] Storage media may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0163] This application also provides a web page rendering apparatus, the apparatus including a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions executing the web page rendering method described above.
[0164] This application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps:
[0165] Receive the URL of the first webpage to be rendered sent by the target browser;
[0166] The first webpage requests webpage data corresponding to the first webpage to be rendered from the first webpage according to the URL corresponding to the first webpage to be rendered, wherein the first webpage is a webpage server that stores the webpage data corresponding to the first webpage to be rendered.
[0167] Select the first browser engine based on the URL corresponding to the first webpage to be rendered;
[0168] Based on the first browser kernel, the web page data corresponding to the first web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the first web page to be rendered.
[0169] The rendered webpage content corresponding to the first webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered.
[0170] Furthermore, the step of selecting the first browser engine based on the URL corresponding to the first webpage to be rendered includes:
[0171] Obtain a preset data table, wherein the preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name;
[0172] Extract the domain name corresponding to the first webpage to be rendered from the URL of the first webpage to be rendered;
[0173] Based on the domain name, search the preset data table for the unique browser kernel identifier corresponding to the first webpage to be rendered;
[0174] The browser kernel corresponding to the unique identifier of the browser kernel is determined as the first browser kernel.
[0175] Furthermore, the first browser kernel runs in the target virtual machine on the rendering server; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes:
[0176] The webpage data corresponding to the first webpage to be rendered is sent to the target virtual machine, so that the target virtual machine can parse and render the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0177] Receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the target virtual machine.
[0178] Furthermore, the first browser kernel runs on other servers within the server cluster where the rendering server is located; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes:
[0179] The webpage data corresponding to the first webpage to be rendered is sent to the other server, so that the other server can parse and render the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered.
[0180] Receive the rendered webpage content corresponding to the first webpage to be rendered from the feedback of the other servers.
[0181] Furthermore, after sending the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, the method further includes:
[0182] Receive operation behavior data sent by the target browser;
[0183] Based on the operation behavior data, perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered, so as to obtain the operation result;
[0184] The URL corresponding to the second webpage to be rendered is determined based on the operation result;
[0185] Request the webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered;
[0186] Select the second browser engine based on the URL corresponding to the second webpage to be rendered;
[0187] Based on the second browser kernel, the web page data corresponding to the second web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the second web page to be rendered.
[0188] The rendered webpage content corresponding to the second webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
[0189] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing program code that initializes the following method steps: receiving a URL corresponding to a first webpage to be rendered sent by a target browser; requesting webpage data corresponding to the first webpage to be rendered from a first web server according to the URL, wherein the first web server is a web server storing the webpage data corresponding to the first webpage to be rendered; selecting a first browser kernel according to the URL; parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain rendered webpage content corresponding to the first webpage to be rendered; and sending the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered.
[0190] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0191] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0192] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0194] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0195] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0196] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0197] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0198] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0199] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A rendering server, characterized in that, The rendering server includes: multiple virtual machines, a receiving unit, a requesting unit, a selection unit, and a sending unit; Each of the virtual machines runs a browser kernel, and the browser kernels running in any two of the virtual machines are different. The receiving unit is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser, wherein the target browser does not have the ability to render the first webpage to be rendered. The request unit is used to request web page data corresponding to the first web page to be rendered from the first web page server according to the URL corresponding to the first web page to be rendered, wherein the first web page server is a web page server that stores the web page data corresponding to the first web page to be rendered. The selection unit is used to select a first target virtual machine from among the multiple virtual machines according to the URL corresponding to the first webpage to be rendered; The first target virtual machine is used to parse and render the web page data corresponding to the first web page to be rendered based on its own running browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered. The sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered. The rendering server further includes: an operation unit and a determination unit; The receiving unit is also used to receive operation behavior data sent by the target browser; The operation unit is used to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered according to the operation behavior data, so as to obtain the operation result. The determining unit is used to determine the URL corresponding to the second webpage to be rendered based on the operation result. The request unit is further configured to request webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered; The selection unit is further configured to select a second target virtual machine from among the multiple virtual machines based on the URL corresponding to the second webpage to be rendered; The second target virtual machine is used to parse and render the web page data corresponding to the second web page to be rendered based on its own running browser kernel, so as to obtain the rendered web page content corresponding to the second web page to be rendered. The sending unit is further configured to send the rendered webpage content corresponding to the second webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
2. The rendering server according to claim 1, characterized in that, The rendering server also includes: a preset data table; The preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name; The selection unit is specifically used to extract the domain name corresponding to the first webpage to be rendered from the URL corresponding to the first webpage to be rendered; to look up the unique identifier of the browser kernel corresponding to the first webpage to be rendered in the preset data table according to the domain name; and to determine the virtual machine running the browser kernel corresponding to the unique identifier of the browser kernel as the first target virtual machine.
3. A webpage rendering method, characterized in that, The method is applied in the rendering server as described in claim 1 or 2, and the method includes: Receive the URL corresponding to the first webpage to be rendered sent by the target browser, wherein the target browser does not have the ability to render the first webpage to be rendered; The first webpage requests webpage data corresponding to the first webpage to be rendered from the first webpage according to the URL corresponding to the first webpage to be rendered, wherein the first webpage is a webpage server that stores the webpage data corresponding to the first webpage to be rendered. A first browser kernel is selected based on the URL corresponding to the first webpage to be rendered, wherein the first browser kernel is a browser kernel that can parse and render the webpage data corresponding to the first webpage to be rendered. Based on the first browser kernel, the web page data corresponding to the first web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the first web page to be rendered. The rendered webpage content corresponding to the first webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered. After sending the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered, the method further includes: Receive operation behavior data sent by the target browser; Based on the operation behavior data, perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered, so as to obtain the operation result; The URL corresponding to the second webpage to be rendered is determined based on the operation result; Request the webpage data corresponding to the second webpage to be rendered from the second webpage server according to the URL corresponding to the second webpage to be rendered; Select the second browser engine based on the URL corresponding to the second webpage to be rendered; Based on the second browser kernel, the web page data corresponding to the second web page to be rendered is parsed and rendered to obtain the rendered web page content corresponding to the second web page to be rendered. The rendered webpage content corresponding to the second webpage to be rendered is sent to the target browser so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
4. The method according to claim 3, characterized in that, The step of selecting the first browser engine based on the URL corresponding to the first webpage to be rendered includes: Obtain a preset data table, wherein the preset data table records multiple preset domain names and a unique browser kernel identifier corresponding to each preset domain name; Extract the domain name corresponding to the first webpage to be rendered from the URL of the first webpage to be rendered; Based on the domain name, search the preset data table for the unique browser kernel identifier corresponding to the first webpage to be rendered; The browser kernel corresponding to the unique identifier of the browser kernel is determined as the first browser kernel.
5. The method according to claim 3, characterized in that, The first browser kernel runs in the target virtual machine in the rendering server; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes: The webpage data corresponding to the first webpage to be rendered is sent to the target virtual machine, so that the target virtual machine performs parsing and rendering processing on the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered. Receive the rendered webpage content corresponding to the first webpage to be rendered, fed back by the target virtual machine.
6. The method according to claim 3, characterized in that, The first browser kernel runs on other servers within the server cluster where the rendering server is located; the step of parsing and rendering the webpage data corresponding to the first webpage to be rendered based on the first browser kernel to obtain the rendered webpage content corresponding to the first webpage to be rendered includes: The webpage data corresponding to the first webpage to be rendered is sent to the other server, so that the other server can parse and render the webpage data corresponding to the first webpage to be rendered based on the first browser kernel, so as to obtain the rendered webpage content corresponding to the first webpage to be rendered. Receive the rendered webpage content corresponding to the first webpage to be rendered from the feedback of the other servers.
7. A webpage rendering device, characterized in that, include: The first receiving unit is used to receive the URL corresponding to the first webpage to be rendered sent by the target browser, wherein the target browser does not have the ability to render the first webpage to be rendered. The first request unit is configured to request webpage data corresponding to the first webpage to be rendered from the first webpage server according to the URL corresponding to the first webpage to be rendered, wherein the first webpage server is a webpage server that stores the webpage data corresponding to the first webpage to be rendered. The first selection unit is used to select a first browser kernel according to the URL corresponding to the first webpage to be rendered, wherein the first browser kernel is a browser kernel that can parse and render the webpage data corresponding to the first webpage to be rendered. The first rendering unit is used to parse and render the web page data corresponding to the first web page to be rendered based on the first browser kernel, so as to obtain the rendered web page content corresponding to the first web page to be rendered. The first sending unit is used to send the rendered webpage content corresponding to the first webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the first webpage to be rendered. The device further includes: The second receiving unit is configured to receive operation behavior data sent by the target browser after the first sending unit sends the rendered webpage content corresponding to the first webpage to be rendered to the target browser so that the target browser outputs and displays the rendered webpage content corresponding to the first webpage to be rendered. An operation unit is used to perform corresponding operations on the rendered webpage content corresponding to the first webpage to be rendered based on the operation behavior data, so as to obtain the operation result. A determining unit is used to determine the URL corresponding to the second webpage to be rendered based on the operation result; The second request unit is used to request web page data corresponding to the second web page from the second web server according to the URL corresponding to the second web page to be rendered. The second selection unit is used to select a second browser kernel based on the URL corresponding to the second webpage to be rendered. The second rendering unit is used to parse and render the web page data corresponding to the second web page to be rendered based on the second browser kernel, so as to obtain the rendered web page content corresponding to the second web page to be rendered. The second sending unit is used to send the rendered webpage content corresponding to the second webpage to be rendered to the target browser, so that the target browser can output and display the rendered webpage content corresponding to the second webpage to be rendered.
8. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is running, it controls the device where the storage medium is located to execute the web page rendering method according to any one of claims 3 to 6.
9. A webpage rendering device, characterized in that, The apparatus includes a storage medium; and one or more processors, the storage medium being coupled to the processors, the processors being configured to execute program instructions stored in the storage medium; the program instructions, when executed, perform the web page rendering method according to any one of claims 3 to 6.
Citation Information
Patent Citations
Webpage loading method and device
CN102890724A
Method, server and system for rendering webpages
CN102902576A