A video playing method and device, electronic equipment and storage medium

By mapping video frames onto the surface of a cubic geometry, the problem of texture mapping for static images is solved, resulting in richer information and enhanced 3D immersion, thus improving the viewing experience.

CN116778062BActive Publication Date: 2026-11-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210234153.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2026-11-27
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

In existing technologies, the use of static images for texture mapping of 3D models results in fixed information, which fails to fully arouse the viewing interest of the target audience and cannot strongly feel the immersive feeling of 3D space, leading to a poor viewing experience.

Method used

By mapping video frames onto the surface of a cubic geometry, and utilizing the mapping relationship between the pixels of the video frames and the vertices of the surface, video can be played in real time to replace static image texture mapping.

Benefits of technology

It increases the amount of information the target audience receives, enhances the immersive experience of 3D space, and improves the viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116778062B_ABST
    Figure CN116778062B_ABST
Patent Text Reader

Abstract

The application discloses a video playing method and device, electronic equipment and storage medium, and relates to the technical field of computers. Embodiments of the application can be applied to various scenes such as cloud technology, Internet of Vehicles, intelligent transportation and artificial intelligence. In the method, in response to a video playing operation triggered by a target object for a target surface of a cubic geometric body, a target video is acquired, and each video frame contained in the target video is sequentially mapped to the target surface according to a mapping relationship between position information of each pixel point in the video frame and position information of each vertex on the target surface, so that each mapped video frame is played to the target object. Compared with related technologies, the application can enable the target object to obtain more information, fully arouse the viewing interest of the target object, enhance the 3D space immersion of the target object, and improve the viewing experience of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a video playback method, apparatus, electronic device, and storage medium. Background Technology

[0002] Texture mapping, also known as texture mapping, is the process of establishing the correspondence between the surface of a 3D model and the pixel coordinates of a 2D image space. Generally, the original 3D model does not have texture features. To make the 3D model have better visual effects, it is usually necessary to apply texture mapping to the 3D model.

[0003] For example, see Figure 1 As shown, Figure 1 The 3D scene contains multiple surfaces of 3D models. On each surface, different character images are applied using texture mapping. In this way, the target object can jump or move to different surfaces by clicking or swiping to view the character information presented on different surfaces.

[0004] Although the above solution also uses 3D technology, it uses static images as texture maps on each surface of the 3D model. Therefore, after the static images are applied to each surface of the 3D model, the image information presented on each surface is fixed. Even if the static images on each surface can be updated at set time intervals, the target object can still obtain relatively little image information from the surface of the 3D model, which is why it cannot fully arouse the viewing interest of the target object.

[0005] In addition, using static images for texture mapping does not allow the target object to strongly feel the spatial immersion brought by 3D, resulting in a poor viewing experience for the target object. Summary of the Invention

[0006] To address the technical problems existing in related technologies, embodiments of this application provide a video playback method, device, electronic device, and storage medium, which can enable the target object to obtain more information, fully arouse the target object's viewing interest, enhance the target object's 3D spatial immersion, and improve the target object's viewing experience.

[0007] On one hand, embodiments of this application provide a video playback method, the method comprising:

[0008] In response to a video playback operation triggered by the target object targeting the target surface of the cubic geometry, the target video is acquired.

[0009] Each set of pixels corresponding to each video frame in the target video is obtained, and based on the mapping relationship between the position information of each pixel in each set of pixels and the position information of each vertex on the target surface, each video frame is sequentially mapped onto the target surface; wherein, for each mapped video frame, the mapped video frame is played to the target object.

[0010] On one hand, embodiments of this application provide a video playback device, the device comprising:

[0011] The video acquisition module is used to acquire the target video in response to the video playback operation triggered by the target object targeting the surface of the cubic geometry.

[0012] The video playback module is used to obtain the set of pixels corresponding to each video frame contained in the target video, and based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface, sequentially map each video frame onto the target surface; wherein, for each mapped video frame, the mapped video frame is played to the target object.

[0013] Optionally, the video playback module is specifically used for:

[0014] The target surface is mapped onto a texture coordinate system to obtain a target texture coordinate plane; wherein each vertex on the target surface corresponds to a texture coordinate on the target texture coordinate plane.

[0015] The screen size of a video frame is adjusted according to the image size of the target texture coordinate plane; each pixel in the adjusted video frame corresponds to a texture coordinate on the target texture coordinate plane.

[0016] Each pixel is mapped to a vertex on the target surface that has the same texture coordinates.

[0017] Optionally, the cubic geometry further includes at least one candidate surface, and each candidate surface is associated with a corresponding candidate video; the device further includes a surface switching module for:

[0018] In response to the target object's triggering operation on any of the candidate surfaces, the triggered candidate surface is taken as the new target surface;

[0019] Switch from the target surface to the new target surface;

[0020] In response to a video playback operation triggered by the target object for the new target surface, the candidate video associated with the new target surface is mapped to the new target surface for playback.

[0021] Optionally, the surface switching module is further configured to:

[0022] In response to a sliding operation triggered by the target object for any of the candidate surfaces, the candidate surface selected by the target object is taken as the new target surface;

[0023] In response to a click operation triggered by the target object on any of the candidate surfaces, the candidate surface selected by the click of the target object is taken as the new target surface;

[0024] In response to a viewpoint switching operation triggered by the target object for any of the candidate surfaces, the viewpoint is switched from the current viewpoint to the target viewpoint, and the candidate surface located in the target viewpoint that is face-to-face with the target surface is taken as the new target surface.

[0025] Optionally, the surface switching module is further configured to:

[0026] If the current viewpoint is outside the cubic geometry, then in response to the multi-finger reverse swipe operation triggered by the target object for any of the candidate surfaces, the viewpoint switches from outside the cubic geometry to inside the cubic geometry, and the inside of the cubic geometry is used as the target viewpoint.

[0027] If the current viewpoint is inside the cubic geometry, then in response to the multi-finger swipe operation triggered by the target object on any of the candidate surfaces, the viewpoint switches from inside the cubic geometry to outside the cubic geometry, and the outside of the cubic geometry is taken as the target viewpoint.

