Page display method and device, storage medium, computer device, and program product
By introducing an intelligent judgment function into the WebVR browser, the system automatically identifies and switches to VR mode to display panoramic images, solving the problem of users manually switching VR modes and improving user experience and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2022-01-12
- Publication Date
- 2026-06-09
AI Technical Summary
In VR all-in-one devices, when opening panoramic content using a traditional WebVR browser, users need to manually switch the page to VR mode, resulting in a poor user experience.
Based on the open-source WebVR browser, an intelligent judgment function is added. By parsing the source code of the target webpage, it can determine whether it is a panoramic webpage made based on Krpano, and automatically switch to VR mode to display the panoramic content after confirmation.
It can automatically switch to VR mode without requiring manual user operation, improving page display efficiency and user experience.
Smart Images

Figure CN116467535B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a page display method, apparatus, storage medium, computer equipment, and program product. Background Technology
[0002] Virtual Reality (VR) uses computer technology to simulate a three-dimensional virtual world, providing users with a simulation of their senses, such as vision, making them feel as if they are actually there, able to observe objects in three-dimensional space in a timely and unrestricted manner. When the user moves, the computer can immediately perform complex calculations and transmit precise three-dimensional video back to create a sense of presence.
[0003] WebVR, or VR on the Web, applies virtual reality technology to web pages, using JavaScript to write VR-related programs that run on a browser platform. WebVR offers better sharing capabilities and enables interaction between users.
[0004] JavaScript (JS for short) is a lightweight, interpreted or just-in-time (JIT) programming language that prioritizes functions.
[0005] The panorama plugin (krpano) effectively achieves panoramic display effects (panoramic display: in a specific environment, users can view images from different angles in 360 degrees. A panoramic image is a scene). It achieves this effect by combining multiple ordinary images into a single scene using specific rules. Furthermore, by defining multiple hotspots (hotspots: nodes connecting two scenes), users can switch between scenes by clicking on them.
[0006] WebVR+Krpano plugin is a panoramic tour production solution. Its multi-platform support, low production threshold, and excellent display effects make it a popular choice for content creators and industry clients to create panoramic content. However, when panoramic content is opened in a traditional WebVR browser on a VR all-in-one device, it is displayed in a flat format, requiring users to manually switch the page to VR mode, resulting in a poor user experience. Summary of the Invention
[0007] This application provides a page display method, apparatus, storage medium, computer equipment, and program product, which can improve page display efficiency and enhance user experience.
[0008] On the one hand, a page display method is provided, the method comprising:
[0009] Based on the loading request for the target webpage, the target browser is launched, which can be used to display panoramic content;
[0010] Control the webpage view control to load the target webpage;
[0011] Obtain the source code of the target webpage;
[0012] By parsing the source code of the target webpage, it can be determined whether the target webpage is a panoramic webpage developed based on a panoramic display plugin.
[0013] If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, then the target function is called to perform mode switching, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage.
[0014] On the other hand, a page display device is provided, the device comprising:
[0015] The startup unit is used to launch a target browser based on a loading request for a target webpage, the target browser being used to display panoramic content;
[0016] The loading unit is used to control the webpage view control to load the target webpage;
[0017] The acquisition unit is used to acquire the source code of the target webpage;
[0018] The judgment unit is used to determine whether the target webpage is a panoramic webpage developed based on a panoramic display plugin by parsing the webpage source code of the target webpage.
[0019] The display unit is used to, if it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, call the target function to perform mode switching and control the target browser to render the target webpage in VR mode to display the panoramic content of the target webpage.
[0020] On the other hand, a computer-readable storage medium is provided that stores a computer program adapted for loading by a processor to perform the steps in the page display method as described in any of the above embodiments.
[0021] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the steps in the page display method as described in any of the above embodiments by calling the computer program stored in the memory.
[0022] On the other hand, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps in the page display method as described in any of the above embodiments.
[0023] This embodiment of the application launches a target browser based on a loading request for a target webpage. The target browser can be used to display panoramic content. It controls the webpage view controls to load the target webpage; obtains the webpage source code; and parses the webpage source code to determine if the target webpage is a panoramic webpage developed based on a panoramic display plugin. If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, a target function is called to perform a mode switch, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage. This embodiment of the application, by setting an intelligent judgment step based on the open-source WebVR browser, automatically switches to VR mode and displays the panoramic content of the target webpage when the loaded target webpage is a panoramic webpage created using Krpano, without requiring manual user operation, thus improving page display efficiency and user experience. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating the page display method provided in an embodiment of this application.
[0026] Figure 2 This is another schematic flowchart illustrating the page display method provided in an embodiment of this application.
[0027] Figure 3 This is a schematic diagram of the structure of the page display device provided in the embodiments of this application.
[0028] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] This application provides a page display method, apparatus, computer device, and storage medium. Specifically, the page display method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, smart speaker, wearable smart device, personal computer (PC), smart vehicle terminal, virtual reality device, etc. The terminal can also include a client, which can be a game client, video client, browser client, or instant messaging client, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0031] WebVR+Krpano plugin is a panoramic tour production solution. Its multi-platform support, low production threshold, and excellent display effects make it a popular choice for content creators and industry clients to create panoramic content. However, when panoramic content is opened in a traditional WebVR browser on a VR all-in-one device, it is displayed in a flat format, requiring users to manually switch the page to VR mode, resulting in a poor user experience.
[0032] In order to make it easier for users to view panoramic web pages created using VR all-in-one devices, this application's embodiments incorporate intelligent judgment based on the open-source WebVR browser. When the target web page is a panoramic web page created using Krpano, it automatically switches to VR mode, so that users see panoramic content as soon as they open the web page, without the need for manual operation by the user, thus improving page display efficiency and enhancing user experience.
[0033] This application's embodiments are based on WebVR open-source browsers, web development, and related technologies. These embodiments require the use of WebVR-related technologies and the functionality of calling JavaScript code within the WebView control. This application's embodiments can provide a WebVR browser that intelligently determines the webpage type and calls JavaScript functions. For example, it can also be implemented based on the open-source cross-platform hybrid browser Firefox Reality. The WebView control is a webpage view control used to embed a browser within an application to display webpages.
[0034] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0035] Please see Figures 1 to 2 , Figure 1 and Figure 2 These are schematic flowcharts illustrating the page display method provided in the embodiments of this application. This page display method can be applied to virtual reality devices, such as VR all-in-one machines, and includes:
[0036] Step 110: Based on the loading request for the target webpage, launch the target browser, which can be used to display panoramic content.
[0037] For example, the target browser is a WebVR browser. WebVR is a set of APIs (Application Programming Interfaces) designed to support browser-based VR experiences. WebVR is currently available through various web browsers, providing applications to VR headsets via the web, making it easy and convenient to obtain page display content, and allowing panoramic content to be displayed through this WebVR browser.
[0038] The target webpage can be a webpage that is about to open but has not yet been displayed, a webpage that is accessed through user touch operations, or a webpage that is accessed through page navigation based on page functions. The target webpage can originate from a browser, client, mini-program, etc.
[0039] For example, a WebVR browser can be launched by a loading request for a target webpage triggered by a user's touch operation. Alternatively, a loading request for a target webpage can be launched based on page navigation caused by page functionality.
[0040] For example, based on the operating environment, the browser type of this WebVR browser can include client browsers, iOS browsers, Android browsers, PC browsers, etc.
[0041] Step 120: Control the webpage view control to load the target webpage.
[0042] In some embodiments, the control of the webpage view control to load the target webpage includes:
[0043] Obtain the Uniform Resource Locator (URL) of the target webpage;
[0044] Send the Uniform Resource Locator (URL) of the target webpage to the webpage view control for loading;
[0045] The control page view loads the target webpage based on the target webpage's Uniform Resource Locator (URL).
[0046] A URL (Uniform Resource Locator) is a concise representation of the location and access method of a resource available on the internet. It is the unique address for standard resources on the internet. Every file on the internet has a unique URL, which contains information indicating the file's location and how the browser should handle it. Specifically, the URL of the target webpage must be obtained before loading it.
[0047] For example, the URL of the target webpage is passed to the WebView control after the target webpage's URL for loading. The WebView control then loads the target webpage based on its URL.
[0048] The WebView control is a webpage view control used to embed a browser within an application to display webpages.
[0049] For example, in different webpage runtime environments, there will be WebView controls that match each network runtime environment. The appropriate WebView control can be determined based on the target webpage's URL, and then that WebView control can be invoked to load the target webpage. For example, the webpage runtime environment may include the terminal model, system version, client version, etc., used to host the target webpage.
[0050] Step 130: Obtain the source code of the target webpage.
[0051] In some embodiments, obtaining the webpage source code of the target webpage after it has been loaded includes:
[0052] After the target webpage is loaded, the webpage source code is obtained through the calling function of the webpage view control.
[0053] For example, after the target webpage is loaded, the WebView control calls a function to obtain the webpage source code.
[0054] For example, taking the Android system as the operating environment, the corresponding WebView control is the Android WebView control, and the source code of the target webpage is obtained by calling functions through the Android WebView control.
[0055] For example, the source code of the target webpage obtained is based on the functionality implemented using the Android native Application Programming Interface (API), and its core code is:
[0056] view.loadUrl("javascript:window.local_obj.showSource(''+document.getElementsByTagName('html')[0].innerHTML+'');").
[0057] At runtime, you can see the webpage source code printed in showSource(String html). After obtaining the webpage source code, you can further execute the judgment steps.
[0058] Step 140: By parsing the source code of the target webpage, determine whether the target webpage is a panoramic webpage developed based on a panoramic display plugin.
[0059] For example, by parsing the webpage source code, it can be determined whether the target webpage is a panoramic webpage developed based on Krpano. Specifically, it can be determined whether the target webpage is based on a panoramic webpage developed based on Krpano by checking whether the webpage source code contains a div code block with the id "krpanoSWFObject".
[0060] After obtaining the webpage source code, check if it contains code with the id "krpanoSWFObject". Panoramic resources developed based on Krpano all contain the "krpanoSWFObject" code block. For example, if the webpage source code contains code with the id "krpanoSWFObject", it proves that the code block is a panoramic resource developed based on Krpano and has the ability to render in VR mode, thus indicating that the target webpage is a panoramic webpage developed based on Krpano.
[0061] Step 150: If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, then the target function is called to perform mode switching, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage.
[0062] For example, the target function is a JavaScript function, or simply a js function.
[0063] For example, if the target webpage is determined to be a panoramic webpage developed using the Krpano panoramic display plugin, a JavaScript function is called to switch the mode. Alternatively, if the target webpage is determined to be a panoramic webpage developed using Krpano, a JavaScript injection is used to actively call the WebVR interface to change the WebVR webpage rendering mode. Specifically, the `webvr.enterVR()` interface is called via JavaScript injection, the `webvr.enter()` method is executed, and the WebVR browser renders the target webpage in VR mode.
[0064] For example, once VR mode rendering is successful, the panoramic content will be automatically displayed in VR mode, allowing users to directly experience VR.
[0065] In some embodiments, after displaying the panoramic view content of the target webpage, the method further includes:
[0066] Get 2D mode switching request;
[0067] Based on the 2D mode switching request, the currently displayed content is switched from the panoramic view of the target webpage to the two-dimensional view of the target webpage.
[0068] For example, after displaying the panoramic content of the target webpage, it is possible to analyze whether to generate a 2D mode switching request based on the user's input operation, or based on the current battery information or current network speed information of the computer device, and then switch from VR mode to 2D mode.
[0069] In some embodiments, obtaining the 2D mode switching request includes any of the following methods:
[0070] In response to the object's first input operation, the 2D mode switching request is generated;
[0071] The current battery level of the computer device used to run the target browser is detected. If the current battery level is lower than the minimum battery level, the 2D mode switching request is generated.
[0072] The current network speed of the computer device used to run the target browser is detected. If the current network speed is lower than the lower limit, the 2D mode switching request is generated.
[0073] For example, the object could be a user using a computer device (such as a VR headset), or the user could be a virtual object in a virtual reality scene. For example, in response to the object's first input operation, a 2D mode switching request is generated so that the user can promptly exit VR mode and enter 2D mode based on the 2D mode switching request, allowing the user to flexibly switch between display modes.
[0074] For example, because VR mode is relatively power-intensive, a minimum battery level can be set to determine whether to exit VR mode. This minimum battery level can be a preset percentage of the computer device's total battery capacity, such as 30%. The system detects the current battery level of the computer device running the target browser; if the current battery level is below the minimum, a 2D mode switching request is generated. This minimum battery level can be set by the user. Alternatively, the minimum battery level can be determined by the computer device detecting its currently running applications; for example, by estimating the remaining battery life based on the historical power consumption of the currently running applications and the user's historical activity, and automatically setting the minimum battery level based on the estimated remaining battery life to ensure the computer device has a longer battery life.
[0075] For example, because VR mode consumes significant network resources, slow network speeds can cause panoramic content to fail to load or load slowly, impacting the user's viewing experience. A minimum network speed can be set to determine whether to exit VR mode. This minimum speed can be set by the user or automatically by the computer device based on the network resource usage of currently running applications and / or the priority of those applications. For instance, if the application currently using network resources has a higher priority than the target browser, and the current network speed is below the minimum speed, a 2D mode switching request is generated. This allows for timely exit from VR mode and entry into 2D mode, ensuring the normal operation of other higher-priority applications and the smooth display of the target webpage, thus improving the user's viewing experience.
[0076] In some embodiments, after switching to the two-dimensional screen content of the target webpage, the method further includes:
[0077] Get VR mode switching request;
[0078] Based on the VR mode switching request, the currently displayed content is switched from the two-dimensional content of the target webpage to the panoramic content of the target webpage.
[0079] For example, after displaying the two-dimensional content of the target webpage, it is possible to analyze whether to generate a VR mode switching request based on the user's input operation, or based on the current battery information or current network speed information of the computer device, and then switch from 2D mode to VR mode.
[0080] In some embodiments, obtaining the VR mode switching request includes any of the following methods:
[0081] In response to the object's second input operation, the VR mode switching request is generated;
[0082] The current battery level of the computer device used to run the target browser is detected. If the current battery level is higher than the lower limit of the battery level, the VR mode switching request is generated.
[0083] The current network speed of the computer device used to run the target browser is detected. If the current network speed is higher than the lower limit of the network speed, the VR mode switching request is generated.
[0084] For example, in response to a second input operation of the object, a VR mode switching request is generated so that the user can exit the 2D mode and enter the VR mode in a timely manner based on the VR mode switching request, which allows the user to flexibly switch the display mode.
[0085] For example, once the computer device's power is restored, it can be switched back to VR mode to enhance the user's viewing experience.
[0086] For example, if the computer device has a faster internet connection, it can switch back to VR mode to enhance the user's viewing experience.
[0087] In some embodiments, the method further includes:
[0088] If it is determined that the target webpage is not a panoramic webpage developed based on a panoramic display plugin, then the target browser is controlled to render the target webpage in 2D mode to display the two-dimensional content of the target webpage.
[0089] For example, if it is determined that the target webpage is not a panoramic webpage developed based on Krpano, then the two-dimensional content of the target webpage is displayed in 2D mode.
[0090] To better illustrate the page display method provided in the embodiments of this application, please refer to... Figure 4 The page display method provided in this application embodiment can be summarized into the following steps:
[0091] Step 201: Based on the loading request for the target webpage, launch the target browser, which can be used to display panoramic content.
[0092] Step 202: Obtain the Uniform Resource Locator (URL) of the target webpage.
[0093] Step 203: Send the Uniform Resource Locator (URL) of the target webpage to the webpage view control for loading.
[0094] Step 204: Control the webpage view control to load the target webpage based on the target webpage's Uniform Resource Locator.
[0095] Step 205: After the target webpage is loaded, obtain the webpage source code of the target webpage through the calling function of the webpage view control.
[0096] Step 206: By parsing the source code of the target webpage, determine whether the target webpage is a panoramic webpage developed based on a panoramic display plugin. If yes, proceed to step 207; otherwise, proceed to step 212.
[0097] Step 207: If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, then the target function is called to perform mode switching, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage.
[0098] Step 208: After displaying the panoramic content of the target webpage, obtain a 2D mode switching request.
[0099] In some embodiments, obtaining the 2D mode switching request includes any of the following methods:
[0100] In response to the object's first input operation, the 2D mode switching request is generated;
[0101] The current battery level of the computer device used to run the target browser is detected. If the current battery level is lower than the minimum battery level, the 2D mode switching request is generated.
[0102] The current network speed of the computer device used to run the target browser is detected. If the current network speed is lower than the lower limit, the 2D mode switching request is generated.
[0103] Step 209: Based on the 2D mode switching request, switch the currently displayed content from the panoramic view of the target webpage to the two-dimensional view of the target webpage.
[0104] Step 210: After switching to the two-dimensional screen content of the target webpage, obtain a VR mode switching request.
[0105] Step 211: Based on the VR mode switching request, switch the currently displayed content from the two-dimensional content of the target webpage to the panoramic content of the target webpage.
[0106] In some embodiments, obtaining the VR mode switching request includes any of the following methods:
[0107] In response to the object's second input operation, the VR mode switching request is generated;
[0108] The current battery level of the computer device used to run the target browser is detected. If the current battery level is higher than the lower limit of the battery level, the VR mode switching request is generated.
[0109] The current network speed of the computer device used to run the target browser is detected. If the current network speed is higher than the lower limit of the network speed, the VR mode switching request is generated.
[0110] Step 212: If it is determined that the target webpage is not a panoramic webpage developed based on a panoramic display plugin, then control the target browser to render the target webpage in 2D mode to display the two-dimensional screen content of the target webpage.
[0111] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0112] This embodiment of the application launches a target browser based on a loading request for a target webpage. The target browser can be used to display panoramic content. It controls the webpage view controls to load the target webpage; obtains the webpage source code; and parses the webpage source code to determine if the target webpage is a panoramic webpage developed based on a panoramic display plugin. If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, a target function is called to perform a mode switch, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage. This embodiment of the application, by setting an intelligent judgment step based on the open-source WebVR browser, automatically switches to VR mode and displays the panoramic content of the target webpage when the loaded target webpage is a panoramic webpage created using Krpano, without requiring manual user operation, thus improving page display efficiency and user experience.
[0113] To facilitate better implementation of the object attribute recognition model training method of this application embodiment, this application embodiment also provides a page display device. Please refer to... Figure 3 , Figure 3 This is a first structural schematic diagram of a page display device provided in an embodiment of this application. The page display device 300 may include:
[0114] The startup unit 310 is used to launch a target browser based on a loading request for a target webpage, the target browser being used to display panoramic content;
[0115] The loading unit 320 is used to control the webpage view control to load the target webpage;
[0116] The acquisition unit 330 is used to acquire the webpage source code of the target webpage;
[0117] The judgment unit 340 is used to determine whether the target webpage is a panoramic webpage developed based on a panoramic display plugin by parsing the webpage source code of the target webpage.
[0118] The display unit 350 is used to call a target function to perform mode switching and control the target browser to render the target webpage in VR mode to display the panoramic content of the target webpage if it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin.
[0119] In some embodiments, after displaying the panoramic view content of the target webpage, the display unit 350 may further be used for:
[0120] Get 2D mode switching request;
[0121] Based on the 2D mode switching request, the currently displayed content is switched from the panoramic view of the target webpage to the two-dimensional view of the target webpage.
[0122] In some embodiments, when the display unit 350 receives a 2D mode switching request, it can implement it in any of the following ways:
[0123] In response to the object's first input operation, the 2D mode switching request is generated;
[0124] The current battery level of the computer device used to run the target browser is detected. If the current battery level is lower than the minimum battery level, the 2D mode switching request is generated.
[0125] The current network speed of the computer device used to run the target browser is detected. If the current network speed is lower than the lower limit, the 2D mode switching request is generated.
[0126] In some embodiments, after the display unit 350 switches to the two-dimensional screen content of the target webpage, it can also be used for:
[0127] Get VR mode switching request;
[0128] Based on the VR mode switching request, the currently displayed content is switched from the two-dimensional content of the target webpage to the panoramic content of the target webpage.
[0129] In some embodiments, when the display unit 350 receives a VR mode switching request, it can be implemented in any of the following ways:
[0130] In response to the object's second input operation, the VR mode switching request is generated;
[0131] The current battery level of the computer device used to run the target browser is detected. If the current battery level is higher than the lower limit of the battery level, the VR mode switching request is generated.
[0132] The current network speed of the computer device used to run the target browser is detected. If the current network speed is higher than the lower limit of the network speed, the VR mode switching request is generated.
[0133] In some embodiments, the display unit 350 may also be used for:
[0134] If it is determined that the target webpage is not a panoramic webpage developed based on a panoramic display plugin, then the target browser is controlled to render the target webpage in 2D mode to display the two-dimensional content of the target webpage.
[0135] In some embodiments, the loading unit 320 may be used for:
[0136] Obtain the Uniform Resource Locator (URL) of the target webpage;
[0137] Send the Uniform Resource Locator (URL) of the target webpage to the webpage view control for loading;
[0138] The control page view loads the target webpage based on the target webpage's Uniform Resource Locator (URL).
[0139] In some embodiments, the acquisition unit 330 may be used for:
[0140] After the target webpage is loaded, the webpage source code is obtained through the calling function of the webpage view control.
[0141] It should be noted that the functions of each unit in the page display device 300 in this application embodiment can be referred to the specific implementation of any embodiment in the above method embodiments, and will not be repeated here.
[0142] Each unit in the aforementioned page display device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.
[0143] For example, the page display device 300 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the page display device 300 can be the terminal or server.
[0144] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0145] like Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device can be a terminal. The terminal can be a smartphone, tablet, laptop, smart TV, smart speaker, wearable smart device, personal computer, etc. The terminal can also include a client, which can be a game client, video client, browser client, or instant messaging client, etc. The computer device 400 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0146] The processor 401 is the control center of the computer device 400. It connects various parts of the computer device 400 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it performs various functions of the computer device 400 and processes data, thereby monitoring the computer device 400 as a whole.
[0147] In this embodiment, the processor 401 in the computer device 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to achieve various functions:
[0148] Based on the loading request for the target webpage, the target browser is launched, which can be used to display panoramic content; the webpage view control is controlled to load the target webpage; the webpage source code of the target webpage is obtained; by parsing the webpage source code of the target webpage, it is determined whether the target webpage is a panoramic webpage developed based on a panoramic display plugin; if it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, the target function is called to perform mode switching, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage.
[0149] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0150] Optional, such as Figure 4 As shown, the computer device 400 also includes: a display screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407. Those skilled in the art will understand that... Figure 4 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0151] The display screen 403 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 403 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 401. It can also receive and execute commands from the processor 401. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 401 to determine the type of touch event. Subsequently, the processor 401 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 403 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 403 can be implemented as two independent components to achieve input and output functions. That is, the display screen 403 can also be used as part of the input unit 406 to achieve input functions.
[0152] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0153] Audio circuitry 405 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 405 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 405, converted back into audio data, and then processed by processor 401 before being transmitted via radio frequency circuitry 404 to, for example, another computer device, or output to memory 402 for further processing. Audio circuitry 405 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0154] The input unit 406 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0155] Power supply 407 is used to supply power to various components of computer device 400. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0156] although Figure 4 As not shown in the diagram, computer equipment 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0157] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0158] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the page display method of the embodiments of this application; for the sake of brevity, further details are omitted here.
[0159] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the page display method described in the embodiments of this application. For simplicity, further details are omitted here.
[0160] This application also provides a computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the page display method described in the embodiments of this application. For simplicity, further details are omitted here.
[0161] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0162] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0163] It should be understood that the above-described memory is exemplary but not restrictive. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0164] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0165] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0166] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0167] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0168] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0169] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0170] 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, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A page display method, characterized in that, The method includes: Based on the loading request for the target webpage, the target browser is launched, which can be used to display panoramic content; Control the webpage view control to load the target webpage; Obtain the source code of the target webpage; By parsing the source code of the target webpage, it is determined whether the target webpage is a panoramic webpage developed based on the panoramic display plugin. This includes: determining whether the source code of the webpage contains the identification code of the panoramic display plugin. If it is determined that the identification code of the panoramic display plugin is contained, then it is determined that the target webpage is a panoramic webpage developed based on the panoramic display plugin. If it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, then the target function is called to perform mode switching, and the target browser is controlled to render the target webpage in VR mode to display the panoramic content of the target webpage.
2. The page display method as described in claim 1, characterized in that, After displaying the panoramic view of the target webpage, the method further includes: Get 2D mode switching request; Based on the 2D mode switching request, the currently displayed content is switched from the panoramic view of the target webpage to the two-dimensional view of the target webpage.
3. The page display method as described in claim 2, characterized in that, The method of obtaining the 2D mode switching request includes any of the following: In response to the object's first input operation, the 2D mode switching request is generated; The current battery level of the computer device used to run the target browser is detected. If the current battery level is lower than the minimum battery level, the 2D mode switching request is generated. The current network speed of the computer device used to run the target browser is detected. If the current network speed is lower than the lower limit, the 2D mode switching request is generated.
4. The page display method as described in claim 3, characterized in that, After switching to the two-dimensional screen content of the target webpage, the following is also included: Get VR mode switching request; Based on the VR mode switching request, the currently displayed content is switched from the two-dimensional content of the target webpage to the panoramic content of the target webpage.
5. The page display method as described in claim 4, characterized in that, The method of obtaining the VR mode switching request includes any of the following: In response to the object's second input operation, the VR mode switching request is generated; The current battery level of the computer device used to run the target browser is detected. If the current battery level is higher than the lower limit of the battery level, the VR mode switching request is generated. The current network speed of the computer device used to run the target browser is detected. If the current network speed is higher than the lower limit of the network speed, the VR mode switching request is generated.
6. The page display method as described in claim 1, characterized in that, The method further includes: If it is determined that the target webpage is not a panoramic webpage developed based on a panoramic display plugin, then the target browser is controlled to render the target webpage in 2D mode to display the two-dimensional content of the target webpage.
7. The page display method as described in claim 1, characterized in that, The control over the webpage view to load the target webpage includes: Obtain the Uniform Resource Locator (URL) of the target webpage; Send the Uniform Resource Locator (URL) of the target webpage to the webpage view control for loading; The control page view loads the target webpage based on the target webpage's Uniform Resource Locator (URL).
8. The page display method as described in claim 1, characterized in that, After the target webpage is loaded, obtaining the webpage source code of the target webpage includes: After the target webpage is loaded, the webpage source code is obtained through the calling function of the webpage view control.
9. A page display device, characterized in that, The device includes: The startup unit is used to launch a target browser based on a loading request for a target webpage, the target browser being used to display panoramic content; The loading unit is used to control the webpage view control to load the target webpage; The acquisition unit is used to acquire the source code of the target webpage; The judgment unit is used to determine whether the target webpage is a panoramic webpage developed based on a panoramic display plugin by parsing the webpage source code of the target webpage, including: determining whether the webpage source code contains the identification code of the panoramic display plugin; if it is determined that the identification code of the panoramic display plugin is contained, then the target webpage is determined to be a panoramic webpage developed based on a panoramic display plugin. The display unit is used to, if it is determined that the target webpage is a panoramic webpage developed based on a panoramic display plugin, call the target function to perform mode switching and control the target browser to render the target webpage in VR mode to display the panoramic content of the target webpage.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the page display method as described in any one of claims 1-8.
11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the steps of the page display method according to any one of claims 1-8 by calling the computer program stored in the memory.
12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the page display method according to any one of claims 1-8.