Video processing method and device, electronic equipment, storage medium and program product
By switching to the game page built on video images when playing video, the problem of reduced user experience when the network is restricted is solved, and higher user stickiness and resource utilization are achieved.
Patent Information
- Application Number
- CN202310947295.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
During the video playback, when encountering a weak or no network situation, users cannot continue to immerse themselves in the drama, resulting in a decrease in user experience and low screen resource utilization.
When the video playback is in a network-constrained scene, at least one video image of the video is obtained, game materials used to build game scenes, including scene elements and virtual objects, build game pages corresponding to game scenes, and play pages of videos Switch to the game page to play the game.
By switching the video playback page to the game page, users can continue to immerse themselves in the plot even when the network is restricted, improving user experience and stickiness, and improving the utilization rate of display resources during video playback.
Smart Images

Figure CN119450150A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a video processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] During video playback in related technologies, when encountering weak network or no network, users can only refresh the page frequently. However, due to network conditions, they cannot request any new data and can only display a waiting page. This not only prevents users from continuing to immerse themselves in the drama, reducing the user experience, but also reduces the utilization rate of display resources on the screen. Summary of the invention
[0003] The embodiments of the present application provide a video processing method, device, electronic device, computer-readable storage medium and computer program product, which can improve the utilization rate of display resources when the video is played in a network-restricted scenario.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a video processing method, including:
[0006] During the playback of the video, when the playback of the video is in a network-restricted scenario, obtaining at least one frame of video image of the video;
[0007] Based on the at least one frame of video image, generating game materials for constructing a game scene, the game materials including at least one of scene elements and virtual objects of the game scene;
[0008] Based on the game material, a game page corresponding to the game scene is constructed, and the playback page of the video is switched to the game page, so as to conduct a game based on the game page.
[0009] In the above scheme, the method also includes: in the process of conducting the game match based on the game page, obtaining the downlink speed of the network corresponding to the video; when the downlink speed is greater than the downlink speed threshold, displaying a prompt message, the prompt message is used to prompt whether to continue playing the video; switching the playback page of the video to the game page includes: in response to a page switching instruction triggered by the prompt message, switching the game page to the playback page of the video.
[0010] In the above scheme, when the playback of the video is in a network-restricted scenario, before obtaining at least one frame of video image of the video, the method also includes: during the playback of the video, obtaining the downlink speed of the network when playing the video; when the downlink speed is less than or equal to a downlink speed threshold, determining that the playback of the video is in a network-restricted scenario.
[0011] The present application provides a video processing device, including:
[0012] An acquisition module, used to acquire at least one frame of video image of the video during the video playback when the video playback is in a network restricted scenario;
[0013] A generation module, configured to generate game materials for constructing a game scene based on the at least one frame of video image, wherein the game materials include at least one of scene elements and virtual objects of the game scene;
[0014] The switching module is used to construct a game page corresponding to the game scene based on the game material, and switch the playback page of the video to the game page to conduct a game based on the game page.
[0015] In the above scheme, the acquisition module is also used to acquire at least one frame of video image of the video in response to a refresh instruction for the video when the playback of the video is in a network restricted scenario; or, when the playback of the video is in a network restricted scenario, display game prompt information, wherein the game prompt information is used to prompt whether to enter the game page; and acquire at least one frame of video image of the video in response to a determination instruction triggered based on the game prompt information.
[0016] In the above scheme, the acquisition module is also used to acquire the playback time point of the currently displayed video image when the playback of the video is in a network-restricted scenario; starting from the playback time point, at least one frame of the displayed video image is acquired from near to far.
[0017] In the above scheme, the device also includes a first storage module, which is used to obtain a preset screenshot frequency, and based on the screenshot frequency, automatically capture the video image of the video during the playback of the video to obtain at least one captured image; save the at least one captured image to an image storage space; the acquisition module is also used to obtain at least one captured image from the image storage space, and use the captured image as the video image.
[0018] In the above scheme, the device also includes a first deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold, based on the capture time of the captured images in the image storage space, the captured image with the earliest capture time in the image storage space is deleted.
[0019] In the above scheme, the device also includes a second storage module, which is used to intercept the video image of the video in response to the received forward operation on the video to obtain at least one intercepted image; and save the at least one intercepted image to the image storage space.
[0020] In the above scheme, the device also includes a second deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold and there is a first captured image in the image storage space, in response to the received forward operation on the video, the first captured image with the earliest capture time in the image storage space is deleted; wherein the first captured image is a captured image automatically captured based on the screenshot frequency in the image storage space; when the number of images reaches an image number threshold and there is no first captured image in the image storage space, in response to the received forward operation on the video, the second captured image with the earliest capture time in the image storage space is deleted, and the second captured image is a captured image captured based on the forward operation on the video in the image storage space.
[0021] In the above scheme, the device also includes a third storage module, which is used to capture the video image of the video in response to the received forward operation on the video to obtain at least one captured image; save the at least one captured image to the image storage space; the acquisition module is also used to acquire at least one captured image from the image storage space, and use the captured image as the video image.
[0022] In the above scheme, the device also includes a third deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold, in response to the received forward operation on the video, based on the capture time of the captured images in the image storage space, the captured image with the earliest capture time in the image storage space is deleted.
[0023] In the above scheme, the generation module is also used to perform the following processing on each of the video images: extract scene elements from the image content of the video image to obtain scene elements for constructing a game scene, and when the video image includes a target object, obtain a virtual object corresponding to the target object.
[0024] In the above scheme, the generation module is also used to extract the background of the video image to obtain the background image of the game, and to extract entities from the background image, and use the extracted entities as obstacles of the game; the background image and the obstacles are used as scene elements for constructing the game scene.
[0025] In the above scheme, the generation module is also used to, when the video image includes a target object, eliminate the target object in the video image to obtain a first intermediate image including a blank area, wherein the blank area is the area where the target object is located in the video image; obtain a target color around the blank area, and fill the blank area of the first intermediate image with the target color to obtain a second intermediate image; and determine the second intermediate image as the background image of the game.
[0026] In the above scheme, the device also includes a stylization processing module, which is used to perform stylization processing on the second intermediate image to obtain an image of a target style; the generation module is also used to determine the image of the target style as the background image of the game.
[0027] In the above scheme, the generation module is also used to obtain the avatar image of the target object, and stylize the avatar image to obtain a avatar image of the target style; obtain a torso image of the target style, and splice the torso image with the avatar image of the target style to obtain a spliced image; and determine the virtual object based on the spliced image.
[0028] In the above scheme, the game material includes the scene elements and the virtual objects, the number of the video images is multiple, the scene elements include the background image of the game and obstacles, the background image and the video image have a one-to-one correspondence, and the number of the obstacles is multiple; the switching module is also used to construct multiple game pages corresponding to the game scene based on the multiple background images, the multiple obstacles and the virtual objects; wherein the game page and the background image have a one-to-one correspondence, the background of each game page corresponds to the image content of the corresponding background image, including one virtual object and at least one obstacle; the video playback page is switched to each of the game pages in turn.
[0029] In the above scheme, the number of the game pages is at least two, including a first game page and a second game page, and the display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page; the switching module is also used to switch the playback page of the video to the first game page; when the virtual object moves from one end of the first game page to the other end of the first game page, the first game page is switched to the second game page.
[0030] In the above scheme, the device also includes a display module, which is used to obtain the downlink speed of the network corresponding to the video during the game match based on the game page; when the downlink speed is greater than the downlink speed threshold, a prompt message is displayed, and the prompt message is used to prompt whether to continue playing the video; the switching module is also used to switch the game page to the playback page of the video in response to a page switching instruction triggered by the prompt message.
[0031] In the above scheme, the device also includes a determination module, which is used to obtain the downlink speed of the network when playing the video during the playback of the video; when the downlink speed is less than or equal to the downlink speed threshold, it is determined that the playback of the video is in a network restricted scenario.
[0032] An embodiment of the present application provides an electronic device, including:
[0033] A memory for storing computer executable instructions;
[0034] The processor is used to implement the video processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0035] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute the video processing method provided in the embodiment of the present application.
[0036] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device performs the video processing method provided in the embodiment of the present application.
[0037] The embodiments of the present application have the following beneficial effects:
[0038] During the video playback process, when the video playback is in a network-restricted scenario, based on at least one frame of the acquired video image, a game material for constructing a game scene is generated, and then based on the game material, a game page corresponding to the game scene is constructed, and the video playback page is switched to the game page, so that a game game is played on the game page. In this way, when the video playback is in a network-restricted scenario, a game page of a game scene associated with the video image of the video is constructed, so that the video playback page is switched to the game page, so that a game game is played based on the game page. Through the association between the playback page and the game page, it is ensured that even when the video playback is in a network-restricted scenario, the user can still immerse himself in the current video playback content, thereby improving the user experience and stickiness. At the same time, compared with waiting for network recovery on the playback page when the video playback is in a network-restricted scenario, by switching the video playback page to the game page, so as to play a game on the game page, the utilization rate of display resources when the video playback is in a network-restricted scenario is also improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of the architecture of a video processing system 100 provided in an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0041] Figure 3 It is a flowchart of a video processing method provided in an embodiment of the present application;
[0042] Figure 4 It is a schematic diagram of the process of obtaining a background image and obstacles provided in an embodiment of the present application;
[0043] Figure 5 is a schematic diagram of a process for obtaining a background image provided in an embodiment of the present application;
[0044] Figure 6 is a schematic diagram of a process for obtaining an image of a target style provided in an embodiment of the present application;
[0045] Figure 7 is a schematic diagram of a process for obtaining a stitched image provided in an embodiment of the present application;
[0046] Figure 8 is a schematic diagram of a first game page corresponding to a marching game provided in an embodiment of the present application;
[0047] Fig. 9 It is a schematic diagram of a process of sequentially switching a video playback page to a game page constructed in real time, provided by an embodiment of the present application;
[0048] Fig.10It is a schematic diagram of a process for generating a cartoon image of a protagonist provided by an embodiment of the present application;
[0049] Fig.11 It is a schematic diagram of the process of generating a background image and obstacles provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0051] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0052] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0054] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0055] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0056] 2) Client, also known as the user end, refers to the program corresponding to the server that provides local services to users. Except for some applications that can only run locally, it is generally installed on the terminal and needs to cooperate with the server to run, that is, it requires corresponding servers and service programs in the network to provide corresponding services. In this way, specific communication connections need to be established on the client and server sides to ensure the normal operation of the application, such as the video client.
[0057] 3) Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0058] 4) Image stylization: Use pre-made style data, such as cartoon style data, realistic style data, etc., to process the incoming image, thereby outputting an image that conforms to the predetermined style.
[0059] 5) Game scene, which is the game scene displayed (or provided) when the application is running on the terminal. The game scene can be a simulation environment of the real world, a semi-simulation and semi-fictional virtual environment, or a purely fictional virtual environment. The game scene can be any of a two-dimensional game scene, a 2.5-dimensional game scene, or a three-dimensional game scene.
[0060] For example, the game scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. The user may control the virtual object to perform activities in the game scene, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. The game scene may be displayed from a first-person perspective (for example, the user plays the role of a virtual object in the game from his own perspective); it may also be displayed from a third-person perspective (for example, the user chases the virtual object in the game to play the game); it may also be displayed from a bird's-eye view perspective, and the above perspectives may be switched arbitrarily.
[0061] 6) Virtual objects, images of various people and objects that can interact in the game scene, or movable objects in the game scene. The movable objects can be virtual characters, virtual animals, cartoon characters, etc., such as: people, animals, plants, oil drums, walls, stones, etc. displayed in the game scene. The virtual object can be a virtual image in the game scene that represents the user. The game scene can include multiple virtual objects, each of which has its own shape and volume in the game scene and occupies a part of the space in the game scene.
[0062] For example, the virtual object may be a user character controlled by an operation on the client, an artificial intelligence (AI) trained to fight in a game scene, or a non-player character (NPC) set in an interactive game scene. The number of virtual objects participating in the interaction in the game scene may be preset.
[0063] 7) Uniform Resource Locator (URL): Every web page on the Internet has a unique name identifier, also known as the URL.
[0064] See also Figure 1 , Figure 1 1 is an architectural diagram of a video processing system 100 provided in an embodiment of the present application, to realize an application scenario of video processing (for example, the application scenario of video processing may be that when a user is watching a video, when the network speed is less than a network speed threshold, so that the video playback is in a no-network or weak-network scenario, at least one frame of video image of the video is obtained, such as the currently displayed video image, and then based on the image content included in the at least one frame of video image, a background image, obstacles and virtual objects for constructing a game scene are generated, wherein the background image corresponds to the background of the video image, the obstacles correspond to the objects in the video image, and the virtual objects correspond to the characters in the video image; thereby, based on the background image, obstacles and virtual objects for constructing the game scene, a game page corresponding to the game scene is constructed, and the video playback page is switched to the game page, so that the user can play a game based on the game page), a terminal (terminal 400 is shown as an example), the terminal 400 is connected to the server 200 via a network 300, wherein the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is realized using a wireless or wired link.
[0065] The server 200 is used to send the video to the terminal 400;
[0066] Terminal 400 is used to receive a video and, during the playback of the video, obtain at least one frame of video image of the video when the playback of the video is in a network-restricted scenario; based on the at least one frame of video image, generate game materials for constructing a game scene, the game materials including at least one of the scene elements and virtual objects of the game scene; based on the game materials, construct a game page corresponding to the game scene, and switch the video playback page to the game page to conduct a game based on the game page.
[0067] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Deliver Network), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, an intelligent voice interaction device, a smart home appliance, a virtual reality device, a vehicle-mounted terminal, an aircraft, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device, an intelligent speaker, and a smart watch, but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0068] Next, an electronic device that implements the video processing method provided in the embodiment of the present application is described. Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be a server or a terminal. Figure 1 Take the terminal shown in as an example, Figure 2 The electronic device shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0069] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0070] The user interface 430 includes one or more output devices 431 that enable display of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0071] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0072] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0073] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0074] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0075] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0076] a presentation module 453 for enabling display of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0077] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0078] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The video processing device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an acquisition module 4551, a generation module 4552, and a switching module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0079] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the video processing device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the video processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0080] In some embodiments, the terminal or server can implement the video processing method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a local client, that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP, a web browser APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of client, module or plug-in.
[0081] Based on the above description of the video processing system and electronic device provided by the embodiment of the present application, the video processing method provided by the embodiment of the present application is described below. In actual implementation, the video processing method provided by the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server in collaboration, so that Figure 1 The terminal 400 in the embodiment of the present application alone performs the video processing method provided in the embodiment of the present application as an example for explanation. Figure 3 , Figure 3 is a flow chart of the video processing method provided by the embodiment of the present application. Next, Figure 3 The steps shown are explained.
[0082] Step 101 : During the video playback process, when the video playback is in a network-restricted scenario, the terminal obtains at least one frame of video image.
[0083] In actual implementation, an application supporting video playback is installed on the terminal. The application can be any one of a video playback APP, a live broadcast APP, a browser APP, etc. When the user opens the application on the terminal and the terminal runs the application, the terminal starts playing the video. The video played here can be pre-stored locally in the terminal or obtained by the terminal from the outside world (such as the Internet).
[0084] In actual implementation, the network restricted scenario may be a scenario of network freeze, no network or weak network. Here, during the video playback process, the downlink speed of the network when playing the video is obtained; when the downlink speed is less than or equal to the downlink speed threshold, it is determined that the video playback is in a network restricted scenario.
[0085] It should be noted that the process of obtaining the downlink speed of the network when playing the video is real-time acquisition, that is, during the video playback process, the downlink speed of the network when playing the video is obtained in real time, so as to detect the downlink speed of the network when playing the video in real time. When the detection result indicates that the downlink speed is less than or equal to the downlink speed threshold, it is determined that the video playback is in a network-restricted scenario. Here, the downlink speed threshold can be pre-set, for example, 10 kilobits per second.
[0086] In actual implementation, when the video playback is in a network-restricted scenario, at least one frame of the video image will not be acquired immediately, but at least one frame of the video image will be acquired only after receiving a refresh operation from the user or after the user confirms the operation of entering the game page. Specifically, when the video playback is in a network-restricted scenario, in response to a refresh instruction for the video, at least one frame of the video image is acquired; or, when the video playback is in a network-restricted scenario, game prompt information is displayed, and the game prompt information is used to prompt whether to enter the game page; in response to a confirmation instruction triggered by the game prompt information, at least one frame of the video image is acquired.
[0087] It should be noted that before obtaining at least one frame of the video image in response to the refresh instruction for the video, when the video playback is in a network-restricted scenario, a refresh control will also be displayed, so that in response to the triggering operation for the refresh control, the refresh instruction for the video is received. As for the process of displaying game prompt information, the content of the game prompt information here can be such as "Do you want to enter the game?" At the same time, when the game prompt information is displayed, a confirmation control will also be displayed, so that based on the game prompt information, in response to the triggering operation for the confirmation control, a confirmation instruction is received.
[0088] It should be noted that when the video playback is in a network-restricted scenario, if no refresh command for the video or a confirmation command triggered by game prompt information is received, the video playback page will continue to be displayed, that is, continue to wait for the network to recover.
[0089] In actual implementation, the process of obtaining at least one frame of video image can be, when the video playback is in a network-restricted scenario, obtaining the playback time point of the currently displayed video image; starting from the playback time point, obtaining at least one frame of the displayed video image from near to far; or, it can also be, obtaining at least one frame of video image from an image storage space.
[0090] It should be noted that the video images stored in the image storage space here are captured in real time during the playback of the video. The process of obtaining at least one frame of video images from the image storage space can be to obtain at least one captured image from the image storage space and use the captured image as the video image. Here, at least one frame of video images can be randomly obtained from the image storage space, or the playback time point of each video image stored in the image storage space can be obtained, so as to obtain at least one frame of video images from near to far based on each playback time point. This application does not limit this.
[0091] In actual implementation, for the process of capturing images during the playback of a video in real time and storing them in an image storage space, when capturing video images in real time, the images can be automatically captured based on a preset screenshot frequency, or automatically captured when receiving a positive operation from the user, such as like, share, send a bullet comment, mark as watching, etc. Next, the process of capturing images during the playback of a video in real time and storing them in an image storage space is described according to different ways of capturing video images.
[0092] In some embodiments, when the video images stored in the image storage space are obtained by automatically capturing the video images of the video based on the screenshot frequency, when the video playback is in a network-restricted scenario, before obtaining at least one frame of the video image of the video, it is also possible to obtain a preset screenshot frequency, and based on the screenshot frequency, automatically capture the video image of the video during the video playback process to obtain at least one captured image; and save the at least one captured image to the image storage space. Here, the screenshot frequency is pre-set, such as capturing once every 10 minutes or once every 15 minutes, etc.
[0093] It should be noted that when the video image of the video is automatically captured based on the screenshot frequency, the memory in the image storage space is also obtained, so that when the memory in the image storage space indicates that the captured images can continue to be stored, the video image of the video is automatically captured based on the screenshot frequency during the playback of the video. Specifically, the number of captured images stored in the image storage space is obtained; when the number of images does not reach the image number threshold, the video image of the video is automatically captured based on the screenshot frequency during the playback of the video to obtain at least one captured image, and then the at least one captured image is saved to the image storage space. Here, the image quantity threshold is pre-set, for example, it can be set according to the storage space of the terminal. If the storage space is greater than 50,000 megabytes, the image quantity threshold is 100, that is, 100 captured images are stored; if the storage space is between 30,000 megabytes and 50,000 megabytes, the image quantity threshold is 60, that is, 60 captured images are stored; if the storage space is between 10,000 megabytes and 30,000 megabytes, the image quantity threshold is 30, that is, 300 captured images are stored; if the storage space is less than 10,000 megabytes, the image quantity threshold is 10, that is, 10 captured images are stored.
[0094] In actual implementation, when the number of images reaches the image number threshold, the video image of the video will no longer be automatically captured based on the screenshot frequency during the playback of the video; alternatively, the captured images stored in the image storage space will be deleted so that the number of images is less than the image number threshold, and then the video image of the video will be automatically captured based on the screenshot frequency. Specifically, when the number of images reaches the image number threshold, the captured image with the earliest capture time in the image storage space is deleted based on the capture time of the captured image in the image storage space.
[0095] It should be noted that when the number of images reaches the image number threshold, the capture time of each captured image in the image storage space is obtained, and then based on each capture time, the captured image with the earliest capture time in the image storage space is deleted. Here, the number of deleted captured images can be a target number, such as one or more, and the target number is pre-set. When deleting multiple captured images, the captured images in the image storage space are sorted based on each capture time, and then based on the sorting result, the target number of captured images are selected in sequence starting from the captured image with the earliest capture time, and the target number of captured images are deleted.
[0096] In other embodiments, when the video image stored in the image storage space is obtained by intercepting the video image of the video based on the user's positive operation, when the video is played in a network-restricted scenario, before obtaining at least one frame of the video image of the video, it is also possible to intercept the video image of the video in response to the received positive operation on the video to obtain at least one intercepted image; and save the at least one intercepted image to the image storage space. Here, the positive operation can be, for example, like, share, send barrage, mark watching, etc.
[0097] It should be noted that when the video image of the video is intercepted based on the user's forward operation, the memory in the image storage space is also obtained, so that when the memory in the image storage space indicates that the intercepted image can continue to be stored, the video image of the video will be intercepted in response to the received forward operation on the video. Specifically, the number of images of the intercepted images stored in the image storage space is obtained; when the number of images does not reach the image number threshold, in response to the received forward operation on the video, the video image of the video is intercepted to obtain at least one intercepted image, thereby saving at least one intercepted image to the image storage space. Here, the image number threshold is pre-set as described above, and this is not elaborated in the embodiments of the present application.
[0098] In actual implementation, when the number of images reaches the image number threshold, the captured images stored in the image storage space are deleted so that the number of images is less than the image number threshold, and then in response to the received positive operation for the video, the video image of the video is captured. Specifically, the number of captured images stored in the image storage space is obtained; when the number of images reaches the image number threshold, in response to the received positive operation for the video, based on the capture time of the captured images in the image storage space, the captured image with the earliest capture time in the image storage space is deleted.
[0099] It should be noted that here, when the number of images reaches the image number threshold, in response to the received forward operation on the video, the process of deleting the captured image with the earliest capture time in the image storage space based on the capture time of the captured image in the image storage space is similar to the process of deleting the captured image with the earliest capture time in the image storage space based on the capture time of the captured image in the image storage space when the number of images reaches the image number threshold in the previous article. This will not be elaborated in the embodiments of the present application.
[0100] In other embodiments, when the video images stored in the image storage space are obtained by automatically capturing the video images of the video based on the screenshot frequency and by capturing the video images of the video based on the user's forward operation, when the playback of the video is in a network-restricted scenario, before obtaining at least one frame of the video image of the video, it is also possible to obtain a preset screenshot frequency, and based on the screenshot frequency, automatically capture the video image of the video during the playback of the video to obtain at least one captured image; in response to the received forward operation on the video, capture the video image of the video to obtain at least one captured image; and save the multiple captured images to the image storage space.
[0101] It should be noted that the process of automatically capturing the video image of the video based on the screenshot frequency and capturing the video image of the video based on the user's positive operation is as described above, and the embodiments of the present application will not be elaborated on this.
[0102] In actual implementation, as described above, when the video image of the video is automatically captured based on the screenshot frequency and the video image of the video is captured based on the user's positive operation, the memory in the image storage space will also be obtained, so that when the memory in the image storage space indicates that the captured image can continue to be stored, the video image of the video will be captured based on the screenshot frequency and the user's positive operation.
[0103] In actual implementation, when the memory in the image storage space indicates that it is no longer possible to store the captured images, the captured images stored in the image storage space can be deleted so that the number of images is less than the image number threshold, and then based on the screenshot frequency and the user's positive operation, the video image of the video is automatically captured. Specifically, based on the capture time of the captured images in the image storage space, the captured images with the earliest capture time in the image storage space are deleted, and then based on the screenshot frequency and the user's positive operation, the video image of the video is captured. Here, based on the capture time of the captured images in the image storage space, the captured images with the earliest capture time in the image storage space are deleted as described above, and this embodiment of the present application will not be elaborated on.
[0104] At the same time, when the memory in the image storage space indicates that the captured images can no longer be stored, the video images of the video will no longer be automatically captured based on the screenshot frequency, but the video images of the video will only be captured based on the user's positive operation. That is, when a positive operation on the video is received, the captured images stored in the image storage space will be deleted, so that the number of images is less than the image number threshold, thereby capturing the video images of the video based on the positive operation on the video. Specifically, when the number of images reaches an image number threshold and there is a first captured image in the image storage space, in response to a received forward operation on the video, the first captured image with the earliest capture time in the image storage space is deleted; wherein the first captured image is a captured image that is automatically captured based on the screenshot frequency in the image storage space; when the number of images reaches an image number threshold and there is no first captured image in the image storage space, in response to a received forward operation on the video, the second captured image with the earliest capture time in the image storage space is deleted, wherein the second captured image is a captured image in the image storage space based on the forward operation on the video.
[0105] It should be noted that the process of deleting the first captured image with the earliest capture time in the image storage space in response to the received forward operation on the video, and the process of deleting the second captured image with the earliest capture time in the image storage space in response to the received forward operation on the video, are similar to the process of deleting the captured image with the earliest capture time in the image storage space based on the capture time of the captured image in the image storage space in the previous text, and this will not be elaborated in the embodiments of the present application.
[0106] Step 102: Generate game materials for constructing a game scene based on at least one frame of video image, where the game materials include at least one of scene elements and virtual objects of the game scene.
[0107] In actual implementation, after acquiring at least one frame of video image, the following processing is performed on each video image: scene elements are extracted from the image content of the video image to obtain scene elements for constructing the game scene, and when the video image includes a target object, a virtual object corresponding to the target object is obtained.
[0108] In some embodiments, scene elements are extracted from the image content of a video image to obtain scene elements for constructing a game scene. Here, the scene elements include a background image of the game scene and at least one of obstacles in the game scene. Thus, when the scene elements include a background image and an obstacle, the process of extracting scene elements from the image content of the video image to obtain scene elements for constructing a game scene may be to extract the background of the video image to obtain a background image for the game, extract entities from the background image, and use the extracted entities as obstacles for the game; and use the background image and obstacles as scene elements for constructing the game scene.
[0109] It should be noted that, the process of performing background extraction on the video image to obtain the background image of the game here, is to extract the background of the video image to obtain the background image of the video image, and then determine the background image of the game based on the background image of the video image; and the process of performing entity extraction on the background image and using the extracted entities as obstacles to the game is to extract entities in the background image, such as trees, cars and other objects, and use the extracted entities as obstacles to the game.
[0110] For example, see Figure 4 , Figure 4 is a schematic diagram of the process of obtaining background images and obstacles provided in an embodiment of the present application, based on Figure 4 , Figure 4 The a in the figure indicates the acquired video image. Figure 4 The b in the figure indicates that the background of the video image is extracted to obtain the background image of the game. Figure 4 The c in denoted by is the obstacle obtained by extracting entities from the background image. Figure 4 The background of the video image indicated by a in the figure is extracted, and the result is as follows Figure 4 The background image of the game indicated by b in the figure, and Figure 4 The background image indicated by b is extracted, and the extracted Figure 4 The entity indicated by c serves as an obstacle in the game.
[0111] In some embodiments, for the process of extracting the background of a video image to obtain a background image of a game, when the video image includes a target object, the target object in the video image is eliminated to obtain a first intermediate image including a blank area, where the blank area is the area where the target object is located in the video image; the target color around the blank area is obtained, and the blank area of the first intermediate image is filled with the target color to obtain a second intermediate image; the second intermediate image is determined as the background image of the game.
[0112] It should be noted that, when the video image includes a target object, image recognition is performed on the video image to obtain the position of the target object in the video image, and then based on the position of the target object in the video image, the target object in the video image is eliminated to obtain a first intermediate image including a blank area; at the same time, the target color here is the background color around the blank area, and the blank area is filled with color based on the target color, thereby reducing the sense of separation between the filled blank area and the surrounding area.
[0113] For example, see Figure 5 , Figure 5 is a schematic diagram of the process of obtaining a background image provided by an embodiment of the present application, based on Figure 5 , Figure 5 The a in the figure indicates the acquired video image including the target object. Figure 5 The dotted box 501 in a is the target object. Figure 5 The b in the figure indicates the first intermediate image. Figure 5 The dotted box 502 in b is a blank area. Figure 5 The second intermediate image is indicated by c in . Figure 5 The target object indicated by a in the video image and the dotted frame 501 is obtained. Figure 5 The first intermediate image indicated by b is obtained Figure 5 The target color around the blank area indicated by the dashed box 502 in the first intermediate image indicated by b in FIG. 5 is obtained by filling the blank area of the first intermediate image with the target color. Figure 5 The second intermediate image indicated by c in .
[0114] In some embodiments, after acquiring the second intermediate image, the second intermediate image can also be stylized to obtain an image of a target style; thereby determining the second intermediate image as the background image of the game, specifically includes determining the image of the target style as the background image of the game.
[0115] It should be noted that the target style here includes but is not limited to cartoon style, realistic style, etc. For example, when the target style is cartoon style, the second intermediate image is stylized to obtain an image of the target style, that is, the process of converting the second intermediate image into a cartoon image corresponding to the image content of the second intermediate image.
[0116] For example, see Figure 6 , Figure 6 is a schematic diagram of the process of obtaining an image of a target style provided by an embodiment of the present application, based on Figure 6 , when the target style is cartoon style, Figure 6 The a in the figure indicates the second intermediate image. Figure 6 The image indicated by b in the figure is a cartoon-style image. Specifically, Figure 6 The second intermediate image indicated by a is cartoonized to obtain the following Figure 6 The cartoon image indicated by b.
[0117] It should be noted that, in the process of extracting the background of a video image to obtain a background image of the game, when the video image does not include a target object, the video image is directly stylized to obtain an image of a target style; thereby, the image of the target style is determined as the background image of the game.
[0118] In some embodiments, when a target object is included in a video image, the process of obtaining a virtual object corresponding to the target object may be: obtaining a head image of the target object, and stylizing the head image to obtain a head image in the target style; obtaining a torso image in the target style, and splicing the torso image with the head image in the target style to obtain a spliced image; and determining the virtual object based on the spliced image.
[0119] It should be noted that after acquiring the video image, image recognition is performed on the video image. When the target object is included in the video image, the avatar image corresponding to the target object is acquired. Here, the avatar image corresponding to the target object is pre-stored. Specifically, when acquiring the video, the content of the video is analyzed to obtain at least one video object associated with the video. For example, when the video is a movie, the video object can be the protagonist of the movie, thereby obtaining the avatar image of at least one video object, and storing the avatar image of at least one video object. When the target object is included in the video image, the avatar image corresponding to the target object is acquired from the stored avatar image of at least one video object. At the same time, the torso image of the target style is pre-set. For example, a designer pre-draws a plurality of torso images of the target style, such as a cartoon character torso, and stores the torso image of the target style, thereby obtaining the torso image of the pre-stored target style, and splicing the torso image of the target style with the avatar image of the target style to obtain a spliced image, and then performing image recognition on the spliced image to obtain the virtual object indicated by the spliced image.
[0120] For example, see Figure 7 , Figure 7 is a schematic diagram of the process of obtaining a stitched image provided by an embodiment of the present application, based on Figure 7 , Figure 7 The image indicated by a in the figure is the target style avatar image. Figure 7 The torso image indicated by b in the figure is the target style. Figure 7 In the figure, c indicates a spliced image. Specifically, when the video image includes a target object, a head portrait image of the target object is obtained, and the head portrait image is cartoonized to obtain the following: Figure 7 The target style avatar image indicated by a is obtained as follows: Figure 7 The torso image of the target style indicated by b is concatenated with the head image of the target style to obtain Figure 7 The stitched image indicated by c is used to determine the virtual object based on the stitched image.
[0121] It should be noted that when the target object is not included in the video image, the avatar image of the target video object in at least one video object associated with the video is obtained, so that the avatar image of the target video object is stylized to obtain an avatar image of the target style. Here, as described above, when the video is obtained, the content of the video is analyzed to obtain at least one video object associated with the video. For example, when the video is a movie, the video object can be the protagonist of the movie, so as to obtain the avatar image of at least one video object, and store the avatar image of at least one video object. When the target object is not included in the video image, the avatar image of the target video object in at least one video object associated with the video is directly obtained. The target video object here can be preset.
[0122] Step 103, construct a game page corresponding to the game scene based on the game material, and switch the video playback page to the game page to conduct a game based on the game page.
[0123] In actual implementation, the game material includes scene elements and virtual objects, the number of video images is multiple, the scene elements include the background image and obstacles of the game, the background image and the video image have a one-to-one correspondence, and the number of obstacles is multiple; thus, based on the game material, the process of constructing a game page corresponding to the game scene can be, based on multiple background images, multiple obstacles and virtual objects, to construct multiple game pages corresponding to the game scene; wherein, the game page and the background image have a one-to-one correspondence, the background of each game page corresponds to the image content of the corresponding background image, including a virtual object, and at least one obstacle, wherein the position of the obstacle in different game pages can be the same or different; thus, the process of switching the video playback page to the game page can be, switching the video playback page to each game page in turn. Here, the background of each game page and the obstacles included can be the same or different, while the virtual objects included are the same.
[0124] It should be noted that since there are multiple game pages, when the user manipulates the virtual object to interact in the game scene, the current game page is switched to another game page based on the display time of the video image corresponding to each game page. Specifically, since there are multiple games corresponding to the video, such as moving games, catapult games, etc., the switching process of the game pages corresponding to different games is also different. Next, taking two of the games as an example, the process of switching the video playback page to each game page in turn is explained.
[0125] In some embodiments, when the game is a marching game, the process of switching the video playback page to each game page in sequence may be that the number of game pages is at least two, including a first game page and a second game page, and the display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page; thus, the process of switching the video playback page to each game page in sequence may be that the video playback page is switched to the first game page; when the virtual object moves from one end of the first game page to the other end of the first game page, the first game page is switched to the second game page.
[0126] In actual implementation, when the virtual object moves from one end of the first game page to the other end of the first game page, before the first game page is switched to the second game page, the virtual object and at least one obstacle are displayed in the first game page; in response to the movement operation of the virtual object, the virtual object is controlled to move in the first game page, and during the movement of the virtual object, in response to the control operation of the virtual object, the virtual object is controlled to avoid at least one obstacle, such as a click operation on the non-control area in the first game page to control the virtual object to jump to avoid at least one obstacle, so that the virtual object moves from one end of the first game page to the other end of the first game page.
[0127] For example, see Figure 8 , Figure 8 is a schematic diagram of the first game page corresponding to the marching game provided in the embodiment of the present application, based on Figure 8 , 801 indicates a virtual object, and 802 indicates an obstacle, so that in response to the movement operation of the virtual object indicated by 801, the virtual object is controlled to move in the first game page, and during the movement of the virtual object, in response to the control operation of the virtual object, the virtual object is controlled to avoid the obstacle indicated by 802, so that the virtual object moves from the leftmost end of the first game page to the rightmost end of the first game page; when the virtual object moves from the leftmost end of the first game page to the rightmost end of the first game page, the first game page is switched to the second game page.
[0128] In other embodiments, when the game is a catapult-type game, the process of switching the playback page of the video to each game page in sequence may be that the number of game pages is at least two, including a first game page and a second game page, and the display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page; thus, the process of switching the playback page of the video to each game page in sequence may be that the playback page of the video is switched to the first game page; in the first game page, a virtual object and at least one obstacle are displayed; in response to a catapult operation on the virtual object, a process of catapulting the virtual object to the obstacle is displayed; when the virtual object catapults the obstacle, the first game page is switched to the second game page.
[0129] In some embodiments, when there are multiple game pages, the construction of the game page corresponding to the game scene based on the game material can also be carried out in real time, so that the video playback page is switched to the game page constructed in real time in sequence. Specifically, there are multiple game pages, including a first game page and a second game page. The display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page. After the game material is generated, the background image and obstacles in the game material are stored in the background image carrier pool and the obstacle carrier pool respectively, and then the first background image and at least one obstacle are obtained from the background image carrier pool and the obstacle carrier pool respectively. Obstacles are detected, and based on the first background image and at least one obstacle, a first game page is constructed, thereby switching the video playback page to the first game page; then when the page is switched again, the background image and obstacles in the first game page are extracted to obtain the first background image and at least one obstacle; the first background image and at least one obstacle are stored in the background image carrier pool and the obstacle carrier pool, respectively, and the second background image and at least one obstacle are obtained from the background image carrier pool and the obstacle carrier pool, respectively; based on the second background image and at least one obstacle, a second game page is constructed, thereby switching the first game page to the second game page. Here, the display time of the video image corresponding to the first background image is later than the display time of the video image corresponding to the second background image.
[0130] It should be noted that the timing of switching pages again is different based on the differences in games. When the game is a moving game, the page switching again is when moving from one end of the first game page to the other end of the first game page; when the game is a catapult game, the page switching again is when the virtual object catapults into an obstacle.
[0131] It should be noted that the background images in the background image carrier pool and the obstacles in the obstacle carrier pool will be reused. At the same time, after the game page corresponding to the background image in the background image carrier pool is switched based on the display time of the video image corresponding to the background image, the background image in the background image carrier pool will be reused to generate the game page and switch it based on the display time of the video image corresponding to the background image.
[0132] For example, see Fig. 9 , Fig. 9 is a schematic diagram of a process of sequentially switching a video playback page to a real-time constructed game page provided by an embodiment of the present application, based on Fig. 9 , there are three background images here, Fig. 9 The four background image carrier pools in the game are the same background image carrier pool, and the four obstacle carrier pools are also the same obstacle carrier pool. Specifically, after the game material is generated, the background image and obstacles in the game material are stored in the background image carrier pool and the obstacle carrier pool respectively. Then, the background image 1 and at least one obstacle are obtained from the background image carrier pool and the obstacle carrier pool respectively, and based on the background image 1 and the first obstacle, the first game page is constructed, so that the playback page of the video is switched to the first game page;
[0133] Then, when the first game page is switched to the second game page, the background image and obstacles in the first game page are extracted to obtain background image 1 and at least one obstacle; the background image 1 and the at least one obstacle are respectively recycled to the background image carrier pool and the obstacle carrier pool, and the background image 2 and the at least one obstacle are respectively obtained from the background image carrier pool and the obstacle carrier pool; based on the background image 2 and the at least one obstacle, the second game page is constructed, thereby switching the first game page to the second game page;
[0134] Then, when the second game page is switched to the third game page, the background image and obstacles in the second game page are extracted to obtain background image 2 and at least one obstacle; the background image 2 and the at least one obstacle are respectively recycled to the background image carrier pool and the obstacle carrier pool, and the background image 3 and the at least one obstacle are respectively obtained from the background image carrier pool and the obstacle carrier pool; based on the background image 3 and the at least one obstacle, the third game page is constructed, thereby switching the second game page to the third game page;
[0135] Then, when the third game page is switched to the fourth game page, the background image and obstacles in the third game page are extracted to obtain a background image 3 and at least one obstacle; the background image 3 and the at least one obstacle are respectively recycled to the background image carrier pool and the obstacle carrier pool, and the background image 1 and the at least one obstacle are respectively obtained from the background image carrier pool and the obstacle carrier pool; based on the background image 1 and the at least one obstacle, the fourth game page is constructed, thereby switching the third game page to the fourth game page, and the cycle is repeated until the game page is switched to the video playback page.
[0136] In some embodiments, during the process of conducting the game match based on the game page, the downlink speed of the network corresponding to the video is obtained; when the downlink speed is greater than a downlink speed threshold, a prompt message is displayed, and the prompt message is used to prompt whether to continue playing the video; thus, the process of switching the video playback page to the game page may be, in response to a page switching instruction triggered by the prompt message, switching the game page to the video playback page.
[0137] It should be noted that the process of obtaining the downlink speed of the network when playing the video is real-time acquisition, that is, during the video playback process, the downlink speed of the network when playing the video is obtained in real time, so that the downlink speed of the network when playing the video is detected in real time, and when the detection result indicates that the downlink speed is greater than the downlink speed threshold, a prompt message is displayed. Here, the downlink speed threshold can be pre-set, such as 10 kilobits per second. Here, the content of the prompt message can be such as "Do you want to continue watching the video", etc. At the same time, when the prompt message is displayed, a determination control will also be displayed, so that based on the prompt message, in response to the trigger operation for the determination control, a page switching instruction is received. Here, if the page switching instruction is not received, the game page will continue to be displayed to conduct a game based on the game page.
[0138] Applying the above-mentioned embodiment of the present application, during the video playback process, when the video playback is in a network-restricted scenario, based on at least one frame of the acquired video image, a game material for constructing a game scene is generated, and then based on the game material, a game page corresponding to the game scene is constructed, and the video playback page is switched to the game page, so that a game game is played on the game page. In this way, when the video playback is in a network-restricted scenario, a game page of a game scene associated with the video image of the video is constructed, so that the video playback page is switched to the game page, so as to play a game based on the game page. Through the association between the playback page and the game page, it is ensured that even when the video playback is in a network-restricted scenario, the user can still immerse himself in the current video playback content, thereby improving the user experience and stickiness. At the same time, compared with waiting for the network to recover on the playback page when the video playback is in a network-restricted scenario, by switching the video playback page to the game page, so as to play a game on the game page, the utilization rate of display resources when the video playback is in a network-restricted scenario is also improved.
[0139] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0140] During video playback in related technologies, when encountering weak network or no network, users can only refresh the page frequently. However, due to network conditions, they cannot request any new data and can only display a waiting page. This not only prevents users from continuing to immerse themselves in the series, but also reduces the user experience, resulting in a very poor user experience.
[0141] Based on this, the embodiment of the present application provides a solution for optimizing the offline experience of APP by generating mini-game materials based on video content, and takes over the scenario of users without network through stand-alone mini-games that are highly relevant to the plot. This allows users to continue to immerse themselves in the plot in the mini-game even when there is no network or weak network, thereby improving user experience and increasing user stickiness; at the same time, it reduces the sense of separation from the plot to the mini-game, and realizes the natural transition and connection between the two.
[0142] Next, the technical solution of the present application is explained from the product side. Specifically, when a weak network or no network is detected, the mini-game preparatory state is entered. In this state, when a refresh operation triggered by the user on the video playback page is received, the video playback page is switched to the mini-game page (game page). When on the mini-game page, the network situation is still being detected. If the network is restored, a prompt message is displayed. When a page switching instruction triggered by the user based on the prompt message is received, the mini-game page is switched to the video playback page, and the video is continued to be played based on the video playback page. Here, in the mini-game preparatory state, if the network is restored, the state is automatically exited and the video playback page continues to be displayed.
[0143] The following is an explanation of the process of obtaining the mini-game page. Figure 8 As shown, the basic elements of the mini-game page include a protagonist (virtual object), a background map (background image), and multiple obstacles. Here, after the mini-game page is displayed, in response to the movement operation for the protagonist, the protagonist is controlled to automatically move to the right. When the distance between the protagonist and the obstacle is less than the distance threshold, that is, when the protagonist hits the obstacle, the game ends, and you can choose to continue the game or return to the video playback page. In the process of the protagonist automatically moving to the right, in response to a trigger operation such as a click operation on the non-control area in the game page, the protagonist is controlled to jump to avoid obstacles. Here, the game score is also displayed in the game page, and the game score is increased by one point for each obstacle the protagonist jumps over.
[0144] It should be noted that after the game ends, the user can choose to restart the game. When the game is restarted, the game score is calculated again. Here, when there are multiple game games, the highest game score will be recorded.
[0145] In actual implementation, for the generation of the protagonist element, specifically, since there are few full-body photos of the protagonist in the video information, but headshots are easy to obtain. Therefore, the generation of the protagonist element is divided into two parts, namely the torso and the head. For the torso part, the designer completes the design in advance and stores the designed torso part, so that the terminal can directly pull the corresponding material and use it when processing the video. For the head, it needs to be automatically generated according to the headshots of different protagonists in different videos. In this way, Figure 7 As shown, after the torso and head of the protagonist are determined, the torso and head are spliced to obtain the protagonist element.
[0146] In actual implementation, for the generation of background images and obstacles, specifically, when a user is watching a video, when a positive operation is received from the user, such as like, share, send barrage, mark watching, etc., the current content of the video playback will be automatically captured. In addition, the number of screenshots (number of images) will be recorded, and a threshold (image number threshold) will be set. When the number of screenshots does not reach the threshold, screenshots will be automatically taken randomly when the user is watching the video to ensure that the number of screenshots reaches the threshold.
[0147] It should be noted that the threshold is set based on the storage space of the terminal. If the storage space is greater than 50,000 megabytes, the threshold is 100; if the storage space is between 30,000 and 50,000 megabytes, the threshold is 60; if the storage space is between 10,000 and 30,000 megabytes, the threshold is 30; if the storage space is less than 10,000 megabytes, the threshold is 10.
[0148] In actual implementation, when the number of screenshots reaches the threshold, the screenshots will no longer be automatically taken randomly, and the screenshots will continue to be automatically taken only when a positive operation from the user is received. At the same time, when there is random screenshot data (first screenshot image) in the storage space, the earliest random screenshot data needs to be deleted to ensure that the number of screenshots does not exceed the threshold. If there is no random screenshot data (first screenshot image) in the storage space, but all the screenshots are based on the data captured by the positive operation of the user (second screenshot image), the earliest screenshot data is directly deleted to ensure that the number of screenshots does not exceed the threshold.
[0149] In actual implementation, after getting the screenshot from the storage space, such as Figure 5 As shown, the video character (target object) in the screenshot (video image) needs to be removed to obtain a first intermediate image including a blank area, where the video character is located in the screenshot; then, the target color around the blank area is obtained, and the blank area of the first intermediate image is filled with the target color to obtain a second intermediate image. Finally, the second intermediate image is stylized to abstract the entire image into a cartoon style to obtain a cartoon-style image, and the cartoon-style image is used as the background image of the mini-game.
[0150] In actual implementation, after obtaining the background image, elements in the background image are extracted as obstacles, such as Figure 5 Here, there is no restriction on what the obstacles are. Any element that can be identified and extracted from the image can appear as an obstacle on the mini-game page. In addition, when there is no network or a weak network, in addition to taking screenshots from the storage space, you can also capture the last frame of the currently cached video and process it according to the above steps to ensure that the overall picture is consistent when the user switches from the video playback page to the mini-game page, reducing the sense of disconnection.
[0151] It should be noted that during the game, the background images will appear in reverse order according to the time they were generated, that is, the background image of the last frame will appear first, and then the background images that were generated longer away from the current time will appear later; at the same time, the appearance of obstacles is random and not limited by time.
[0152] Next, the technical solution of the present application is described from the technical side. The technical side of the technical solution of the present application mainly includes two parts: the generation of the main character cartoon image and the generation of the background image and obstacles. Next, these two parts are introduced respectively.
[0153] Regarding the generation of the main character cartoon image, the main character cartoon image generation method provided in the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server in collaboration, so that Figure 1The method for generating a cartoon image of a protagonist provided in the embodiment of the present application is described as an example in which the terminal 400 alone executes the method. Fig.10 , Fig.10 This is a schematic diagram of the process of generating a cartoon image of a protagonist provided by an embodiment of the present application, based on Fig.10 The process of generating the main character cartoon image is implemented by steps 1001 to 1004. Specifically, step 1001, in response to the user's startup instruction for the client, starts the client; step 1002, after starting the client, obtains the torso and head parts corresponding to the main character; step 1003, splices the torso and head parts to obtain the main character cartoon image; step 1004, stores the main character cartoon image, that is, saves the main character data in the sandbox, so that when the subsequent user enters the mini-game page, the main character image can be used directly.
[0154] It should be noted that, for the process of obtaining the torso and head parts corresponding to the protagonist in step 1002, as shown in FIG. Fig.10 As shown, there are two steps respectively. Specifically, step 10021, after starting the client, pull the pre-stored torso data to obtain the torso part to ensure that there is available torso material when entering the mini-game page later; step 10022, when playing the video, obtain the basic information of the currently playing video, such as the URL of the protagonist's avatar, and then obtain the avatar image according to the avatar URL, and then cartoonize the avatar image to generate a cartoon avatar of a specified size, that is, the head part.
[0155] Regarding the generation of the background image and obstacles, the method for generating the background image and obstacles provided in the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server in collaboration, so that Figure 1 The terminal 400 in the embodiment of the present application independently executes the method for generating the background image and obstacles provided in the embodiment of the present application as an example for explanation, see Fig.11 , Fig.11 The present application embodiment provides a flow chart of generating a background image and obstacles, based on Fig.11, the generation process of the background image and the obstacles is implemented by steps 1101 to 1108. Specifically, step 1101, in response to the play instruction for the video, play the video; step 1102, obtain the screenshot image; step 1103, remove the video characters in the screenshot image, so as to obtain the first intermediate image including the blank area; step 1104, obtain the target color around the blank area, and fill the blank area of the first intermediate image with the target color to obtain the second intermediate image; step 1105, stylize the second intermediate image to generate a background image of a cartoon image, which is the background image required for the final mini-game, and then store this image in the sandbox according to the specified naming rules, and delete the first intermediate image and the second intermediate image at the same time; step 1106, store the generated background image; step 1107, while storing the background image, extract the image elements based on the generated background image to obtain the obstacles in the image; step 1108, store the extracted elements, i.e., obstacles, that is, store these obstacles in the sandbox according to the specified naming rules. In this way, when a game page corresponding to a game scene needs to be constructed later, such as when the video playback is in a network-restricted scenario, the stored background image and obstacles can be directly obtained to construct the corresponding game page.
[0156] It should be noted that, for the process of obtaining the screenshot image in step 1102, Fig.11 As shown, there are two steps respectively. Specifically, step 11021, when the video starts to play, it will check whether the number of screenshots currently stored in the storage space has reached the threshold. If it has not reached the threshold, a timer will be started. The countdown time of the timer is randomly generated. Therefore, based on the timer, the video content is automatically and randomly captured during the video playback. If the threshold is reached, a timer will not be started. In this way, the video content will not be automatically and randomly captured during the video playback; step 11022, when the video starts to play, the user's behavior operation is detected, and when the user's positive feedback operation is received, the video being played is captured.
[0157] It should be noted that the screenshot process here only captures the video content, and the logos and advertisements on the video playback page will be automatically blocked. At the same time, the user is unaware of the entire screenshot and processing process, and the processing is performed in a child thread, which will not cause other problems such as freezing of the playback page.
[0158] In actual implementation, the background image and obstacles will change as the protagonist moves, so these two elements require two vector pools, and the vectors in the vector pools will be reused to reduce the consumption of terminal memory. Fig. 9As shown, three carriers are needed for the background image, and multiple carriers are needed for obstacles. For example, the background image needs to be loaded in reverse order according to the time sequence of generation, and obstacles will be loaded randomly. As the protagonist moves, the carrier will move out of the screen. Once it moves out of the screen, the carrier will be marked as reusable and put back into the carrier pool for next use. At the same time, if the three background images are used up, they will be used again based on the latest screenshot image.
[0159] In this way, the present application automatically extracts images and elements in the video playback process and displays these elements on the mini-game page, thereby enhancing the correlation between the video playback page and the mini-game page, ensuring that even in scenarios with no network or weak network, users can still immerse themselves in the current plot, thereby improving user experience and stickiness.
[0160] Applying the above-mentioned embodiment of the present application, during the video playback process, when the video playback is in a network-restricted scenario, based on at least one frame of the acquired video image, a game material for constructing a game scene is generated, and then based on the game material, a game page corresponding to the game scene is constructed, and the video playback page is switched to the game page, so that a game game is played on the game page. In this way, when the video playback is in a network-restricted scenario, a game page of a game scene associated with the video image of the video is constructed, so that the video playback page is switched to the game page, so as to play a game based on the game page. Through the association between the playback page and the game page, it is ensured that even when the video playback is in a network-restricted scenario, the user can still immerse himself in the current video playback content, thereby improving the user experience and stickiness. At the same time, compared with waiting for the network to recover on the playback page when the video playback is in a network-restricted scenario, by switching the video playback page to the game page, so as to play a game on the game page, the utilization rate of display resources when the video playback is in a network-restricted scenario is also improved.
[0161] The following is a description of an exemplary structure of a video processing device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the video processing device 455 of the memory 450 may include:
[0162] The acquisition module 4551 is used to acquire at least one frame of video image of the video when the video is played in a network-restricted scenario during the video playback process;
[0163] A generating module 4552, configured to generate game materials for constructing a game scene based on the at least one frame of video image, wherein the game materials include at least one of scene elements and virtual objects of the game scene;
[0164] The switching module 4553 is used to construct a game page corresponding to the game scene based on the game material, and switch the playback page of the video to the game page to conduct a game based on the game page.
[0165] In some embodiments, the acquisition module 4551 is also used to acquire at least one frame of video image of the video in response to a refresh instruction for the video when the playback of the video is in a network restricted scenario; or, when the playback of the video is in a network restricted scenario, display game prompt information, wherein the game prompt information is used to prompt whether to enter the game page; and acquire at least one frame of video image of the video in response to a determination instruction triggered based on the game prompt information.
[0166] In some embodiments, the acquisition module 4551 is also used to acquire the playback time point of the currently displayed video image when the playback of the video is in a network-restricted scenario; starting from the playback time point, at least one frame of the displayed video image is acquired from near to far.
[0167] In some embodiments, the device also includes a first storage module, which is used to obtain a preset screenshot frequency, and based on the screenshot frequency, automatically capture the video image of the video during the playback of the video to obtain at least one captured image; save the at least one captured image to an image storage space; the acquisition module 4551 is also used to obtain at least one captured image from the image storage space, and use the captured image as the video image.
[0168] In some embodiments, the device also includes a first deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold, based on the capture time of the captured images in the image storage space, the captured image with the earliest capture time in the image storage space is deleted.
[0169] In some embodiments, the device also includes a second storage module, which is used to intercept the video image of the video in response to a received forward operation on the video to obtain at least one intercepted image; and save the at least one intercepted image to an image storage space.
[0170] In some embodiments, the device also includes a second deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold and there is a first captured image in the image storage space, in response to a received forward operation on the video, the first captured image with the earliest capture time in the image storage space is deleted; wherein the first captured image is a captured image automatically captured in the image storage space based on the screenshot frequency; when the number of images reaches an image number threshold and there is no first captured image in the image storage space, in response to a received forward operation on the video, the second captured image with the earliest capture time in the image storage space is deleted, and the second captured image is a captured image in the image storage space captured based on the forward operation on the video.
[0171] In some embodiments, the device also includes a third storage module, which is used to capture the video image of the video in response to a received forward operation on the video to obtain at least one captured image; save the at least one captured image to an image storage space; the acquisition module 4551 is also used to acquire at least one captured image from the image storage space, and use the captured image as the video image.
[0172] In some embodiments, the device also includes a third deletion module, which is used to obtain the number of captured images stored in the image storage space; when the number of images reaches an image number threshold, in response to a received forward operation on the video, based on the capture time of the captured images in the image storage space, the captured image with the earliest capture time in the image storage space is deleted.
[0173] In some embodiments, the generation module 4552 is also used to perform the following processing on each of the video images: extracting scene elements from the image content of the video image to obtain scene elements for constructing a game scene, and when the video image includes a target object, obtaining a virtual object corresponding to the target object.
[0174] In some embodiments, the generation module 4552 is also used to perform background extraction on the video image to obtain a background image of the game, and to perform entity extraction on the background image, and use the extracted entities as obstacles of the game; the background image and the obstacles are used as scene elements for constructing a game scene.
[0175] In some embodiments, the generation module 4552 is also used to, when the video image includes a target object, eliminate the target object in the video image to obtain a first intermediate image including a blank area, where the blank area is the area where the target object is located in the video image; obtain a target color around the blank area, and fill the blank area of the first intermediate image with the target color to obtain a second intermediate image; and determine the second intermediate image as the background image of the game.
[0176] In some embodiments, the device also includes a stylization processing module, which is used to perform stylization processing on the second intermediate image to obtain an image of a target style; the generation module 4552 is also used to determine the image of the target style as the background image of the game.
[0177] In some embodiments, the generation module 4552 is also used to obtain a head image of the target object, and stylize the head image to obtain a head image of a target style; obtain a torso image of a target style, and stitch the torso image with the head image of the target style to obtain a stitched image; and determine the virtual object based on the stitched image.
[0178] In some embodiments, the game material includes the scene elements and the virtual objects, the number of the video images is multiple, the scene elements include the background image of the game and obstacles, the background image and the video image have a one-to-one correspondence, and the number of the obstacles is multiple; the switching module 4553 is also used to construct multiple game pages corresponding to the game scene based on the multiple background images, the multiple obstacles and the virtual objects; wherein the game page and the background image have a one-to-one correspondence, the background of each game page corresponds to the image content of the corresponding background image, including one virtual object, and at least one obstacle; the playback page of the video is switched to each of the game pages in turn.
[0179] In some embodiments, the number of the game pages is at least two, including a first game page and a second game page, and the display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page; the switching module 4553 is also used to switch the playback page of the video to the first game page; when the virtual object moves from one end of the first game page to the other end of the first game page, the first game page is switched to the second game page.
[0180] In some embodiments, the device also includes a display module, which is used to obtain the downlink speed of the network corresponding to the video during the game match based on the game page; when the downlink speed is greater than the downlink speed threshold, a prompt message is displayed, and the prompt message is used to prompt whether to continue playing the video; the switching module 4553 is also used to switch the game page to the playback page of the video in response to a page switching instruction triggered by the prompt message.
[0181] In some embodiments, the device also includes a determination module, which is used to obtain the downlink speed of the network when playing the video during the playback of the video; when the downlink speed is less than or equal to a downlink speed threshold, determine that the playback of the video is in a network restricted scenario.
[0182] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device performs the video processing method described in the embodiment of the present application.
[0183] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the video processing method provided by the embodiment of the present application, for example, Figure 3 The video processing method is shown.
[0184] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM; or it may be various devices including one or any combination of the above memories.
[0185] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0186] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0187] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0188] In summary, the embodiments of the present application have the following beneficial effects:
[0189] (1) When the video playback is in a network-restricted scenario, a game page of a game scene associated with the video image of the video is constructed, so that the video playback page is switched to the game page, and a game is played based on the game page. The association between the playback page and the game page ensures that even when the video playback is in a network-restricted scenario, the user can still immerse himself in the current video playback content, thereby improving the user experience and stickiness. At the same time, compared with waiting for the network to recover on the playback page when the video playback is in a network-restricted scenario, by switching the video playback page to the game page, a game is played on the game page, which also improves the utilization rate of display resources when the video playback is in a network-restricted scenario.
[0190] (2) This application automatically extracts images and elements in the images during video playback and displays these elements on the mini-game page, thereby enhancing the correlation between the video playback page and the mini-game page, ensuring that users can still immerse themselves in the current plot even in scenarios with no network or weak network, thereby improving user experience and stickiness.
[0191] It should be noted that in the embodiments of the present application, when it comes to obtaining data related to corresponding operating behaviors, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0192] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A video processing method, characterized in that: The method comprises: During the playback of the video, when the playback of the video is in a network-restricted scenario, obtaining at least one frame of video image of the video; Based on the at least one frame of video image, generating game materials for constructing a game scene, the game materials including at least one of scene elements and virtual objects of the game scene; Based on the game material, a game page corresponding to the game scene is constructed, and the playback page of the video is switched to the game page, so as to conduct a game based on the game page.
2. The method according to claim 1, characterized in that When the video is played in a network-restricted scenario, obtaining at least one frame of video image of the video includes: When the video is played in a network-restricted scenario, in response to a refresh instruction for the video, acquiring at least one frame of video image of the video; Alternatively, when the playback of the video is in a network-restricted scenario, game prompt information is displayed, and the game prompt information is used to prompt whether to enter the game page; in response to a determination instruction triggered based on the game prompt information, at least one frame of video image of the video is obtained.
3. The method according to claim 1, characterized in that When the video is played in a network-restricted scenario, obtaining at least one frame of video image of the video includes: When the video is played in a network-restricted scenario, obtaining a playback time point of the currently displayed video image; From the playback time point, at least one frame of the displayed video image is acquired from near to far.
4. The method according to claim 1, characterized in that When the video is played in a network-restricted scenario, before obtaining at least one frame of video image of the video, the method further includes: Obtaining a preset screenshot frequency, and based on the screenshot frequency, automatically capturing a video image of the video during playback of the video to obtain at least one captured image; Saving the at least one captured image to an image storage space; The acquiring of at least one frame of video image of the video comprises: At least one captured image is obtained from the image storage space, and the captured image is used as the video image.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining the number of captured images stored in the image storage space; When the number of images reaches an image number threshold, based on the capture time of the captured images in the image storage space, the captured images with the earliest capture time in the image storage space are deleted.
6. The method according to claim 4, characterized in that Before acquiring at least one frame of video image of the video, the method further includes: In response to the received forward operation on the video, intercepting a video image of the video to obtain at least one intercepted image; The at least one captured image is saved in an image storage space.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining the number of captured images stored in the image storage space; When the number of images reaches an image number threshold and there is a first captured image in the image storage space, in response to a received positive operation on the video, deleting the first captured image with the earliest capture time in the image storage space; wherein the first captured image is a captured image in the image storage space that is automatically captured based on the screenshot frequency; When the number of images reaches an image number threshold and the first captured image does not exist in the image storage space, in response to receiving a forward operation on the video, the second captured image with the earliest capture time in the image storage space is deleted, where the second captured image is a captured image in the image storage space based on the forward operation on the video.
8. The method according to claim 1, characterized in that When the video is played in a network-restricted scenario, before obtaining at least one frame of video image of the video, the method further includes: In response to the received forward operation on the video, intercepting a video image of the video to obtain at least one intercepted image; Saving the at least one captured image to an image storage space; The acquiring of at least one frame of video image of the video comprises: At least one captured image is obtained from the image storage space, and the captured image is used as the video image.
9. The method according to claim 8, characterized in that The method further comprises: Obtaining the number of captured images stored in the image storage space; When the number of images reaches an image number threshold, in response to a received forward operation on the video, based on the capture time of the captured images in the image storage space, the captured images with the earliest capture time in the image storage space are deleted.
10. The method according to claim 1, characterized in that Generating game materials for constructing a game scene based on the at least one frame of video image includes: The following processing is performed on each of the video images: Extracting scene elements from the image content of the video image to obtain scene elements for constructing a game scene, and When the video image includes a target object, a virtual object corresponding to the target object is obtained.
11. The method according to claim 10, characterized in that The step of extracting scene elements from the image content of the video image to obtain scene elements for constructing a game scene includes: Performing background extraction on the video image to obtain a background image of the game, and performing entity extraction on the background image, and using the extracted entities as obstacles of the game; The background image and the obstacles are used as scene elements for constructing a game scene.
12. The method according to claim 11, characterized in that The step of extracting the background of the video image to obtain the background image of the game includes: When the video image includes a target object, the target object in the video image is removed to obtain a first intermediate image including a blank area, where the blank area is the area where the target object is located in the video image; Acquire a target color around the blank area, and fill the blank area of the first intermediate image with the target color to obtain a second intermediate image; The second intermediate image is determined as the background image of the game.
13. The method according to claim 12, characterized in that The method further comprises: Performing stylization processing on the second intermediate image to obtain an image of a target style; The step of determining the second intermediate image as the background image of the game includes: The target style image is determined as the background image of the game.
14. The method according to claim 10, characterized in that Acquiring a virtual object corresponding to the target object includes: Acquire a head portrait image of the target object, and perform stylization processing on the head portrait image to obtain a head portrait image of a target style; Acquire a torso image of a target style, and perform image stitching on the torso image and the head image of the target style to obtain a stitched image; Based on the stitched image, the virtual object is determined.
15. The method according to claim 1, wherein: The game material includes the scene elements and the virtual objects, the number of the video images is multiple, the scene elements include the background image of the game and obstacles, the background image and the video image have a one-to-one correspondence, and the number of the obstacles is multiple; Based on the game material, a game page corresponding to the game scene is constructed, including: Based on the multiple background images, the multiple obstacles and the virtual objects, construct multiple game pages corresponding to the game scenes; There is a one-to-one correspondence between the game page and the background image, and the background of each game page corresponds to the image content of the corresponding background image, including one virtual object and at least one obstacle; The step of switching the video playback page to the game page includes: Switch the playback page of the video to each of the game pages in sequence.
16. The method according to claim 15, characterized in that The number of the game pages is at least two, including a first game page and a second game page, and the display time of the video image corresponding to the first game page is later than the display time of the video image corresponding to the second game page; The step of switching the video playback page to each of the game pages in sequence includes: Switching the playback page of the video to the first game page; When the virtual object moves from one end of the first game page to the other end of the first game page, the first game page is switched to the second game page.
17. A video processing device, characterized in that: The device comprises: An acquisition module, used to acquire at least one frame of video image of the video during the video playback when the video playback is in a network restricted scenario; A generation module, configured to generate game materials for constructing a game scene based on the at least one frame of video image, wherein the game materials include at least one of scene elements and virtual objects of the game scene; The switching module is used to construct a game page corresponding to the game scene based on the game material, and switch the playback page of the video to the game page to conduct a game based on the game page.
18. An electronic device, characterized in that: include: A memory for storing computer executable instructions; A processor, configured to implement the video processing method according to any one of claims 1 to 16 when executing the computer executable instructions stored in the memory.
19. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, which are used to cause a processor to execute and implement the video processing method described in any one of claims 1 to 16.
20. A computer program product comprising computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the video processing method according to any one of claims 1 to 16 is implemented.