[0028] Optionally, the device further includes a screen adjustment module for:

[0029] In response to a screen adjustment operation triggered by the target object on the target surface, the screen size or screen orientation of the target surface is adjusted.

[0030] Optionally, the screen adjustment module is specifically used for:

[0031] In response to a multi-finger pinch operation triggered by the target object on the target surface, the screen size of the target surface is reduced;

[0032] In response to a multi-finger zoom operation triggered by the target object on the target surface, the image size of the target surface is magnified;

[0033] In response to a screen drag and rotation operation triggered by the target object on the target surface, the target surface is rotated to the corresponding screen orientation.

[0034] On one hand, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described video playback method.

[0035] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the video playback method described above.

[0036] On one hand, embodiments of this application provide a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the steps of the video playback method described above.

[0037] The beneficial effects of this application are as follows:

[0038] This application provides a video playback method, apparatus, electronic device, and storage medium. In response to a video playback operation triggered by a target object on a target surface of a cubic geometry, the method acquires a target video and, based on the mapping relationship between the position information of each pixel in the video frame and the position information of each vertex on the target surface, sequentially maps each video frame contained in the target video onto the target surface. This allows for the playback of a mapped video frame to the target object after each frame is mapped. By mapping video as a texture onto the surface of the cubic geometry and then playing the video on that surface, this method enables video playback in a 3D scene. Compared to applying static images as textures to the surface of the cubic geometry, this approach allows the target object to acquire more information, fully stimulating its viewing interest and enhancing its 3D spatial immersion, thus improving its viewing experience.

[0039] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of texture mapping for 3D scenes in related technologies;

[0041] Figure 2 This is a schematic diagram of an application scenario in an embodiment of this application;

[0042] Figure 3This is a flowchart illustrating a video playback method according to an embodiment of this application;

[0043] Figure 4 This is a schematic diagram illustrating a texture mapping process in one embodiment of this application;

[0044] Figure 5a This is a flowchart illustrating another video playback method in an embodiment of this application;

[0045] Figure 5b This is a schematic diagram illustrating one embodiment of adding a start button to a video in this application.

[0046] Figure 5c This is a schematic diagram of a 3D model that includes only geometric structure in an embodiment of this application;

[0047] Figure 5d This is a schematic diagram of a 3D model with video affixed to its surface, as described in an embodiment of this application.

[0048] Figure 6a This is a schematic diagram illustrating a method for reducing the image size of a target surface in an embodiment of this application;

[0049] Figure 6b This is a schematic diagram illustrating the magnified image size of a target surface in an embodiment of this application;

[0050] Figure 6c This is a schematic diagram of the screen orientation of a rotating target surface in an embodiment of this application;

[0051] Figure 7a This is a schematic diagram of a sliding switching candidate surface in an embodiment of this application;

[0052] Figure 7b This is a schematic diagram of a click-to-switch candidate surface embodiment in this application;

[0053] Figure 8a This is a schematic diagram of a viewpoint switching embodiment in this application;

[0054] Figure 8b This is a schematic diagram of a multi-finger reverse swipe operation in an embodiment of this application;

[0055] Figure 8c This is a schematic diagram illustrating a video playback effect in an embodiment of this application;

[0056] Figure 8d This is a schematic diagram of another viewpoint switching in an embodiment of this application;

[0057] Figure 8e This is a schematic diagram of another multi-finger opposing swipe operation in an embodiment of this application;

[0058] Figure 8f This is a schematic diagram of the overall process of a video playback method according to an embodiment of this application;

[0059] Figure 9 This is a schematic diagram of the structure of a video playback device according to an embodiment of this application;

[0060] Figure 10 This is a schematic diagram of another video playback device according to an embodiment of this application;

[0061] Figure 11 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application;

[0062] Figure 12 This is a schematic diagram of the structure of another electronic device in an embodiment of this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0064] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0065] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0066] 3D Model: In this embodiment of the application, the 3D model is a cubic geometry or a 3D object.

[0067] Hyper Text Markup Language 5 (HTML5) is a language used to describe how web content is built. HTML5 is the next-generation standard for the internet, a language for constructing and presenting internet content, and is considered one of the core technologies of the internet. HTML5 is the specification for HTML, the core language of the web. The content that an audience sees when browsing a webpage is originally in HTML format, but it has been processed using certain technologies to convert it into recognizable information.

[0068] Video: HTML5 specifies a method for including videos using the video element, which can be used to play videos.

[0069] Web Graphics Library (WebGL): A 3D graphics protocol. This graphics technology standard allows JavaScript and OpenGL ES 2.0 to be combined. By adding a JavaScript binding to OpenGL ES 2.0, WebGL can provide hardware-accelerated 3D rendering for HTML5 Canvas. This allows web developers to utilize the system's graphics card to display 3D scenes and models more smoothly in the browser. Canvas is part of HTML5, allowing scripting languages ​​to dynamically render bitmap images.

[0070] Three.js: A 3D engine that runs in a browser and can be used to create various 3D scenes on the Web. Three.js is an easy-to-use 3D graphics library formed by encapsulating and simplifying the WebGL interface, which includes various objects such as cameras, lighting, and materials.

[0071] 3D camera: Used to simulate what the human eye sees.

[0072] The word “exemplary” as used below means “serving as an example, embodiment, or illustration.” Any embodiment illustrated as an “exemplary” need not be construed as superior to or better than other embodiments.

[0073] The terms "first" and "second" used in this document are for descriptive purposes only and should not be construed as indicating relative importance or implying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0074] The design concept of the embodiments of this application is briefly introduced below:

[0075] Under related technologies, such as Figure 1 As shown, static images are typically used as texture maps on different surfaces of a 3D model. This allows users to view the information contained in the corresponding static images on different surfaces by switching between them.

[0076] However, once the above method applies static images to different surfaces of a 3D model, the image information displayed on these surfaces becomes fixed. Users can only obtain very limited information from these surfaces, thus failing to capture their viewing interest. Furthermore, using static images as texture maps for 3D models does not allow users to strongly experience the spatial immersion provided by 3D, resulting in a poor viewing experience.

