Virtual reality display method, device, system and storage medium
By rendering and simulating WebVR content on the server side, the compatibility and security issues of WebVR technology are solved, and the user experience and content protection effect are improved.
Patent Information
- Application Number
- CN202111508022.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-12-10
AI Technical Summary
WebVR technology has insufficient compatibility, limited terminal computing power, resulting in delays and freezes, and the risk of content being cracked and stolen locally, affecting user experience and copyright protection.
By creating a virtual browser on the server side, obtain WebVR content, record the screen in real time and send the video to the terminal, simulate operations in the virtual browser according to the terminal's operating instructions and three-dimensional coordinate data, reduce the rendering load of the terminal, improve compatibility and Security.
It reduces the computing pressure of the terminal, improves the user experience and the universality of WebVR technology, prevents content from being cracked and leaked locally, and enhances copyright protection.
Smart Images

Figure CN114201094B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of virtual reality technology, and in particular to a VR (Virtual Reality) display method, device, system and storage medium. Background Art
[0002] WebVR (browser-based virtual reality) technology is a set of browser technology standards jointly proposed by Google and Mozilla. Its goal is to allow users to experience VR applications directly through the browser without downloading and installing various VR applications, thereby lowering the threshold for user experience. At the same time, application developers only need to follow the WebVR standard to develop VR applications, without having to adapt to different platforms and terminals, which can effectively reduce the complexity of VR application development. Summary of the invention
[0003] One purpose of the present disclosure is to improve the compatibility and data security of WebVR applications.
[0004] According to one aspect of some embodiments of the present disclosure, a virtual reality display method is proposed, including: creating a virtual browser on a server and obtaining WebVR content according to a WebVR content request from a terminal; rendering a video interface on the virtual browser according to the WebVR content; recording the video interface and sending the recorded video to the terminal in real time; upon receiving an operation instruction from the terminal and three-dimensional coordinate data of a gyroscope, simulating operations on the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data, and rendering and updating the video interface in real time.
[0005] In some embodiments, the WebVR content request from the terminal includes: receiving a Socket connection establishment request from the user, wherein the Socket connection establishment request is initiated when the user opens a WebVR page through a local browser of the terminal; and establishing a connection with the terminal according to the Socket connection establishment request.
[0006] In some embodiments, creating a virtual browser on the server side and obtaining WebVR content includes: the server creates a virtual browser based on the Puppeteer framework; opening a WebVR page corresponding to the WebVR content request on the virtual browser to obtain the WebVR content.
[0007] In some embodiments, real-time recording of the video interface and sending the recorded video to the terminal in real time includes: the server starts the real-time screen recording function; generates the recorded video with a predetermined frame number as a period, and sends the video to the terminal in real time until the connection with the terminal is disconnected.
[0008] In some embodiments, sending the recorded video to the terminal in real time includes: based on the WebRTC (Web Real-Time Communication) protocol, sending the video back to the terminal in real time.
[0009] In some embodiments, the operation instruction includes: one or more of: rotation, movement and clicking.
[0010] In some embodiments, simulating an operation in the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data includes: when the operation instruction is a click operation, calling Puppeteer to perform a simulated click on the virtual browser according to the coordinates of the user's click.
[0011] In some embodiments, simulating operations in the interface of the virtual browser according to operation instructions and three-dimensional coordinate data includes: when the operation instruction is a rotation or movement operation, calling Puppeteer to perform a simulated gravity-sensing drag operation on the page of the virtual browser according to the three-dimensional coordinate information of the gyroscope.
[0012] In some embodiments, the virtual reality display method further includes: when the connection with the terminal is disconnected, closing the virtual browser and releasing the memory occupied by the virtual browser.
[0013] According to one aspect of some embodiments of the present disclosure, a virtual reality display method is proposed, including: a terminal sends a WebVR content request to a server, wherein the server creates a virtual browser and obtains WebVR content, and renders a video interface in the virtual browser according to the WebVR content; receives a video from the server and displays it, wherein the server records the video interface and sends the recorded video to the terminal in real time; and sends the user's operation instructions generated based on the video and the three-dimensional coordinate data of the gyroscope to the server, so that the server simulates the operation in the interface of the virtual browser and renders and updates the video interface in real time.
[0014] In some embodiments, the terminal sending a WebVR content request to the server includes: when a WebVR page is opened in a local browser of the terminal, generating a Socket connection establishment request; and sending the Socket connection establishment request to the server.
[0015] In some embodiments, the virtual reality display method further includes: disconnecting from the server when the WebVR page is closed.
[0016] According to one aspect of some embodiments of the present disclosure, a server-side virtual reality display device is proposed, comprising: a request acquisition unit, configured to request WebVR content from a terminal; an interface generation unit, configured to create a virtual browser and obtain WebVR content; render a video interface in the virtual browser according to the WebVR content; and, when the interaction unit receives an operation instruction from the terminal and three-dimensional coordinate data of a gyroscope, simulate the operation in the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data, and render and update the video interface in real time; a screen recording unit, configured to record the video interface; and an interaction unit, configured to send the recorded video to the terminal in real time, and receive the operation instruction from the terminal and the three-dimensional coordinate data of the gyroscope.
[0017] In some embodiments, the server-side virtual reality display device further includes: a release unit configured to close the virtual browser and release the memory occupied by the virtual browser when the connection with the terminal is disconnected.
[0018] According to one aspect of some embodiments of the present disclosure, a terminal-side virtual reality display device is proposed, including: a request unit, configured to send a WebVR content request to a server, wherein the server creates a virtual browser and obtains WebVR content, and renders a video interface in the virtual browser according to the WebVR content; a display unit, configured to receive and display a video from the server, wherein the server records the video interface and sends the recorded video to the terminal in real time; a data sending unit is configured to send the user's operation instructions generated based on the video and the three-dimensional coordinate data of the gyroscope to the server, so that the server simulates the operation in the interface of the virtual browser and renders and updates the video interface in real time.
[0019] According to one aspect of some embodiments of the present disclosure, a virtual reality display device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the virtual reality display methods described above based on instructions stored in the memory.
[0020] According to one aspect of some embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, on which computer program instructions are stored, and the instructions are executed by a processor to perform the steps of any one of the virtual reality display methods described above.
[0021] According to one aspect of some embodiments of the present disclosure, a virtual reality display system is proposed, comprising: a server, configured to execute any one of the virtual reality display methods performed by the server side described above; and a terminal, configured to execute any one of the virtual reality display methods performed by the terminal side described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0023] Figure 1 The present invention is a flowchart of some embodiments of the virtual reality display method of the present invention.
[0024] Figure 2 Flowcharts of other embodiments of the virtual reality display method disclosed herein.
[0025] Figure 3 The present invention is a signaling interaction diagram of some embodiments of the virtual reality display method disclosed herein.
[0026] Figure 4 Schematic diagram of some embodiments of the server-side virtual reality display device disclosed in the present invention.
[0027] Figure 5 Schematic diagrams of some embodiments of the terminal-side virtual reality display device disclosed in the present invention.
[0028] Figure 6 Schematic diagrams of some embodiments of the virtual reality display device disclosed herein.
[0029] Figure 7 Schematic diagrams of other embodiments of the virtual reality display device disclosed in the present invention.
[0030] Figure 8 Schematic diagrams of some embodiments of the virtual reality display system disclosed herein. DETAILED DESCRIPTION
[0031] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments.
[0032] The lack of compatibility of WebVR standard browsers (for example, Android native browsers require the use of Chrome 57 or above, and some browsers do not support WebVR), resulting in users having to install browsers that support WebVR on their own, which is not conducive to the promotion of WebVR technology; WebVR content needs to be downloaded to the terminal for local rendering and processing. Due to the limited computing power of the mobile terminal, delays and freezes are prone to occur, affecting the user experience; in addition, WebVR content is at risk of being cracked or stolen locally on the terminal, which is not conducive to copyright protection.
[0033] The flowcharts of some embodiments of the virtual reality display method disclosed in the present invention are as follows: Figure 1The method is performed by a server, and in some embodiments, the server may be a cloud server. In some embodiments, the server may be a server provided by a WebVR service provider, or may be a server assumed to be between a service provider and a user terminal.
[0034] In step 112, according to the WebVR content request from the terminal, a virtual browser is created on the server, and the WebVR content is obtained. In some embodiments, the WebVR content request can be a socket connection establishment request triggered by opening the WebVR interface. In some embodiments, when the server receives a socket connection establishment request from the user, it determines that the WebVR content request is received, and then establishes a connection with the terminal according to the socket connection establishment request.
[0035] In some embodiments, the server creates a virtual browser, and opens a WebVR page corresponding to the WebVR content request on the virtual browser to obtain the content of the WebVR page. In some embodiments, the server can create a virtual browser based on the Puppeteer framework. In some embodiments, the virtual browser can be a Chrome browser.
[0036] In step 113, a video interface is rendered in a virtual browser according to the WebVR content. In some embodiments, the server may not have a display device or may not actually display the virtual browser interface, and may only simulate the display of the video interface in the virtual browser.
[0037] In step 114, the video interface is recorded, and the recorded video is sent to the terminal in real time. In some embodiments, the interface recording function can be turned on, the screen recording interface is generated in real time, and the video is sent to the user terminal immediately, and the screen recording and video sending operations are repeated until the WebVR display service is terminated. In some embodiments, a video can be generated every n frames with a predetermined number of frames n as a cycle, thereby reducing the user's sense of delay and improving the user experience. In some embodiments, n can be a value between 10 and 40, such as generating a video every 30 frames.
[0038] In step 115, after the video is sent to the user terminal, it is determined whether the terminal operation instruction and the gyroscope three-dimensional coordinate data are received. If at least one of the terminal operation instruction or the gyroscope three-dimensional coordinate data is received, step 116 is triggered; otherwise, step 113 is returned to continue to update the rendering video interface based on the WebVR content.
[0039] In step 116, the operation is simulated in the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data, and the video interface is rendered and updated in real time. In some embodiments, the operation instruction may include: one or more of rotation, movement and click. In some embodiments, the rendering and updating of the video interface can be combined with the WebVR content obtained in real time. Since the screen recording operation is continuously performed, step 114 is executed to send the currently recorded video to the terminal.
[0040] In some embodiments, when the operation instruction is a click operation, Puppeteer is called according to the coordinates of the user's click to perform a simulated click on the virtual browser. In some embodiments, when the operation instruction is a rotation or movement operation, Puppeteer is called according to the three-dimensional coordinate information of the gyroscope to perform a simulated gravity-sensing drag operation on the page of the virtual browser.
[0041] Based on the method in the above embodiment, the browser-based WebVR image rendering operation can be released from the terminal side and performed by the server side, thereby reducing the requirements for terminal performance and configuration, reducing the computing pressure of the terminal, improving the user experience, and improving the universality of WebVR technology; preventing WebVR content from being cracked and leaked locally, and facilitating the copyright protection of the content.
[0042] In some embodiments, when the terminal triggers the end of receiving the WebVR service, the connection with the terminal is disconnected, and the server closes the virtual browser and releases the memory occupied by the virtual browser, thereby improving the resource utilization of the server.
[0043] On the terminal side, flow charts of other embodiments of the virtual reality display method disclosed in the present invention are as follows: Figure 2 shown.
[0044] In step 221, the terminal sends a WebVR content request to the server. In some embodiments, when the local browser of the terminal opens a WebVR page, a Socket connection establishment request is generated and sent to the server. In some embodiments, the server can be based on Figure 1 The operations in steps 112 to 115 in the illustrated embodiment generate a screen recording video and send it to the terminal.
[0045] In step 222, the terminal receives the video from the server and displays it. In some embodiments, the video can be displayed in a local browser opened by the user.
[0046] In step 223, the user's operation instructions generated based on the video and the three-dimensional coordinate data of the gyroscope are sent to the server, so that the server side updates the virtual browser virtual display interface based on the user's operation execution and the three-dimensional coordinate data in combination with the WebVR content, thereby affecting the video content sent to the user side next time. In some embodiments, the user can perform operations based on the video content, such as clicking, rotating or moving. In some embodiments, the gyroscope in the user-side device can record the three-dimensional coordinate information in real time.
[0047] Based on the method in the above embodiment, the terminal side can trigger the server to execute the acquisition and rendering operations of WebVR content, and display it according to the video provided by the server, thereby eliminating the need to use the computing power of the terminal to render the video, reducing the requirements for the terminal's computing power and improving the smoothness of the display.
[0048] In some embodiments, when the user triggers closing of a WebVR page, the connection with the server is immediately disconnected, and the current WebVR service is terminated.
[0049] The signaling interaction diagrams of some embodiments of the virtual reality display method disclosed in the present invention are as follows: Figure 3 shown.
[0050] In 301 , the user opens the WebVR web page content in the local browser of the terminal, and the terminal 32 requests to establish a socket connection with the cloud server 31 .
[0051] In 302, the cloud server responds to the terminal request and successfully establishes a socket connection.
[0052] In 303, the cloud server synchronously creates a virtual Chrome browser through the Puppeteer framework (Puppeteer is a Node.js package released by the Chrome development team), synchronously opens the WebVR web content, and starts the screen recording function through the tapCapture API.
[0053] In 304, the cloud server records the screen according to a preset frame rate (eg, 30 frames), and transmits the video screen back to the terminal for playback and display via the WebRTC protocol.
[0054] In 305, the user performs various operations such as rotation, movement, and clicking in the local browser of the terminal, and the operation instructions and the three-dimensional coordinate data of the gyroscope are uploaded to the cloud server in real time.
[0055] In 306, the cloud server simulates the operation instructions and gyroscope data through the Puppeteer framework. If it is a click operation, Puppeteer is called according to the user's click coordinates to simulate the click on the virtual Chrome browser; if it is a gravity sensing operation such as rotation or movement, Puppeteer is called according to the gyroscope's three-dimensional coordinate data to drag the page of the virtual Chrome browser to simulate the gravity sensing effect.
[0056] In 307, the cloud server renders and records the latest video footage in real time.
[0057] In 308, the video image is transmitted back to the terminal for playback and display via the WebRTC protocol.
[0058] Furthermore, during the process of communication between the server 31 and the terminal 32, the operations between 305 to 308 are continuously executed until the terminal side executes 309.
[0059] In 309 , the user closes the browser page, which triggers the server to execute 310 .
[0060] In 310, the server disconnects the socket connection, closes the virtual Chrome browser through Puppeteer and releases the memory.
[0061] Based on the method in the above embodiment, the local browser of the terminal does not need to be compatible with the WebVR technical standard, and any browser can access WebVR content, effectively lowering the user experience threshold; by completing image rendering calculations through the server, the powerful processing capabilities of the cloud can be fully utilized, reducing the local processing load of the terminal, improving system efficiency, and improving user experience; WebVR content does not need to be downloaded to the local terminal, and users cannot steal WebVR 3D models and other material resources through illegal means, effectively improving content security; there is no need to change the existing network and hardware equipment, only software development needs to be carried out on the cloud server, which reduces the implementation cost and improves the implementation efficiency.
[0062] Schematic diagrams of some embodiments of the server-side virtual reality display device 410 of the present disclosure are as follows: Figure 4 shown.
[0063] The request acquisition unit 411 can create a virtual browser on the server and acquire WebVR content according to the WebVR content request from the terminal. In some embodiments, the WebVR content request can be a request for establishing a Socket connection triggered by opening the WebVR interface. In some embodiments, when the server receives a socket connection establishment request from the user, it determines that a WebVR content request is received, and then establishes a connection with the terminal according to the Socket connection establishment request. In some embodiments, the request acquisition unit 411 can create a virtual browser on the server side, open a WebVR page corresponding to the WebVR content request on the virtual browser, and acquire the content of the WebVR page.
[0064] The interface generation unit 412 can render the video interface in the virtual browser according to the WebVR content. In some embodiments, the server may not have a display device or may not actually display the virtual browser interface, but only simulates the display of the video interface in the virtual browser.
[0065] The screen recording unit 413 can record the video interface. In some embodiments, the interface recording function can be turned on to generate a screen recording interface in real time until the WebVR display service ends. In some embodiments, a video can be generated every n frames with a predetermined number of frames n as a cycle.
[0066] The interaction unit 414 can send the recorded video to the terminal in real time, and can also receive the operation instructions and three-dimensional coordinate data fed back by the terminal. In some embodiments, the interaction unit 414 sends the video generated by the screen recording unit 413 to the terminal in real time, thereby reducing the time delay on the user side and improving the user experience. In some embodiments, the interaction unit can also send the operation instructions and three-dimensional coordinate data to the interface generation unit 412.
[0067] The interface generation unit 412 can also simulate operations in the interface of the virtual browser according to the operation instructions and the three-dimensional coordinate data, and render and update the video interface in real time in combination with the real-time acquired WebVR content.
[0068] Such a server-side virtual reality display device can release the browser-based WebVR image rendering operation from the terminal side and perform it on the server side, thereby reducing the requirements for terminal performance and configuration, reducing the computing pressure of the terminal, improving the user experience, and improving the universality of WebVR technology; preventing WebVR content from being cracked and leaked locally, and facilitating the copyright protection of the content.
[0069] In some embodiments, Figure 4As shown, the server-side virtual reality display device 410 may further include a release unit 415, which can close the virtual browser and release the memory occupied by the virtual browser when it is found that the connection with the terminal is disconnected, thereby improving the resource utilization of the server.
[0070] Schematic diagrams of some embodiments of the terminal-side virtual reality display device disclosed in the present invention are as follows Figure 5 shown.
[0071] The request unit 521 can send a WebVR content request to the server. In some embodiments, when the local browser of the terminal opens a WebVR page, a Socket connection establishment request is generated and sent to the server.
[0072] The display unit 522 can receive and display the video from the server.
[0073] The data transmission unit 523 can send the user's operation instructions generated based on the video and the three-dimensional coordinate data of the gyroscope to the server, so that the server side can update the virtual browser virtual display interface based on the user's operation execution and the three-dimensional coordinate data in combination with the WebVR content, thereby affecting the video content sent to the user side next time. In some embodiments, the user can perform operations based on the video content, such as clicking, rotating or moving. In some embodiments, the gyroscope in the user-side device can record the three-dimensional coordinate information in real time.
[0074] Such a terminal-side virtual reality display device can trigger the server to execute the acquisition and rendering operations of WebVR content, and display it according to the video provided by the server, thereby eliminating the need to use the terminal's computing power to render the video, reducing the requirements for the terminal's computing power and improving the smoothness of the display.
[0075] A structural schematic diagram of an embodiment of the virtual reality display device disclosed in the present invention is as follows Figure 6 As shown. The virtual reality display device includes a memory 601 and a processor 602. Wherein: the memory 601 can be a disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiment of the virtual reality display method above. The processor 602 is coupled to the memory 601 and can be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 602 is used to execute the instructions stored in the memory, which can improve the compatibility and data security of the WebVR application.
[0076] In one embodiment, it is also possible to Figure 7As shown, the virtual reality display device 700 can be a device on the user side, such as a user terminal or a device installed in the user terminal; it can also be a device on the server side, such as the server itself or a device installed in the server. The virtual reality display device 700 includes a memory 701 and a processor 702. The processor 702 is coupled to the memory 701 via a BUS bus 703. The virtual reality display device 700 can also be connected to an external storage device 705 via a storage interface 704 to call external data, and can also be connected to a network or another computer system (not shown) via a network interface 706. No detailed description will be given here.
[0077] In this embodiment, by storing data instructions in a memory and then processing the instructions through a processor, the compatibility and data security of WebVR applications can be improved.
[0078] In another embodiment, a computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the method in the corresponding embodiment of the virtual reality display method. It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transitory storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0079] Schematic diagrams of some embodiments of the virtual reality display system disclosed in the present invention are as follows Figure 8 shown.
[0080] The server 81 may be any one of the server-side virtual reality display devices described above, and execute any one of the server-side virtual reality display methods described above.
[0081] Terminals 821~82N, where N is a positive integer, can be any one of the virtual reality display devices on the terminal side mentioned above, and execute any one of the virtual reality display methods executed by the terminal mentioned above.
[0082] In such a system, the terminal can use any browser to access WebVR content, effectively lowering the threshold of user experience; the server can perform image rendering calculations, give full play to the powerful processing power of the cloud, reduce the local processing load of the terminal, improve system efficiency, and improve user experience; WebVR content does not need to be downloaded to the terminal locally, and users cannot steal WebVR 3D models and other material resources through illegal means, effectively improving content security; there is no need to change the existing network and hardware equipment, only software development on the server side, reducing implementation costs and improving implementation efficiency. Such a system can improve user experience and overall system efficiency in platforms and systems that use WebVR technology (such as VR theaters, VR games, VR social networking and other application scenarios), especially in environments with good network quality (such as fiber broadband, 5G networks).
[0083] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.
[0084] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0085] 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 instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0086] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0087] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present disclosure rather than to limit it. Although the present disclosure has been described in detail with reference to the preferred embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present disclosure can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present disclosure, which should be included in the scope of the technical solution for protection of the present disclosure.
Claims
1. A virtual reality display method, executed by a server, comprising: According to a browser-based virtual reality WebVR content request from a terminal, a virtual browser is created on a server, and WebVR content is obtained, including: receiving a socket connection establishment request from a user, wherein the socket connection establishment request is initiated when the user opens a WebVR page through a local browser of the terminal; establishing a connection with the terminal according to the socket connection establishment request; the server creates a virtual browser based on a Puppeteer framework; and opening a WebVR page corresponding to the WebVR content request on the virtual browser to obtain the WebVR content; Rendering a video interface in the virtual browser according to the WebVR content; Recording the video interface and sending the recorded video to the terminal in real time, including: the server starts a real-time screen recording function; generating a recorded video with a predetermined number of frames as a period, and sending the video to the terminal in real time until the connection with the terminal is disconnected; When receiving an operation instruction of the terminal and the three-dimensional coordinate data of the gyroscope, simulating an operation on the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data, including: when the operation instruction is a click operation, calling Puppeteer to perform a simulated click on the virtual browser according to the coordinates clicked by the user; and / or when the operation instruction is a rotation or movement operation, calling Puppeteer to perform a simulated gravity-sensing drag operation on the page of the virtual browser according to the three-dimensional coordinate information of the gyroscope; The video interface is updated by real-time rendering.
2. The method according to claim 1, wherein: The sending of the recorded video to the terminal in real time includes: based on the Web Real-Time Communication (WebRTC) protocol, sending the video back to the terminal in real time.
3. The method according to claim 1, wherein: The operation instruction includes: one or more of rotation, movement and clicking.
4. The method according to claim 1, further comprising: When the connection with the terminal is disconnected, the virtual browser is closed and the memory occupied by the virtual browser is released.
5. A virtual reality display method, executed by a terminal, comprising: The terminal sends a browser-based virtual reality WebVR content request to the server, wherein the server receives a socket connection establishment request from the user, wherein the socket connection establishment request is initiated when the user opens a WebVR page through a local browser of the terminal; a connection is established with the terminal according to the socket connection establishment request; the server creates a virtual browser based on a Puppeteer framework; a WebVR page corresponding to the WebVR content request is opened on the virtual browser to obtain the WebVR content; Receiving and displaying the video from the server, wherein the server starts a real-time screen recording function; generating a screen recording video with a predetermined number of frames as a period, and sending the video to the terminal in real time until the connection with the terminal is disconnected; The operation instructions generated by the user based on the video and the three-dimensional coordinate data of the gyroscope are sent to the server, so that when the operation instruction is a click operation, the server calls Puppeteer to perform a simulated click on the virtual browser according to the coordinates of the user's click; and / or when the operation instruction is a rotation or movement operation, the server calls Puppeteer to perform a simulated gravity-sensing drag operation on the page of the virtual browser according to the three-dimensional coordinate information of the gyroscope, and the server renders and updates the video interface in real time.
6. The method according to claim 5, wherein: The terminal sending the WebVR content request to the server includes: When a WebVR page is opened in the local browser of the terminal, a socket connection establishment request is generated; The Socket connection establishment request is sent to the server.
7. The method according to claim 5, further comprising: When the WebVR page is closed, the connection with the server is disconnected.
8. A server-side virtual reality display device, comprising: The request acquisition unit is configured to, according to the browser-based virtual reality WebVR content request from the terminal, include: receiving a socket connection establishment request from the user, wherein the user initiates the socket connection establishment request when opening a WebVR page through a local browser of the terminal; establishing a connection with the terminal according to the socket connection establishment request; The interface generation unit is configured as follows: Creating a virtual browser and obtaining WebVR content, including: the server creating a virtual browser based on the Puppeteer framework; opening a WebVR page corresponding to the WebVR content request on the virtual browser to obtain the WebVR content; Rendering a video interface in the virtual browser according to the WebVR content; and When the interaction unit receives the operation instruction of the terminal and the three-dimensional coordinate data of the gyroscope, simulating the operation on the interface of the virtual browser according to the operation instruction and the three-dimensional coordinate data, including: when the operation instruction is a click operation, calling Puppeteer to perform a simulated click on the virtual browser according to the coordinates clicked by the user; and / or when the operation instruction is a rotation or movement operation, calling Puppeteer to perform a simulated gravity-sensing drag operation on the page of the virtual browser according to the three-dimensional coordinate information of the gyroscope; Real-time rendering and updating of the video interface; The screen recording unit is configured to record the video interface, including: starting a real-time screen recording function; generating a recorded video with a predetermined number of frames as a period; The interaction unit is configured to send the recorded video to the terminal in real time, and receive the operation instructions of the terminal and the three-dimensional coordinate data of the gyroscope.
9. The apparatus according to claim 8, further comprising: The releasing unit is configured to close the virtual browser and release the memory occupied by the virtual browser when the connection with the terminal is disconnected.
10. A terminal-side virtual reality display device, comprising: A request unit is configured to send a browser-based virtual reality WebVR content request to a server, wherein the server receives a socket connection establishment request from a user, wherein the socket connection establishment request is initiated when the user opens a WebVR page through a local browser of a terminal; a connection is established with the terminal according to the socket connection establishment request; the server creates a virtual browser based on a Puppeteer framework; a WebVR page corresponding to the WebVR content request is opened on the virtual browser to obtain the WebVR content; A display unit is configured to receive and display the video from the server, wherein the server starts a real-time screen recording function; generates a screen recording video with a predetermined number of frames as a period, and sends the video to the terminal in real time until the connection with the terminal is disconnected; The data sending unit is configured to send the operation instructions generated by the user based on the video and the three-dimensional coordinate data of the gyroscope to the server, so that when the operation instruction is a click operation, the server calls Puppeteer according to the coordinates of the user's click to perform a simulated click on the virtual browser; and / or when the operation instruction is a rotation or movement operation, the server calls Puppeteer according to the three-dimensional coordinate information of the gyroscope to perform a simulated gravity-sensing drag operation on the page of the virtual browser, and the server renders and updates the video interface in real time.
11. A virtual reality display device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 7 based on instructions stored in the memory.
12. A non-transitory computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.
13. A virtual reality display system, comprising: A server, configured to execute the method according to any one of claims 1 to 4; and The terminal is configured to execute the method described in any one of claims 5 to 7.