[0077] In view of this, embodiments of this application propose a video playback method, apparatus, electronic device, and storage medium. In response to a video playback operation triggered by a target object on a target surface of a cubic geometry, the method acquires a target video and, based on the mapping relationship between the position information of each pixel in the video frame and the position information of each vertex on the target surface, sequentially maps each video frame contained in the target video onto the target surface. This ensures that for each mapped video frame, the mapped video frame is played back to the target object. By mapping 2D video onto the surface of a cubic geometry, the visual effect of video playing on the surface of the cubic geometry can be created. This not only allows the target object to obtain more useful information through the video, increasing their viewing interest, but also allows them to fully experience the charm of 3D technology, enhancing their 3D spatial immersion and improving their viewing experience.

[0078] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0079] See Figure 2 The diagram shown illustrates an application scenario in this embodiment. This application scenario includes at least a terminal device 110 and a server 130, allowing access to the application interface 120 via the terminal device 110. The number of terminal devices 110 and servers 130 can be one or more; this application does not specify a particular number for either. The terminal device 110 and server 130 can communicate via a communication network.

[0080] In this embodiment, a video application with video playback function is pre-installed in the terminal device 110. The target user can watch videos through the video playback interface of the video application. The types of video applications include client applications, web applications, and mini-program applications. The terminal device 110 may be, but is not limited to, a personal computer, mobile phone, tablet computer, laptop, e-book reader, smart home device, smart voice interaction device, in-vehicle terminal, etc.

[0081] Server 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing 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 networks (CDNs), and big data and artificial intelligence platforms. Terminal device 110 and server 130 can be connected directly or indirectly via wired or wireless communication; this application does not impose any restrictions on this.

[0082] The video playback method in this embodiment can be executed by the terminal device 110, the server 130, or by the interaction between the terminal device 110 and the server 130.

[0083] Taking the video playback method of this application embodiment executed by terminal device 110 as an example, it includes the following steps:

[0084] Terminal device 110 responds to the target surface of the cubic geometry displayed in the video playback interface of the video application of the target object, triggers a video playback operation, acquires the target video, obtains the pixel set corresponding to each video frame contained in the target video, and maps each video frame onto the target surface in sequence based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface. Each time a video frame is mapped, the mapped video frame is played to the target object.

[0085] It should be noted that, Figure 2 This is an example of the application scenario of the video playback method of this application. However, the application scenarios to which the method in the actual embodiment of this application can be applied are not limited to this.

[0086] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.

[0087] Figure 3 The flowchart shown is a video playback method according to an embodiment of this application. The method can be executed by a computer device, which may be... Figure 2The terminal device 110 and / or server 130 in the middle. For example... Figure 3 As shown, it includes the following steps:

[0088] Step S301: In response to the target object's video playback operation triggered on the target surface of the cubic geometry, acquire the target video.

[0089] Here, a cubic geometry is a 3D object with a defined physical shape, and it can include multiple surfaces. Each surface of the cubic geometry can correspond to a video. Therefore, in response to a video playback operation triggered by a target object targeting any surface of the cubic geometry, i.e., the target surface, the target video corresponding to that target surface can be obtained.

[0090] Step S302: Obtain the set of pixels corresponding to each video frame in the target video, and based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface, map each video frame onto the target surface in sequence; wherein, for each mapped video frame, play the mapped video frame to the target object.

[0091] After obtaining the target video, for any one of the video frames contained in the target video, the following operations can be performed:

[0092] First, the target surface is mapped to the texture coordinate system to obtain the target texture coordinate plane, where each vertex on the target surface corresponds to a texture coordinate on the target texture coordinate plane. Then, the screen size of a video frame is adjusted according to the image size of the target texture coordinate plane, so that each pixel in the adjusted video frame corresponds to a texture coordinate on the target texture coordinate plane. Finally, each pixel is mapped to a vertex on the target surface that has the same texture coordinate.

[0093] Texture mapping is a square pattern or image applied to the surface of an object. It can change the color, brightness, and other appearance of the object's surface, making 3D objects look more realistic.

[0094] In 3D technology, texture maps are primarily mapped onto the appearance of 3D models using UV coordinates. UV is short for texture coordinate system, which has two coordinate axes, U and V. U represents the distribution on the horizontal axis, and V represents the distribution on the vertical axis. Their values ​​range from 0 to 1, representing the percentage distance of a point from the origin (0, 0) of the texture coordinate system. For example, a U coordinate of 0.3 indicates that the point is 30% away from the origin on the horizontal axis.

[0095] UV coordinates can be used to locate and obtain the color information of each pixel on the texture map. Since 3D objects are composed of vertices, by binding the correspondence between UV coordinates and the vertices of 3D objects, the color information of a pixel on the texture map can be accurately mapped to a vertex on the surface of the 3D object. Through this mapping relationship, the appearance of the surface of the 3D object can be determined.

[0096] In other words, UV mapping can be understood as "peeling off" the surface of a 3D object and then unfolding it onto a 2D plane. When you need to change the appearance of a 3D object, you only need to modify this 2D texture map, which makes it easy to modify and operate.

[0097] Specifically, taking a 3D object as a sphere and a texture map as an Earth pattern, and applying the Earth pattern to the surface of the sphere as an example, we can illustrate the process of applying a 2D texture map to the surface of a 3D object. Figure 4 As shown, firstly, all vertices on the surface of the sphere are unfolded onto the UV plane, and then the Earth pattern is stretched into a square and corresponds to the UV plane. In this way, through the mapping relationship, each vertex on the surface of the 3D object corresponds to the color information of the corresponding pixel in the texture map.

[0098] When each video frame is mapped onto the target surface according to the mapping relationship between the video frame and the target surface, a video frame is played after each video frame is mapped. That is, each time a video frame of the target video is mapped onto the target surface of the cubic geometry, the target object can view the content of the video frame on the target surface.

[0099] Alternatively, multiple cubic geometries can be freely combined to obtain a 3D object with a set shape, and the corresponding video can be used as a texture map and mapped onto the corresponding surface of the obtained 3D object.

[0100] In one embodiment, the video playback method proposed in this application can also be implemented according to... Figure 5a The process shown in the diagram will be used for implementation. For example... Figure 5a As shown, the following steps may be included:

[0101] Step S501: Create video elements.

[0102] You can add video elements to the video playback page.

[0103] Specifically, using <video>Tags can be used to add video containers to video playback pages. <video>The `<video>` tag is used in HTML5 to define video, and it allows you to play videos on a video playback page.

[0104] When embedding a video in a video playback page, specifying the "display:none" style will make the video invisible on the playback page. This is because the video needs to be applied as a texture map to the surface of the 3D model, rather than being displayed directly on the playback page. The detailed code is as follows:

[0105]

[0106] The HTML5 specification requires that videos be launched via touch interaction from the target user, so a launch button needs to be added to each video to guide the target user to click the screen. For example... Figure 5b As shown, the play button in the center of the video is the start button that guides the target audience to click on the screen.

[0107] The specific steps are as follows: First, capture the first frame of the video and use it as the initial texture map on the surface of the 3D model. In this way, the first frame of the video will appear on the 3D model. Then, add a play button to the first frame of the video and listen for screen click events.

[0108] Alternatively, you can skip capturing the first frame of the video and simply display the play button or a prompt message to encourage the target to click on the screen.

[0109] After detecting a click event on the target object, a video can be played on the surface of the 3D model. The relevant code is as follows:

[0110]

[0111] Step S502: Bind the video element to the video texture.

[0112] A typical texture map is a two-dimensional image. By continuously changing this texture map, the surface of the 3D model is constantly changing, and finally, the appearance of the 3D model is changed when the WebGL driver executes screen rendering instructions.

[0113] When the video frame changes, the current video frame is captured, and then this frame is applied as a new texture map to the surface of the 3D model.

[0114] VideoTexture is a video texture encapsulated by the Three.js engine. It allows you to create a texture object that uses video as a texture image.

[0115] VideoTexture automatically obtains each frame of the video based on its playback and converts the frame into a square texture map that can be used by the Three.js engine.

[0116] The video element created in step S501 can be bound to a video texture, so that the video texture will automatically update when the video frame changes. The code for creating the video texture can be as follows:

[0117] const video = document.getElementById("video"); / / Get the video object

[0118] const texture = new THREE.VideoTexture(video); / / Pass the video object to the video texture

[0119] Step S503: Create the geometry and surface materials of the 3D model.

[0120] To create a 3D model in Three.js, you need to provide two properties: Geometry and Material. Geometry defines the physical shape of the 3D model, such as UV coordinates, vertex position vectors, face indices, and normals. Material defines the visual appearance of the 3D model, such as color, shading, and transparency.

[0121] PlaneGeometry is a class in Three.js used to create planar cubes. It can be used as the geometry of a 3D model.

[0122] MeshLambertMaterial is a Three.js material used to represent surface materials without specular highlights. It can be used as the surface material for 3D models. Texture maps must be bound to the surface material to be understood and used by the Three.js engine. Without binding textures to the surface material, the effect is as follows: Figure 5c As shown, at this point only the geometry of the 3D model can be seen.

[0123] The embodiments of this application use MeshLambertMaterial as the surface material of the 3D model only to prevent video reflection. In practical applications, there are no restrictions on the type of material used for the surface material of the 3D model.

[0124] Step S504: Bind the video texture to the surface material of the 3D model.

[0125] After creating the geometry and surface material of the 3D model, the video texture created in step S502 can be bound to the surface material using the `map` parameter of `MeshLambertMaterial`. The relevant code for binding the video texture to the surface material is as follows:

[0126] / / Create the geometry, where xsize, ysize, and zsize are the length, width, and height of the 3D model, respectively.

[0127] let geometry=new THREE.BoxBufferGeometry(xsize,ysize,zsize);

[0128] / / Create a surface material, specifying its color and texture map. Pass the video texture created above as the texture to this surface material.

[0129] let material=new THREE.MeshLambertMaterial({color:0xffffff,map:texture});

[0130] / / Creating video fragments using geometry and surface materials

[0131] let mesh=new THREE.Mesh(geometry, material);

[0132] When the video texture created in step S502 is applied to the surface material of the 3D object, due to the characteristics of video textures, the process in step S504 will be automatically executed again whenever a new texture map is generated.

[0133] pass Figure 5a The relevant processes shown in the figure are as follows: Figure 5d As shown, a 3D model in the shape of a Rubik's Cube can be created, and the video can be applied as a texture to each surface of the Rubik's Cube.

[0134] After the video texture is mapped onto the surface of the cube geometry through the surface material, the latest pattern of the video texture is rendered onto the appearance of the cube geometry surface according to the original UV coordinates each time WebGL renders the scene, so that the video being played can be seen on the surface of the cube geometry.

[0135] The video playback method proposed in this application captures the current frame in real time during video playback. During each screen rendering, the video frame is updated onto the texture maps of the 3D model. Finally, texture mapping allows the appearance of the 3D model to change synchronously with the video frame in real time, visually appearing as if the video is playing on the 3D model, thus enriching the expressiveness of the 3D scene. Furthermore, 3D models can be freely combined according to project needs, and combined with changes in the position of the 3D camera, the interaction between the target object and the video can be further enriched, stimulating the target object's curiosity and increasing their interest in watching and interacting.

[0136] In some embodiments, when a target object is watching a video, in response to a screen adjustment operation triggered by the target object on the target surface, the screen size or screen orientation of the target video played on the target surface of the cubic geometry can be adjusted.

[0137] Specifically, in response to a multi-finger pinch operation triggered by the target object on the target surface, the screen size of the target surface can be reduced. Furthermore, the degree of reduction in the screen size of the target surface is determined by the multi-finger pinch operation triggered by the target object on the target surface.

[0138] For example, Figure 6a (1) The currently displayed screen on the target surface, in response to a multi-finger pinch operation triggered by the target object on the target surface, can be... Figure 6a (1) The screen size is reduced so that the target surface displays as shown in the image. Figure 6a (2) The screen shown.

[0139] In response to a multi-finger zoom-in operation triggered by the target object on the target surface, the image size of the target surface can be magnified. Furthermore, the degree of magnification of the target surface image size is determined by the multi-finger zoom-in operation triggered by the target object on the target surface.

[0140] For example, Figure 6b (1) The currently displayed image on the target surface, in response to a multi-finger zoom operation triggered by the target object on the target surface, can be... Figure 6b (1) The screen size is enlarged to make the target surface appear as shown. Figure 6b (2) The screen shown.

[0141] In response to a screen drag rotation operation triggered by a target object on a target surface, the target surface can be rotated to the corresponding screen orientation. Furthermore, when rotating the screen orientation of the target surface, the target surface is rotated to the corresponding screen orientation according to the target direction indicated by the screen drag rotation operation triggered by the target object.

[0142] For example, Figure 6c (1) The currently displayed screen on the target surface, responding to a screen drag-rotate operation triggered by the target object on the target surface, wherein the screen drag-rotate operation indicates a 45° right rotation, can... Figure 6c The image shown in (1) is rotated 45° to the right, so that the target surface displays as shown in [the image]. Figure 6c (2) The screen shown.

[0143] In other embodiments, the cubic geometry includes multiple surfaces. In response to certain operations triggered by a target object on the cubic geometry, the target object can switch from one surface to another. Furthermore, each surface can correspond to a video being played. Therefore, when the target object is watching a video on one surface of the cubic geometry, in response to a switching operation triggered by the target object on any surface of the cubic geometry, it can switch from the current surface to another surface and watch the video playing on that other surface.

[0144] Specifically, the cubic geometry may include a target surface and at least one candidate surface, and each candidate surface is associated with a corresponding candidate video. In response to a triggering operation by the target object on any candidate surface, the triggered candidate surface can be used as the new target surface, switching from the target surface to the new target surface. In response to a video playback operation triggered by the target object on the new target surface, the candidate video associated with the new target surface is mapped to the new target surface for playback.

[0145] In response to a sliding operation triggered by the target object for any candidate surface, the candidate surface selected by the target object can be used as the new target surface.

[0146] For example, such as Figure 7a As shown, the cubic geometry is a Rubik's Cube. Assuming the target surface is surface A in the Rubik's Cube, in response to the sliding operation triggered by the target object on surface B, it can slide to switch from surface A to surface B and use surface B as the new target surface. When the target object clicks to play the video on surface B, the video associated with surface B can be mapped onto surface B and played on surface B.

[0147] Furthermore, when the cubic geometry is a Rubik's Cube, when the target object's finger moves in the same direction, the Rubik's Cube can be rotated in the direction of movement. As long as the sliding distance is far enough, a surface that was originally located at the back of the Rubik's Cube can be rotated to the front of the Rubik's Cube, so that it can be seen by the target object.

[0148] In response to a click operation triggered by the target object on any candidate surface, the candidate surface selected by the click of the target object can be used as the new target surface.

[0149] For example, such as Figure 7b As shown, the cubic geometry is a Rubik's Cube. Assuming the target surface is surface A in the Rubik's Cube, in response to a click operation triggered by the target object on surface B, it can switch from surface A to surface B and use surface B as the new target surface. When the target object clicks to play a video on surface B, the video associated with surface B can be mapped onto surface B and played on surface B.

[0150] In response to a viewpoint switching operation triggered by the target object for any candidate surface, the viewpoint can be switched from the current viewpoint to the target viewpoint, and the candidate surface located in the target viewpoint that is face-to-face with the target surface can be taken as the new target surface.

[0151] Specifically, cubic geometry generally includes an inner surface and an outer surface, for example, such as Figure 5d As shown, when the cubic geometry is a Rubik's Cube, there are 4 surfaces on the outside of the Rubik's Cube and 4 surfaces on the inside of the Rubik's Cube. Each of the 8 surfaces, both inside and outside the Rubik's Cube, can play a corresponding video.

[0152] If the current viewpoint is located outside the cubic geometry, in response to the multi-finger reverse swipe operation triggered by the target object for any candidate surface, the viewpoint can be switched from the outside of the cubic geometry to the inside of the cubic geometry, and the inside of the cubic geometry can be used as the target viewpoint.

[0153] For example, such as Figure 8a As shown, the current viewpoint of the target object is located outside the cubic geometry, and the target surface is surface A. The response to the target object triggering an event on surface C is as follows: Figure 8b The multi-finger reverse swipe operation shown allows switching from the outside to the inside of a cubic geometry, and designates surface C, located inside the cubic geometry opposite surface A, as the new target surface. When the target object clicks to play a video on surface C, the video associated with surface C can be mapped onto surface C and played on surface C. The visual effect of playing the video on surface C is as follows: Figure 8c As shown.

[0154] In addition, when the target object's current viewpoint is inside the cubic geometry, the target object can view multiple surrounding videos by swiping left and right. Furthermore, if the content of each video can be seamlessly connected, the visual effect of an immersive exhibition hall can be simulated.

[0155] If the current viewpoint is inside the cube geometry, then in response to a multi-finger swipe operation triggered by the target object on any candidate surface, the viewpoint switches from inside the cube geometry to outside the cube geometry, and the outside of the cube geometry is used as the target viewpoint.

[0156] For example, such as Figure 8d As shown, the current viewpoint of the target object is located inside the cubic geometry, and the target surface is surface D. The response to the target object triggering an event on surface B is as follows: Figure 8e The multi-finger swipe operation shown allows switching from the inside to the outside of a cubic geometry, and designates surface B, located on the outside of the cubic geometry opposite surface D, as the new target surface. When the target object clicks to play a video on surface B, the video associated with surface B can be mapped onto surface B and played on surface B.

[0157] In one embodiment, when the cubic geometry is a Rubik's Cube, the position of the 3D camera can be changed if multiple fingers of the target object move in opposite directions. Specifically, when multiple fingers of the target object move in the following manner... Figure 8e When the fingers of the target object are brought together in the manner shown, the 3D camera can be moved away from the center of the Rubik's Cube. When multiple fingers of the target object are aligned as shown... Figure 8b When the cubes are far apart as shown, the 3D camera can be brought closer to the center of the cube.

[0158] In some embodiments, the overall process of the video playback method proposed in this application can be as follows: Figure 8f The process shown in the diagram will be used for implementation. For example... Figure 8f As shown, the following steps may be included:

[0159] Step S801: Create a video and bind the video to a video texture.

[0160] Create one or more videos to be mapped, and use VideoTexture to use the created videos as texture objects for the texture, so as to bind the videos to the video texture.

[0161] Step S802: Extract each frame of the video and convert it into a texture map.

[0162] When the video frame changes, the video texture extracts the current frame of the video and converts it into a texture map.

[0163] Step S803: Create the geometry and surface materials required for the 3D model.

[0164] Creating a 3D model requires two attributes: geometry and surface material. The geometry and surface material determine the 3D model accordingly.

[0165] Step S804: Apply the converted texture map to the surface material of the 3D model.

[0166] After creating the geometry and surface materials of the 3D model, each frame of the video converted into a texture map in step S802 can be applied to the surface material of the 3D model. Due to the characteristics of video textures, the process in step S804 will be automatically executed again whenever a new texture map is generated.

[0167] When performing texture mapping, the corresponding video can be applied to one or more surfaces of the 3D model as needed.

[0168] Step S805: In response to the triggering operation of the target object, rotate the 3D model or change the position of the 3D camera.

[0169] After the video is applied as a texture map to the surface of the 3D model, the 3D model can be rotated or the position of the 3D camera can be changed in response to the triggering operation of the target object.

[0170] Specifically, it may include any of the following operations:

[0171] In response to a swipe action triggered by the target object, you can switch to the surface of the 3D model that was selected by the swipe action of the target object;

[0172] In response to a click action triggered by the target object, you can switch to the surface of the 3D model that was clicked by the target object;

[0173] If the current position of the 3D camera is outside the 3D model, then in response to the multi-finger reverse swipe operation triggered by the target object, it can switch from the outside of the 3D model to the inside of the 3D model;

[0174] If the current position of the 3D camera is inside the 3D model, then in response to the multi-finger swipe operation triggered by the target object, the camera will switch from inside the 3D model to outside the 3D model.

[0175] In response to a multi-finger pinch operation triggered by the target object, the screen size on the surface of the 3D model is reduced;

[0176] In response to a multi-finger zoom operation triggered by the target object, zoom in on the image size on the surface of the 3D model;

[0177] In response to a drag-and-rotate operation triggered by the target object, rotate the image on the surface of the 3D model to the corresponding orientation.

[0178] Step S806: Render the video image onto the screen using WebGL.

[0179] WebGL re-renders the screen every frame because of the texture mapping of the model materials. Figure 1 The constant changes cause the model's appearance to change as well, thus creating the visual effect of a video playing on the surface of the 3D model.

[0180] The video playback method proposed in this application involves projecting multiple videos onto different surfaces of a cubic geometry using texture mapping. This is achieved by continuously replacing the texture maps of each surface material in each frame rendered using WebGL. One video can correspond to one surface or multiple surfaces. The cubic geometry can be set to any shape as needed. The target object can switch between the surfaces of the cubic geometry to watch videos on different surfaces through corresponding swiping or clicking operations. It can also control a 3D camera to enter the interior of the cubic geometry, thereby obtaining a simulated viewing experience similar to a panoramic exhibition hall, enriching the visual representation of videos in 3D, and increasing the target object's interest in interaction.

[0181] and Figure 3 The video playback method shown is based on the same inventive concept. This application also provides a video playback device, which can be deployed in a server or terminal device. Since this device corresponds to the video playback method of this application, and the principle by which this device solves the problem is similar to that of the method, the implementation of this device can refer to the implementation of the above method; repeated details will not be elaborated further.

[0182] Figure 9 This application provides a schematic diagram of the structure of a video playback device according to an embodiment of the present application. Figure 9 As shown, the video playback device includes a video acquisition module 901 and a video playback module 902.

[0183] Among them, the video acquisition module 901 is used to acquire the target video in response to the video playback operation triggered by the target object on the target surface of the cubic geometry;

[0184] The video playback module 902 is used to obtain the set of pixels corresponding to each video frame contained in the target video, and based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface, to sequentially map each video frame onto the target surface; wherein, for each mapped video frame, the mapped video frame is played to the target object.

[0185] Optional, the video playback module 902 is specifically used for:

[0186] The target surface is mapped onto the texture coordinate system to obtain the target texture coordinate plane; where each vertex on the target surface corresponds to a texture coordinate on the target texture coordinate plane.

[0187] Adjust the screen size of a video frame according to the image size of the target texture coordinate plane; each pixel in the adjusted video frame corresponds to a texture coordinate on the target texture coordinate plane.

[0188] Each pixel is mapped to a vertex on the target surface that has the same texture coordinates.

[0189] Optionally, the cubic geometry also includes at least one candidate surface, and each candidate surface is associated with a corresponding candidate video; such as Figure 10 As shown, the above-mentioned device may further include a surface switching module 1001, used for:

[0190] In response to a triggering operation by the target object on any candidate surface, the triggered candidate surface is used as the new target surface;

[0191] Switch from the target surface to the new target surface;

[0192] In response to a video playback operation triggered by a target object targeting a new target surface, the candidate video associated with the new target surface is mapped to the new target surface for playback.

[0193] Optionally, the surface switching module 1001 is also used for:

[0194] In response to a sliding operation triggered by the target object for any candidate surface, the candidate surface selected by the sliding operation of the target object is taken as the new target surface;

[0195] In response to a click operation triggered by the target object on any candidate surface, the candidate surface selected by the click by the target object is taken as the new target surface;

[0196] In response to a viewpoint switching operation triggered by the target object for any candidate surface, the viewpoint is switched from the current viewpoint to the target viewpoint, and the candidate surface located in the target viewpoint that is face-to-face with the target surface is taken as the new target surface.

[0197] Optionally, the surface switching module 1001 is also used for:

[0198] If the current viewpoint is outside the cube geometry, in response to the multi-finger reverse swipe operation triggered by the target object for any candidate surface, the viewpoint switches from the outside of the cube geometry to the inside of the cube geometry, and the inside of the cube geometry is used as the target viewpoint.

[0199] If the current viewpoint is inside the cube geometry, then in response to a multi-finger swipe operation triggered by the target object on any candidate surface, the viewpoint switches from inside the cube geometry to outside the cube geometry, and the outside of the cube geometry is used as the target viewpoint.

[0200] Optional, such as Figure 10 As shown, the above-mentioned device may further include a screen adjustment module 1002, used for:

[0201] In response to a screen adjustment operation triggered by the target object on the target surface, adjust the screen size or screen orientation of the target surface.

[0202] Optional, the image adjustment module 1002 is specifically used for:

[0203] In response to a multi-finger pinch operation triggered by the target object on the target surface, the screen size of the target surface is reduced;

[0204] In response to a multi-finger zoom operation triggered by the target object on the target surface, zoom in on the image size of the target surface;

[0205] In response to a screen drag and rotation operation triggered by the target object on the target surface, rotate the target surface to the corresponding screen orientation.

[0206] Based on the same inventive concept as the above method and apparatus embodiments, this application also provides an electronic device.

[0207] In one embodiment, the electronic device may be a server, such as... Figure 2 The server 130 is shown. In this embodiment, the structure of the electronic device can be as follows: Figure 11 As shown, it includes a memory 1101, a communication module 1103, and one or more processors 1102.

[0208] The memory 1101 is used to store computer programs executed by the processor 1102. The memory 1101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0209] Memory 1101 may be volatile memory, such as random-access memory (RAM); memory 1101 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1101 may be any other medium capable of carrying or storing desired program code having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1101 may be a combination of the above-described memories.

[0210] The processor 1102 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 1102 is used to implement the aforementioned video playback method when it calls the computer program stored in the memory 1101.

[0211] The communication module 1103 is used to communicate with terminal devices and other electronic devices. If the electronic device is a server, the server can receive the target video sent by the terminal device through the communication module 1103.

[0212] This application does not limit the specific connection medium between the memory 1101, the communication module 1103, and the processor 1102 as described above. This disclosure embodiment... Figure 11 The memory 1101 and the processor 1102 are connected via a bus 1104, and the bus 1104 is in Figure 11 The connections between other components are shown in thick lines only and are not intended to be limiting. Bus 1104 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0213] In another embodiment, the electronic device can be any electronic device such as a mobile phone, tablet computer, POS (Point of Sales), in-vehicle computer, smart wearable device, or PC. The electronic device can also be... Figure 2 The terminal device 110 shown is shown.

[0214] Figure 12 A structural block diagram of an electronic device provided in an embodiment of this application is shown. Figure 12 As shown, the electronic device includes: a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, a wireless fidelity (WiFi) module 1270, a processor 1280, and other components. Those skilled in the art will understand that... Figure 12 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0215] The following is combined Figure 12 A detailed introduction to each component of the electronic device:

[0216] The RF circuit 1210 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1280; in addition, it transmits uplink data to the base station.

[0217] The memory 1220 can be used to store software programs and modules, such as the program instructions / modules corresponding to the video playback method and apparatus in this embodiment. The processor 1280 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 1220, such as the video playback method provided in this embodiment. The memory 1220 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs of at least one application, etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0218] The input unit 1230 can be used to receive digital or character information input by the target object, and to generate key signal inputs related to the target object settings and function control of the terminal.

[0219] Optionally, the input unit 1230 may include a touch panel 1231 and other input devices 1232.

[0220] The touch panel 1231, also known as a touch screen, can collect touch operations performed by a target object on or near it (such as operations performed by the target object using a finger, stylus, or any suitable object or accessory on or near the touch panel 1231), and perform corresponding operations according to a pre-set program, such as the target object clicking on a shortcut icon of a function module. Optionally, the touch panel 1231 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the target object and the signal generated by the touch operation, and transmits 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 1280, and can also receive and execute commands from the processor 1280. Furthermore, the touch panel 1231 can be implemented using various types of touch technologies, such as resistive, capacitive, infrared, and surface acoustic wave.

[0221] Optionally, other input devices 1232 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0222] Display unit 1240 can be used to display information input by the target object or interface information displayed to the target object, as well as various menus of the electronic device. Display unit 1240 is the display system of the terminal device, used to present the interface, such as displaying the desktop, the operation interface of an application, or the operation interface of a live streaming application.

[0223] The display unit 1240 may include a display panel 1241. Optionally, the display panel 1241 may be configured as a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0224] Furthermore, the touch panel 1231 can cover the display panel 1241. When the touch panel 1231 detects a touch operation on or near it, it transmits the information to the processor 1280 to determine the type of touch event. Subsequently, the processor 1280 provides a corresponding interface output on the display panel 1241 according to the type of touch event.

[0225] Although Figure 12 In this embodiment, the touch panel 1231 and the display panel 1241 are two separate components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 1231 and the display panel 1241 can be integrated to realize the input and output functions of the terminal.

[0226] The electronic device may also include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1241 according to the ambient light level, and the proximity sensor can turn off the backlight of the display panel 1241 when the electronic device is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), etc. Other sensors that may be configured in the electronic device, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0227] The audio circuit 1260, speaker 1261, and microphone 1262 provide an audio interface between the target object and the electronic device. The audio circuit 1260 can convert the received audio data into an electrical signal and transmit it to the speaker 1261, where the speaker 1261 converts it into a sound signal for output. On the other hand, the microphone 1262 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1260, converted into audio data, and then processed by the audio data processor 1280. After processing, the audio data is transmitted via the RF circuit 1210 to, for example, another electronic device, or the audio data is output to the memory 1220 for further processing.

[0228] WiFi is a short-range wireless transmission technology. Electronic devices using the WiFi module 1270 can help target users send and receive emails, browse web pages, and access streaming media, providing them with wireless broadband internet access. Although Figure 12 WiFi module 1270 is shown, but it is understood that it is not a necessary component of an electronic device and can be omitted as needed without changing the nature of the invention.

[0229] The processor 1280 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 1220, and calls data stored in the memory 1220 to perform various functions and process data. Optionally, the processor 1280 may include one or more processing units; optionally, the processor 1280 may integrate an application processor and a modem processor. The application processor mainly processes software programs such as the operating system, applications, and functional modules within the applications, such as the video playback method provided in this embodiment. The modem processor mainly processes wireless communication. It is understood that the modem processor may not be integrated into the processor 1280.

[0230] Understandable. Figure 12 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 12 The more or fewer components shown, or having the same Figure 12 The different configurations shown. Figure 12 The components shown can be implemented using hardware, software, or a combination thereof.

[0231] According to one aspect of this application, a computer program product or computer program is provided, comprising 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 video playback method described above.

[0232] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0233] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.< / video> < / video>

Claims

1. A video playback method, characterized in that, include: In response to a video playback operation triggered by the target object targeting the target surface of the cubic geometry, the target video is acquired. Each set of pixels corresponding to each video frame in the target video is obtained, and based on the mapping relationship between the position information of each pixel in each set of pixels and the position information of each vertex on the target surface, each video frame is sequentially mapped onto the target surface; wherein, for each mapped video frame, the mapped video frame is played to the target object. The specific method for mapping each video frame onto the target surface based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface is as follows: For a given video frame, the following operations are performed: mapping the target surface to a texture coordinate system to obtain a target texture coordinate plane; wherein each vertex on the target surface corresponds to a texture coordinate on the target texture coordinate plane; adjusting the screen size of the video frame according to the image size of the target texture coordinate plane; each pixel in the adjusted video frame corresponds to a texture coordinate on the target texture coordinate plane; mapping each pixel to a vertex on the target surface that has the same texture coordinate; each vertex corresponds to the color information of a pixel.

2. The method as described in claim 1, characterized in that, The cubic geometry further includes at least one candidate surface, and each candidate surface is associated with a corresponding candidate video; then the method further includes: In response to the target object's triggering operation on any of the candidate surfaces, the triggered candidate surface is taken as the new target surface; Switch from the target surface to the new target surface; In response to a video playback operation triggered by the target object for the new target surface, the candidate video associated with the new target surface is mapped to the new target surface for playback.

3. The method as described in claim 2, characterized in that, The step of responding to a triggering operation by the target object for any of the candidate surfaces, and using the triggered candidate surface as a new target surface, includes any one of the following operations: In response to a sliding operation triggered by the target object for any of the candidate surfaces, the candidate surface selected by the target object is taken as the new target surface; In response to a click operation triggered by the target object on any of the candidate surfaces, the candidate surface selected by the click of the target object is taken as the new target surface; In response to a viewpoint switching operation triggered by the target object for any of the candidate surfaces, the viewpoint is switched from the current viewpoint to the target viewpoint, and the candidate surface located in the target viewpoint that is face-to-face with the target surface is taken as the new target surface.

4. The method as described in claim 3, characterized in that, The viewpoint switching operation triggered by the target object for any of the candidate surfaces, switching from the current viewpoint to the target viewpoint, includes any one of the following operations: If the current viewpoint is outside the cubic geometry, then in response to the multi-finger reverse swipe operation triggered by the target object for any of the candidate surfaces, the viewpoint switches from outside the cubic geometry to inside the cubic geometry, and the inside of the cubic geometry is used as the target viewpoint. If the current viewpoint is inside the cubic geometry, then in response to the multi-finger swipe operation triggered by the target object on any of the candidate surfaces, the viewpoint switches from inside the cubic geometry to outside the cubic geometry, and the outside of the cubic geometry is taken as the target viewpoint.

5. The method as described in claim 1, characterized in that, The method further includes: In response to a screen adjustment operation triggered by the target object on the target surface, the screen size or screen orientation of the target surface is adjusted.

6. The method as described in claim 5, characterized in that, The adjustment of the screen size or orientation of the target surface in response to the screen adjustment operation triggered by the target object on the target surface includes any one of the following operations: In response to a multi-finger pinch operation triggered by the target object on the target surface, the screen size of the target surface is reduced; In response to a multi-finger zoom operation triggered by the target object on the target surface, the image size of the target surface is magnified; In response to a screen drag and rotation operation triggered by the target object on the target surface, the target surface is rotated to the corresponding screen orientation.

7. A video playback device, characterized in that, include: The video acquisition module is used to acquire the target video in response to the video playback operation triggered by the target object targeting the surface of the cubic geometry. The video playback module is used to obtain the set of pixels corresponding to each video frame contained in the target video, and based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface, sequentially map each video frame onto the target surface; wherein, for each mapped video frame, the mapped video frame is played to the target object. The specific method for mapping each video frame onto the target surface based on the mapping relationship between the position information of each pixel in each pixel set and the position information of each vertex on the target surface is as follows: For a given video frame, the following operations are performed: mapping the target surface to a texture coordinate system to obtain a target texture coordinate plane; wherein each vertex on the target surface corresponds to a texture coordinate on the target texture coordinate plane; adjusting the screen size of the video frame according to the image size of the target texture coordinate plane; each pixel in the adjusted video frame corresponds to a texture coordinate on the target texture coordinate plane; mapping each pixel to a vertex on the target surface that has the same texture coordinate; each vertex corresponds to the color information of a pixel.

8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It includes program code that, when run on an electronic device, causes the electronic device to perform the steps of the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Three-dimensional (3D) video playing method, device and system

    CN102917237A

  • Three-dimensional shape user interface for media content delivery systems and methods

    US20110310100A1

  • Method of sequencing computer controlled tasks based on the relative spatial location of task objects in a directional field

    US6948173B1