Video processing method and device, electronic equipment, storage medium and program product
By switching to the associated game page for games during video playback, the problem of degradation of user experience in weak or no network is solved, and efficient resource utilization is achieved by switching back to the video playback page when network recovery is achieved.
Patent Information
- Application Number
- CN202310954254.6
- 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 resource utilization.
When the video playback is in a restricted network scenario, obtain the game page of the game associated with the video and switch the video playback page to the game page. Users can play game games on the game page. When the network conditions improve, switch the game page back to the video's playback page and determine whether you have permission to perform the target operation based on the achievements made in the game.
Even when video playback is in a network-constrained scenario, users can still immerse themselves in the video content, improving user experience and stickiness. When the network is restored, switch back to the video playback page, enriching interaction and improving resource utilization.
Smart Images

Figure CN119450117A_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 series, reducing the user experience, but also reduces resource utilization during video playback. 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 resource utilization during video playback.
[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 a video, when the playback of the video is in a network-restricted scenario, obtaining a game page of a game associated with the video, and switching the playback page of the video to the game page;
[0007] In response to a page switching instruction for the game page, when the playback of the video is not in a network restricted scenario, switching the game page back to the playback page of the video;
[0008] In the process of playing the video based on the play page, in response to an operation instruction for a target operation of the video, obtaining an achievement obtained in the game;
[0009] When it is determined that there is a right to perform a target operation based on the achievement, the target operation for the video is performed.
[0010] The present application provides a video processing device, including:
[0011] A first acquisition module, used to acquire a game page of a game associated with the video, and switch the play page of the video to the game page;
[0012] A switching module, for responding to a page switching instruction for the game page, and switching the game page back to the playback page of the video when the playback of the video is not in a network restricted scenario;
[0013] A second acquisition module is used to acquire the achievements obtained in the game in response to an operation instruction for a target operation on the video during the process of playing the video based on the play page;
[0014] An execution module is used to execute the target operation on the video when it is determined that there is permission to execute the target operation based on the achievement.
[0015] In the above scheme, the target operation is a barrage sending operation for the video, and the barrage sending operation indicates sending a barrage of a target style; the second acquisition module is also used to obtain the achievements obtained in the game in response to the operation instructions of the barrage sending operation for the video during the process of playing the video based on the playback page; the execution module is also used to send the target style of barrage when it is determined, based on the achievement, that there is permission to execute the barrage sending operation for the video.
[0016] In the above scheme, the device also includes a first display module, which is used to display the edited barrage content and display multiple candidate styles of the barrage for selection in response to the barrage editing operation on the video; in response to the selection operation of the target candidate style among the multiple candidate styles, the target candidate style is determined as the target style of the barrage corresponding to the barrage content.
[0017] In the above scheme, the achievement is the game score obtained in the game match of the game; the barrage style of the barrage sent for the video includes multiple candidate styles, and different candidate styles correspond to different game score ranges; the device also includes a third acquisition module, and the third acquisition module is used to obtain the target game score range corresponding to the target style; when the game score belongs to the target game score range, it is determined that there is permission to execute the barrage sending operation for the video.
[0018] In the above scheme, the target operation is a style switching operation for the barrage sent for the video, and the style switching operation is used to indicate that the style of the barrage in the playback page of the video is switched from the current first style to the second style; the second acquisition module is also used to obtain the achievements obtained in the game in response to the operation instructions for the style switching operation of the barrage in the playback page during the process of playing the video based on the playback page; the execution module is also used to switch the style of the barrage in the playback page from the current first style to the second style when it is determined that there is permission to execute the style switching operation for the video based on the achievement.
[0019] In the above scheme, the device also includes a second display module, which is used to display at least one barrage in the playback page during the process of playing the video based on the playback page; wherein the at least one barrage corresponds to at least one barrage style; in response to the selection operation of the target barrage in the at least one barrage, the barrage style of the target barrage is determined to be the second style.
[0020] In the above scheme, the device also includes a fourth acquisition module, which is used to obtain the game end duration, and the game end duration is used to indicate the duration between the moment when the game page is switched back to the playback page and the current moment; the second acquisition module is also used to obtain the achievements obtained in the game in response to the operation instructions for the target operation of the video when the game end duration is less than the target duration.
[0021] In the above scheme, the target operation is a clarity switching operation for the playback clarity of the video; the second acquisition module is also used to switch the playback clarity of the video from the current clarity to the target clarity when it is determined based on the achievement that there is authority to perform the clarity switching operation, and the target clarity is higher than the current clarity.
[0022] In the above scheme, the video includes a live video, and the playback page includes at least a first live page and a second live page, and the live content of the first live page is different from the live content of the second live page; the first acquisition module is also used to, during the process of playing the video based on the first live page, when the live video is in a network restricted scenario, obtain the game page of the game associated with the live video and switch the first live page to the game page; the switching module is also used to respond to a page switching instruction for the game page, and when the live video is not in a network restricted scenario, switch the game page back to the second live page of the live video.
[0023] In the above scheme, the device also includes a third display module, which is used to display a page switching control in the game page; in response to a trigger operation on the page switching control, a page switching instruction for the game page is received, and the page switching instruction is used to instruct to switch the game page to the playback page of the video.
[0024] In the above scheme, the device also includes a fourth 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 return to play the video; the switching module is also used to switch the game page back to the playback page of the video in response to a page switching instruction triggered by the prompt message.
[0025] In the above scheme, the first acquisition module is also used to acquire 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 include 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.
[0026] 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 first acquisition 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.
[0027] 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 first acquisition 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.
[0028] 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.
[0029] An embodiment of the present application provides an electronic device, including:
[0030] A memory for storing computer executable instructions;
[0031] 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.
[0032] 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.
[0033] 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.
[0034] The embodiments of the present application have the following beneficial effects:
[0035] During the video playback process, when the video playback is in a network-restricted scenario, based on the game page of the game associated with the acquired video, the video playback page is switched to the game page, so that the game is played on the game page, and when the video playback is not in a network-restricted scenario, the game page is switched back to the video playback page, so that when the authority to perform the target operation is determined based on the achievements obtained in the game, the target operation for the video is performed. In this way, when the video playback is in a network-restricted scenario, by switching the video playback page to the game page of the game associated with the video, the game is played based on the game page, and 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, when the video playback is not in a network-restricted scenario, the game page is switched back to the video playback page, and when it is determined based on the achievements obtained in the game that the authority to perform the target operation exists, the target operation for the video is performed, enriching the interactive operations during the video playback process and improving the resource utilization rate during video playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a schematic diagram of the architecture of a video processing system 100 provided in an embodiment of the present application;
[0037] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0038] Figure 3It is a flowchart of a video processing method provided in an embodiment of the present application;
[0039] 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;
[0040] Figure 5 is a schematic diagram of a first game page corresponding to a marching game provided in an embodiment of the present application;
[0041] Figure 6 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;
[0042] Figure 7 is a schematic diagram of the target style of the barrage provided in the embodiment of the present application;
[0043] Figure 8 It is a schematic diagram of the process of displaying the edited bullet comment content provided by an embodiment of the present application;
[0044] Fig. 9 It is a schematic diagram of a process of switching the style of a bullet screen from a current first style to a second style provided by an embodiment of the present application;
[0045] Fig.10 It is a flowchart of the process of downloading and loading game resources provided by an embodiment of the present application;
[0046] Fig.11 It is a flowchart of the process of recording and using game rights provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 4) 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 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.
[0056] 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.
[0057] 5) 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.
[0058] 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.
[0059] 6) Bullet screen input bar / bullet screen input box, which is a text input box opened when the user needs to edit or send the bullet screen content.
[0060] 7) Barrage authority, which is obtained by exchanging game scores for barrage styles of different levels and effects.
[0061] See also Figure 1 , Figure 1It is an architectural diagram of a video processing system 100 provided in an embodiment of the present application, to realize application scenarios 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, a game page associated with the currently displayed video image is obtained, and the video playback page is switched to the game page, so that the user can play a game based on the game page; when the network speed is not less than the network speed threshold, the game page is switched back to the video playback page, and in the process of playing the video based on the playback page, when the user sends a barrage, the game score obtained in the game is obtained, and the barrage style corresponding to the game score is used to send the barrage to the video playback page), a terminal (terminal 400 is shown as an example), terminal 400 is connected to server 200 via network 300, wherein 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 wireless or wired links.
[0062] The server 200 is used to send the video to the terminal 400;
[0063] Terminal 400 is used to receive a video, and during the playback of the video, when the playback of the video is in a network-restricted scenario, obtain the game page of the game associated with the video and switch the playback page of the video to the game page; in response to a page switching instruction for the game page, when the playback of the video is not in a network-restricted scenario, switch the game page back to the playback page of the video; in the process of playing the video based on the playback page, in response to an operation instruction for a target operation of the video, obtain an achievement obtained in the game; when it is determined based on the achievement that there is authority to perform the target operation, perform the target operation on the video.
[0064] 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 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.
[0065] 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 .
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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;
[0072] 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.;
[0073] 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);
[0074] 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.
[0075] 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., and includes the following software modules: a first acquisition module 4551, a switching module 4552, a second acquisition module 4553 and an execution module 4554. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] Step 101: During the video playback process, when the video playback is in a network restricted scenario, the terminal obtains a game page of a game associated with the video and switches the video playback page to the game page.
[0080] 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).
[0081] 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.
[0082] 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.
[0083] In actual implementation, when the video playback is in a network-restricted scenario, the game page of the game associated with the video will not be obtained immediately, but the game page of the game associated with the video will not be obtained until a refresh operation of the user is received or the user confirms the operation of entering the game page. Specifically, when the video playback is in a network-restricted scenario, the game page of the game associated with the video is obtained in response to a refresh instruction for the video; 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, the game page of the game associated with the video is obtained.
[0084] It should be noted that before responding to a refresh instruction for a video and obtaining the game page of the game associated with the video, when the video is played in a network-restricted scenario, a refresh control will also be displayed, so that in response to a trigger operation on the refresh control, a 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 a trigger operation on the confirmation control, a confirmation instruction is received.
[0085] 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.
[0086] In actual implementation, the process of obtaining a game page of a game associated with a video may be, 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 materials, constructing a game page corresponding to the game scene.
[0087] It should be noted that the process of obtaining at least one frame of video image of a video can be to obtain 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, obtain at least one frame of the displayed video image from near to far.
[0088] In actual implementation, the process of generating game materials for constructing a game scene based on at least one frame of video image may be to perform the following processing on each video image: extract scene elements from the image content of the video image, obtain scene elements for constructing the game scene, and acquire virtual objects in the game.
[0089] 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.
[0090] 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.
[0091] For example, see Figure 4 , Figure 4is 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.
[0092] In actual implementation, there is a correspondence between the background image of the video image and the background image of the game. The background image of the game is pre-designed by the designer based on the various background images contained in the video. For example, the background image may contain the wonderful content and clips of the video, that is, it is designed based on the wonderful content and clips of the video. Therefore, for the background image based on the video image, the process of determining the background image of the game can be to obtain the correspondence between the background image of the video image and the background image of the game, and obtain the corresponding background image of the game based on the correspondence and the background image of the video image.
[0093] In actual implementation, in addition to extracting entities from the background image and using the extracted entities as obstacles in the game, the style of the obstacles in the game can also be pre-set, such as a cartoon image of a villain in the video, or a cartoon image of a key prop in the video, etc., thereby generating game obstacles based on the pre-set style of the obstacles in the game.
[0094] In some embodiments, for the process of obtaining virtual objects in the game, the virtual objects here can be pre-designed by the designer based on the video objects included in the video. Specifically, 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 that the designer designs a corresponding cartoon image based on the video object, and then determines the virtual object in the game based on the designed cartoon image, that is, uses the cartoon image as the image of the virtual object in the game. In this way, obtaining the virtual object in the game is to obtain the virtual object in the game pre-designed based on the video object in the video.
[0095] In some embodiments, the game material includes scene elements and virtual objects, the number of video images is multiple, the scene elements include a 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, constructing 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.
[0096] 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 many 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 the moving game as an example, the process of switching the video playback page to each game page in turn is explained.
[0097] 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.
[0098] 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.
[0099] For example, see Figure 5 , Figure 5 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 5 , 501 indicates a virtual object, and 502 indicates an obstacle, so that in response to the movement operation of the virtual object indicated by 501, 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 502, 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.
[0100] 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.
[0101] It should be noted that the timing of switching pages again is different based on the difference in games. For example, when the game is a moving game, the time of switching pages again is when moving from one end of the first game page to the other end of the first game page.
[0102] 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.
[0103] For example, see Figure 6 , Figure 6 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 Figure 6 , there are three background images here, Figure 6The 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;
[0104] 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;
[0105] 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;
[0106] 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.
[0107] Step 102, in response to a page switching instruction for the game page, when the video playback is not in a network restricted scenario, the game page is switched back to the video playback page.
[0108] In actual implementation, in response to a page switching instruction for a game page, when the playback of the video is not in a network restricted scenario, the game page is switched back to the playback page of the video. Here, there are multiple ways to switch the game page back to the playback page of the video. Next, taking two of them as examples, the process of switching the game page back to the playback page of the video is explained.
[0109] In some embodiments, a page switching control is displayed in the game page; in response to a trigger operation on the page switching control, a page switching instruction for the game page is received, the page switching instruction is used to instruct to switch the game page to the video playback page. Thus, in response to the page switching instruction for the game page, when the video playback is not in a network restricted scenario, the game page is switched back to the video playback page.
[0110] It should be noted that the page switching control here can be displayed in the game page all the time, and the user can perform a trigger operation on the control at any time. However, only when the video playback is not in a network restricted scenario, the game page will be switched back to the video playback page to play the video based on the playback page. When the video playback is in a network restricted scenario, even if the game page is switched back to the video playback page, the video cannot be played based on the video playback page. Instead, it will continue to wait for the network to recover based on the video playback page. Here, the process of determining whether the network is restricted is the same as the previous article, and will not be repeated here.
[0111] In other embodiments, during a game match based on a 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, in response to a page switching instruction for the game page, 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.
[0112] 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.
[0113] It should be noted that, for the process of switching the game page back to the video playback page in response to a page switching instruction for the game page when the video playback is not in a network restricted scenario, since there are multiple ways to switch the game page back to the video playback page, there is no strict order for the timing of receiving the page switching instruction and the timing of judging that the video playback is not in a network restricted scenario, that is, the page switching instruction may be received first, and then when the video playback is not in a network restricted scenario, the game page is switched back to the video playback page, that is, in response to the page switching instruction for the game page, when the video playback is not in a network restricted scenario, the game page is switched back to the video playback page, or it may be that when the video playback is not in a network restricted scenario, the page switching instruction is received, thereby switching the game page back to the video playback page, that is, when the video playback is not in a network restricted scenario, the game page is switched back to the video playback page in response to the page switching instruction for the game page. The embodiment of the present application does not limit this.
[0114] Step 103, in the process of playing the video based on the play page, in response to the operation instruction of the target operation on the video, the achievement obtained in the game is obtained.
[0115] It should be noted that the achievements obtained in the game can be the scores obtained in the game games. For example, when the game is a moving game, the scores obtained in the game games can be positively correlated with the number of obstacles avoided by the virtual object, such as adding one point for each obstacle avoided. It can also be positively correlated with the longest moving time of the virtual object, such as adding one point every five seconds. Here, the user can play multiple game games based on the game page. The longest continuous moving time is the longest moving time selected from the moving times corresponding to each game game. When the number of game games is one, the longest moving time is the moving time corresponding to the game game.
[0116] In actual implementation, there can be multiple target operations. For example, the target operation can be an operation of sending a barrage to a video, an operation of switching the style of the barrage sent to the video, or an operation of switching the clarity of the playback of the video.
[0117] In some embodiments, the target operation is a barrage sending operation for a video, and the barrage sending operation indicates sending a barrage of a target style. In the process of playing a video based on a playback page, the achievements obtained in the game are obtained in response to the operation instructions of the target operation for the video. The process may be that in the process of playing a video based on a playback page, the achievements obtained in the game are obtained in response to the operation instructions of the barrage sending operation for the video.
[0118] It should be noted that the target style of the bullet message can be pre-designed, for example, see Figure 7 , Figure 7 is a schematic diagram of the target style of the bullet screen provided in the embodiment of the present application, based on Figure 7 , Figure 7 What is indicated by 701 may be the current style of the barrage, and what is indicated by 702 may be the target style of the barrage. Thus, in the process of playing the video based on the playback page, the barrage sending operation for the video is to send the barrage of the style indicated by 702.
[0119] In actual implementation, since the target operation is an operation to send a barrage of bullets to a video, and the operation to send a barrage of bullets indicates sending a target style of bullets, therefore, before responding to the operation instruction to send a barrage of bullets to a video and obtaining the achievements obtained in the game, it is also necessary to implement the process of editing the barrage of bullets and selecting a target style for the video. Specifically, in response to the barrage editing operation for the video, the edited barrage content is displayed, and multiple candidate styles of the barrage are displayed for selection; in response to the selection operation of a target candidate style among multiple candidate styles, the target candidate style is determined as the target style of the barrage corresponding to the barrage content.
[0120] It should be noted that, in response to the bullet screen editing operation for the video, before displaying the edited bullet screen content, the terminal will display a bullet screen sending interface including at least one of the candidate bullet screen area, the key area, the play area, and the bullet screen input area. Specifically, when the terminal plays the video based on the play page, the bullet screen input area is displayed, and in response to a trigger operation such as a click operation on the bullet screen input area, the bullet screen sending interface is displayed. Among them, the candidate bullet screen area includes at least one candidate text, the key area includes multiple virtual keys, the bullet screen input area is used to display the edited bullet screen content, and the play area is used to display the played video when the bullet screen is edited.
[0121] It should be noted that the display positions of the bullet screen input area, the button area, and the candidate bullet screen area in the video playback page may be pre-set, and this embodiment of the present application does not limit this.
[0122] For example, see Figure 8 , Figure 8 is a schematic diagram of the process of displaying the edited bullet comment content provided by an embodiment of the present application, based on Figure 8, a indicates a video playback page including a bullet screen input area, b and c indicate video playback pages including different forms of bullet screen sending interfaces, wherein 807 in a indicates a bullet screen input area, 801 in b indicates a candidate bullet screen area, 802 indicates a button area, 803 indicates a bullet screen input area, and the remaining area is a playback area, 805 in c indicates a candidate bullet screen area, 806 indicates a button area, 804 indicates a bullet screen input area, and the remaining area is a playback area; based on Figure 8 When the terminal plays a video based on the playback page, the playback page shown in a is displayed. In response to a click operation on the bullet screen input area shown in 807 in a, the playback page of the video including the bullet screen sending interface shown in b or c is displayed. Here, the form of the bullet screen sending interface is pre-set and is not limited in the embodiment of the present application.
[0123] In some embodiments, after displaying a barrage sending interface that includes at least a candidate barrage area, that is, displaying a candidate barrage area that includes at least one candidate text, the barrage editing operation is a selection operation for a target candidate text in the candidate barrage area, thereby responding to the barrage editing operation for the video and displaying the edited barrage content. The process can be, based on the played video, in response to the selection operation for the target candidate text in the candidate barrage area, using the selected target candidate text as the edited barrage content and displaying the target candidate text.
[0124] It should be noted that after input is made based on the key area, at least one candidate text will be displayed in the candidate bullet screen area, so that in response to the selection operation of the target candidate text in the candidate bullet screen area, the selected target candidate text will be used as the edited bullet screen content. For example, see Figure 8 ,based on Figure 8 In c, the candidate barrage area includes 4 candidate texts, among which "High Energy Ahead" is the selected target candidate text, so that in response to the selection operation of the target candidate text in the candidate barrage area, the selected target candidate text is used as the edited barrage content, and the target candidate text is displayed in the barrage input area.
[0125] In actual implementation, in response to the barrage editing operation on the video, while displaying the edited barrage content, a barrage style selection control may also be displayed, so that in response to the triggering operation on the barrage style selection control, multiple candidate styles of the barrage for selection are displayed, so that in response to the selection operation on the target candidate style among the multiple candidate styles, the target candidate style is determined as the target style of the barrage corresponding to the barrage content;
[0126] Alternatively, the process of displaying multiple candidate styles of bullet screens for selection may also be to display at least one bullet screen in the playback area of the playback page; wherein at least one bullet screen corresponds to at least one bullet screen style; and thus in response to a selection operation on a target candidate style among the multiple candidate styles, the process of determining the target candidate style as the target style of the bullet screen corresponding to the bullet screen content may be to determine the bullet screen style of the target bullet screen as the target style of the bullet screen corresponding to the bullet screen content in response to a selection operation on a target bullet screen among at least one bullet screen. In this way, the target style is determined by the bullet screen styles of bullet screens sent by other users.
[0127] It should be noted that there is no strict execution order between the process of displaying the edited barrage content in response to the barrage editing operation on the video and the process of displaying multiple candidate styles of the barrage for selection to select the target style of the barrage corresponding to the barrage content. That is, the edited barrage content can be displayed first in response to the barrage editing operation on the video, and then the multiple candidate styles of the barrage for selection are displayed to select the target style of the barrage corresponding to the barrage content; or multiple candidate styles of the barrage for selection are displayed first to select the target style of the barrage corresponding to the barrage content, and then the edited barrage content is displayed in response to the barrage editing operation on the video. The embodiments of the present application are not limited to this.
[0128] It should be noted that the style of the bullet screen (such as the candidate style or the target style) is used to indicate different display effects of the bullet screen, for example, it can be displayed in a special effect form, or in a special form such as Figure 7 The display is performed in the form indicated by 702, etc.
[0129] In some embodiments, the target operation is a style switching operation for the barrage sent by the video, and the style switching operation is used to instruct to switch the style of the barrage in the playback page of the video from the current first style to the second style. In the process of playing the video based on the playback page, the process of obtaining the achievements obtained in the game in response to the operation instructions of the target operation for the video may be, in the process of playing the video based on the playback page, the achievements obtained in the game are obtained in response to the operation instructions of the style switching operation for the barrage in the playback page.
[0130] It should be noted that the first style is different from the second style. For example, the first style may be the current default style, and the second style may be the target style. For example, the first style may be Figure 7 The second style may be the style indicated by 701. Figure 7 The style indicated by 702.
[0131] In actual implementation, since the style switching operation is used to instruct the style of the barrage in the video playback page to switch from the current first style to the second style, therefore in response to the operation instruction for the style switching operation of the barrage in the playback page, before obtaining the achievements obtained in the game, it is also necessary to determine the second style. Specifically, in the process of playing the video based on the playback page, at least one barrage is displayed in the playback page; wherein, at least one barrage corresponds to at least one barrage style; in response to the selection operation of the target barrage in at least one barrage, the barrage style of the target barrage is determined to be the second style.
[0132] It should be noted that in the process of playing videos based on the playback page, at least one barrage sent by the current object and other objects will be displayed on the playback page. The styles of each barrage may be the same or different. The current object can select at least one barrage to determine the style of the barrage to the second style, that is, switch the current first style of all barrages displayed on the playback page to the second style, thereby realizing a one-click switching process for the styles of all barrages displayed on the playback page.
[0133] For example, see Fig. 9 , Fig. 9 is a schematic diagram of a process of switching the style of a bullet screen from the current first style to the second style provided by an embodiment of the present application, based on Fig. 9 , Fig. 9 The style of the bullet comment indicated by the dotted frame 901 in a is the second style. Fig. 9 The style of the bullet screen except the bullet screen indicated by the dotted line frame 901 in a is the first style. Fig. 9 In the play page shown in a, at least one bullet screen sent by the current object and other objects will be displayed. In response to the selection operation of the target bullet screen indicated by the dotted box 901 in the at least one bullet screen, the bullet screen style of the target bullet screen is determined to be the second style, so that Fig. 9 As shown in b, when it is determined based on the achievement that there is permission to perform the target operation, the style of all barrages in the video playback page is switched from the current first style to the second style.
[0134] In other embodiments, the target operation is a clarity switching operation for the playback clarity of the video, and the clarity switching operation is used to instruct the playback clarity of the video to switch from the current clarity to the target clarity. In the process of playing the video based on the playback page, the process of obtaining the achievements obtained in the game in response to the operation instructions for the target operation on the video may be, in the process of playing the video based on the playback page, the achievements obtained in the game are obtained in response to the operation instructions for the clarity switching operation in the playback page.
[0135] In actual implementation, since the target operation is a definition switching operation for the playback definition of the video, and the definition switching operation is used to instruct to switch the definition of the playback definition of the video from the current definition to the target definition, therefore, in the process of playing the video based on the playback page, in response to the operation instruction for the definition switching operation in the playback page, before obtaining the achievements obtained in the game, it is also possible to display a definition switching control in the playback page, and in response to the triggering operation of the definition switching control, display multiple candidate definitions for selection, and then determine the target definition in response to the selection operation for the target definition among the multiple candidate definitions. Here, different candidate definitions correspond to different definitions.
[0136] In some embodiments, only within the validity period can the user perform the target operation on the video. Specifically, after switching the game page back to the playback page of the video, the user can also obtain the game end time, which is used to indicate the time from the moment the game page is switched back to the playback page to the current moment. Thus, the process of obtaining the achievements obtained in the game in response to the operation instruction of the target operation on the video can be, when the game end time is less than the target time, obtaining the achievements obtained in the game in response to the operation instruction of the target operation on the video.
[0137] It should be noted that the game end duration is the time from when the user ends the game match on the game page to the current moment, and the target duration is pre-set, for example, it can be two days, etc. The target operation on the video can only be performed within the target duration, that is, only within the validity period, and when it exceeds the target duration, that is, outside the validity period, regardless of whether the user has performed the target operation on the video, the target operation on the video can no longer be performed. Exemplarily, when the target operation is a barrage sending operation for the video, the user can no longer send barrages of the target style; when the target operation is a style switching operation for the barrage sent for the video, the user can no longer switch the style of the barrage; when the target operation is a clarity switching operation for the playback clarity of the video, the user cannot watch the video at the target clarity.
[0138] Step 104: When it is determined based on the achievement that there is permission to perform the target operation, the target operation on the video is performed.
[0139] In actual implementation, as mentioned above, there are multiple target operations. Therefore, for different target operations, when it is determined based on achievements that there is permission to perform the target operation, the process of performing the target operation on the video is different. Next, taking the target operation as an operation of sending a bullet screen to a video, a style switching operation for the bullet screen sent by the video, and a clarity switching operation for the playback clarity of the video as examples, the process of performing the target operation on the video when it is determined based on achievements that there is permission to perform the target operation is described.
[0140] In some embodiments, the target operation is a barrage sending operation for a video, and the barrage sending operation indicates sending a barrage in a target style. Thus, when it is determined based on the achievement that there is permission to perform the target operation, the process of performing the target operation for the video may be that when it is determined based on the achievement that there is permission to perform the barrage sending operation for the video, a barrage in the target style is sent.
[0141] In actual implementation, as mentioned above, an achievement can be the game score obtained in a game match, so that the barrage style of the barrage sent for the video includes multiple candidate styles, and different candidate styles correspond to different game score ranges; based on this, when it is determined that there is permission to execute the barrage sending operation for the video based on the achievement, before sending the barrage of the target style, it is also possible to obtain the target game score range corresponding to the target style; when the game score belongs to the target game score range, it is determined that there is permission to execute the barrage sending operation for the video.
[0142] It should be noted that the correspondence between the game score range and the candidate styles can be pre-set. For example, 0-10 points correspond to the barrage of type A style, 11-20 points correspond to the barrage of type B style, etc. When an operation instruction to send a barrage of video is received, the game score obtained in the game match on the game page is obtained, and then the target game score range corresponding to the target style is obtained. When the game score belongs to the target game score range, it is determined that there is permission to execute the barrage sending operation for the video; when the game score does not belong to the target game score range, it is determined that there is no permission to execute the barrage sending operation for the video.
[0143] In some embodiments, the target operation is a style switching operation for the barrage sent for the video, and the style switching operation is used to indicate that the style of the barrage in the playback page of the video is switched from the current first style to the second style. Thus, when it is determined based on the achievement that there is permission to perform the target operation, the process of performing the target operation for the video may be that when it is determined based on the achievement that there is permission to perform the style switching operation for the video, the style of the barrage in the playback page is switched from the current first style to the second style.
[0144] In actual implementation, as mentioned above, an achievement can be the game score obtained in a game match, so that the barrage style of the barrage sent for the video includes multiple candidate styles, and different candidate styles correspond to different game score ranges; based on this, when it is determined that there is permission to perform a style switching operation on the video based on the achievement, the style of the barrage in the playback page is switched from the current first style to the second style, and before that, the target game score range corresponding to the second style can be obtained; when the game score belongs to the target game score range, it is determined that there is permission to perform a style switching operation on the video.
[0145] It should be noted that the correspondence between the game score range and the candidate styles can also be pre-set here. For example, 0-10 points correspond to the barrage of type A style, 11-20 points correspond to the barrage of type B style, etc. When an operation instruction for a style switching operation on a video is received, the game score obtained in the game match on the game page is obtained, and then the target game score range corresponding to the second style is obtained. When the game score belongs to the target game score range, it is determined that there is permission to perform the style switching operation on the video; when the game score does not belong to the target game score range, it is determined that there is no permission to perform the style switching operation on the video.
[0146] In other embodiments, the target operation is a clarity switching operation for the playback clarity of the video, and the clarity switching operation is used to indicate that the playback clarity of the video is switched from the current clarity to the target clarity. Thus, when it is determined based on the achievement that there is permission to perform the target operation, the process of performing the target operation on the video may be that when it is determined based on the achievement that there is permission to perform the clarity switching operation, the playback clarity of the video is switched from the current clarity to the target clarity, and the target clarity is higher than the current clarity.
[0147] In actual implementation, as mentioned above, an achievement can be a game score obtained in a game match, thereby including multiple candidate clarity levels for video playback, and different candidate clarity levels correspond to different game score ranges; based on this, when it is determined based on the achievement that there is permission to perform a clarity switching operation, the video playback clarity is switched from the current clarity to the target clarity, and the target game score range corresponding to the target clarity can also be obtained; when the game score belongs to the target game score range, it is determined that there is permission to perform a clarity switching operation.
[0148] It should be noted that the correspondence between the game score range and the candidate clarity can also be pre-set here. For example, 0-10 points correspond to Class A candidate clarity, 11-20 points correspond to Class B candidate clarity, etc. When an operation instruction to execute a clarity switching operation is received, the game score obtained in the game match on the game page is obtained, and then the target game score range corresponding to the target clarity is obtained. When the game score belongs to the target game score range, it is determined that there is permission to execute the clarity switching operation; when the game score does not belong to the target game score range, it is determined that there is no permission to execute the clarity switching operation.
[0149] In some embodiments, the video may also include a live video. When the video is a live video, the playback page includes at least a first live page and a second live page, and the live content of the first live page is different from the live content of the second live page. Thus, during the playback of the video, when the playback of the video is in a network-restricted scenario, the process of obtaining the game page of the game associated with the video and switching the playback page of the video to the game page may be, in the process of playing the video based on the first live page, when the live video is in a network-restricted scenario, obtaining the game page of the game associated with the live video, and switching the first live page to the game page; and in response to a page switching instruction for the game page, when the playback of the video is not in a network-restricted scenario, the process of switching the game page back to the playback page of the video may be, in response to a page switching instruction for the game page, when the live video is not in a network-restricted scenario, switching the game page back to the second live page of the live video; and in the process of playing the video based on the playback page, in response to an operation instruction for a target operation of the video, the process of obtaining the achievements obtained in the game may be, in the process of playing the live video based on the second live page, in response to an operation instruction for a target operation of the live video, obtaining the achievements obtained in the game.
[0150] It should be noted that, since the live video is watched in real time, the live content of different live pages corresponds to the live content at different times. Therefore, the live content of the first live page is different from the live content of the second live page. When the video is not a live video, the play page when the video playback page is switched to the game page is the same as the play page when the game page is switched back to the video playback page. In the process of playing the video based on the playback page, the process of obtaining the achievements obtained in the game in response to the operation instructions for the target operation of the video can be, in the process of continuing to play the video based on the playback page, the achievements obtained in the game are obtained in response to the operation instructions for the target operation of the video.
[0151] By applying the above-mentioned embodiment of the present application, during the playback of a video, when the playback of the video is in a network-restricted scenario, based on the game page of the game associated with the acquired video, the playback page of the video is switched to the game page, so that a game match is performed on the game page, and when the playback of the video is not in a network-restricted scenario, the game page is switched back to the playback page of the video, so that when the authority to perform the target operation is determined based on the achievements obtained in the game, the target operation for the video is performed. In this way, when the playback of the video is in a network-restricted scenario, by switching the playback page of the video to the game page of the game associated with the video, a game match is performed based on the game page, and through the association between the playback page and the game page, it is ensured that even when the playback of the video 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, when the playback of the video is not in a network-restricted scenario, the game page is switched back to the playback page of the video, and when it is determined that the authority to perform the target operation exists based on the achievements obtained in the game, the target operation for the video is performed, enriching the interactive operations during the video playback process and improving the resource utilization rate during video playback.
[0152] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0153] During video playback in the related technology, when encountering weak network or no network, users can only refresh the page frequently. However, due to network conditions, the user's refresh operation is futile, and after multiple refreshes without results, the user will not be able to continue to immerse himself in the drama, making the user's experience very poor.
[0154] Based on this, the embodiment of the present application provides a video APP off-network experience optimization solution based on a mini-game scenario, allowing users to continue to immerse themselves in the plot in extreme scenarios such as no network or weak network, and the game scores will be exchanged for corresponding barrage rights, allowing users to send barrages with specific effects, thereby improving user experience and stickiness.
[0155] Next, the technical solution of this application is explained from the product side. Specifically, the product side of the technical solution of this application mainly includes four aspects, namely the production and integration of mini-games, the combination of mini-games and plots, the display and interaction of mini-game pages, and the rights and interests logic of mini-games.
[0156] For the production and integration of mini-games, you can make marching games, such as Figure 5As 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. Every time the protagonist jumps over an obstacle, the game score is increased by one point. As the user's score increases, the protagonist's travel speed will increase.
[0157] As for the combination of mini-games and plots, the combination of mini-games and video plots is mainly realized by the background image, protagonist and obstacles of the game. Specifically, the background image of the game will be replaced with the background image (background image) related to the current video. Here, the background image of the video image corresponds to the background image of the game. The background image of the game is pre-designed by the designer based on the various background images contained in the video. For example, the background image can include the wonderful content and clips of the video, that is, it is designed based on the wonderful content and clips of the video. The protagonist (virtual object) of the game will be replaced with the cartoon image of the protagonist of the video, that is, the protagonist here can be pre-designed by the designer based on the video object included in the video. Specifically, 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 that the designer designs the corresponding cartoon image based on the video object, and then determines the protagonist in the game based on the designed cartoon image. At the same time, when the protagonist jumps, the corresponding animation will be loaded and displayed, such as the swinging of the protagonist's head. As for the obstacles in the game, the style of the obstacles in the game can be pre-set, for example, it can be a cartoon image of the villain mission in the video, or a cartoon image of the key props in the video, etc., so as to generate the game obstacles based on the pre-set style of the obstacles in the game.
[0158] In this way, the basic mini-game is transformed into a game that matches the plot of the video, which will make users more immersed in the current plot. In addition, all backgrounds, protagonist images, and obstacle images are designed by designers. Whenever an episode is entered, all configuration information of the current episode will be pulled to ensure that the game resources corresponding to the current episode are available when entering the game page.
[0159] As for the display and interaction of the mini-game page, when the video playback is in a network-restricted scenario, such as a weak network or no network, it will not switch from the video playback page to the game page of the game associated with the video, but will switch the video playback page to the game page only after receiving the user's refresh operation. Specifically, when the video playback is in a network-restricted scenario, in response to a refresh instruction for the video, the game page of the game associated with the video is obtained, thereby switching the video playback page to the game page. Here, when the video playback is in a network-restricted scenario, if no refresh instruction for the video is received, the video playback page will continue to be displayed, that is, continue to wait for the network to recover.
[0160] In actual implementation, for marching games, whenever a user triggers an operation such as a click operation on the screen, the protagonist is controlled to jump once. Here, before the protagonist lands, no matter how the user clicks the screen, the protagonist will not jump again. At the same time, the user's current score, that is, the number of obstacles crossed, will be displayed in real time on the game page. In addition, a return key (page switching control) can also be displayed, so that in response to the trigger operation on the page switching control, a page switching instruction for the game page is received, and in response to the page switching instruction, the game page is switched to the video playback page.
[0161] It should be noted that the return button here can be displayed on the game page all the time, and the user can perform a trigger operation on the control at any time. However, the game page will only be switched back to the video playback page when the video playback is not in a network restricted scenario, so as to play the video based on the playback page. When the video playback is in a network restricted scenario, even if the game page is switched back to the video playback page, the video cannot be played based on the video playback page. Instead, it will continue to wait for network recovery based on the video playback page.
[0162] In some embodiments, during the process of playing a game based on the game page, the network speed corresponding to the video (the downstream speed of the network) is also obtained; when the network speed is greater than a speed threshold (downstream speed threshold), a prompt message is displayed, and the prompt message is used to prompt whether to continue playing the video; thus, in response to a page switching instruction triggered by the prompt message, the game page is switched to the video playback page to play the video based on the playback page.
[0163] As for the rights and interests logic of the mini-game, the user's score (achievement) on the mini-game page will be exchanged for different levels of rights and interests (sending target-style barrages), such as special-style barrages, that is, 0-10 points correspond to Class A barrages, 11-20 points correspond to Class B barrages, and so on.
[0164] In actual implementation, users can send target-style barrages only within the validity period. Specifically, after switching the game page back to the video playback page, they can also obtain the game end duration, which is used to indicate the duration from the moment the game page is switched back to the playback page to the current moment; thus, when the game end duration is less than the target duration, a target-style barrage corresponding to the game score is sent.
[0165] It should be noted that the game end duration is the time between the time when the user ends the game match on the game page and the current moment, and the target duration is pre-set, for example, it can be two days, etc. Only within the target duration, that is, only within the validity period, can the target style barrage corresponding to the game score be sent. If the target time is exceeded, that is, outside the validity period, no matter whether the user has sent the target style barrage corresponding to the game score, the target style barrage corresponding to the game score can no longer be sent.
[0166] 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 three parts: network status detection; downloading and loading of game resources; recording and use of game rights, which will be introduced below.
[0167] Regarding the detection of the network status, when the client of the video playback is started, the network status during the video playback is detected in real time. When the detection result indicates that the network speed during the video playback is less than or equal to the speed threshold, it is determined that the video playback is in a network-restricted scenario. Here, the speed threshold can be preset, for example, 10 kilobits per second. Here, when the video playback is in a network-restricted scenario, the video playback page is prepared to be switched to the game page. At the same time, in the process of playing a game based on the game page, the network status during the video playback will also be detected in real time; when the detection result indicates that the network speed during the video playback is greater than the speed threshold, it is determined that the video playback is not in a network-restricted scenario. At this time, a prompt message is displayed, and the prompt message is used to prompt whether to continue playing the video; thus, in response to the page switching instruction triggered by the prompt message, the game page is switched to the video playback page to play the video based on the playback page.
[0168] Regarding the downloading and loading of game resources, game resources refer to the background images of the game, cartoon images of the protagonists, and obstacle images. Here, since the background and protagonists of each video may be different, the resources here are completely matched with the video. Pull the game resources of the current video when entering the video playback page. If the pull fails or other errors occur, the built-in default resource image is used directly. At the same time, the image resources of the video will be packaged into a compressed package for the client to download. After the client downloads and passes the verification, the compressed package will be decompressed and the image will be stored in a specific format for subsequent calls. Specifically, the process of downloading and loading game resources 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 process of downloading and loading the game resources provided in the embodiment of the present application is described as an example in which the terminal 400 alone executes the downloading and loading of the game resources provided in the embodiment of the present application. Fig.10 , Fig.10 is a flowchart of the process of downloading and loading game resources provided by the embodiment of the present application, based on Fig.10 The process of downloading and loading game resources provided in the embodiment of the present application is implemented through steps 1001 to 1006. Specifically, in step 1001, the client on the terminal responds to the user's playback instruction for the video, displays the playback page of the video, and plays the video based on the playback page of the video; step 1002, sends a resource package request carrying a video identifier to the server; step 1003, obtains game resources, and stores the game resources for subsequent calls; step 1004, when the network is in a restricted scenario, obtains the storage path of the resources; step 1005, based on the storage path of the resources, loads game resources including the background image of the game, the cartoon image of the protagonist, and the obstacle image; step 1006, displays the loaded game resources, that is, switches the playback page of the video to the game page.
[0169] It should be noted that, with regard to the process of obtaining and storing game resources, specifically, after the client sends a resource package request carrying a video identifier to the server, when the request is successful, the resource package sent by the server is obtained, and the resource package is verified. When the verification is successful, the compressed package is decompressed to obtain game resources including the game background image, the cartoon image of the protagonist, and the obstacle image, and then a storage path for the game resources is generated, and the images in the game resources are stored in a specific format for subsequent calls; when the request is unsuccessful, or when the request is successful and the verification is unsuccessful, the pre-set default game resources are directly obtained, and then a storage path for the default game resources is generated, and the images in the default game resources are stored in a specific format for subsequent calls.
[0170] In actual implementation, when loading game resources, for the image loading process of background images and obstacles in the game resources, the background images and obstacles will change as the protagonist moves, so these two elements require two carrier pools, and the carriers in the carrier pool will be reused to reduce the consumption of terminal memory. Figure 6 As 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, these carriers will be recycled again starting from the most recently acquired background image. Here, the size of the background image carrier is the same as the size of the terminal screen, ensuring that the background image cannot be displayed due to the size being too short.
[0171] Regarding the recording and use of game rights, the process of recording and using game rights 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 performs the recording and use of the game rights provided in the embodiment of the present application as an example. Fig.11 , Fig.11 is a flowchart of the process of recording and using the game rights provided by the embodiment of the present application, based on Fig.11, the process of recording and using game rights is implemented through steps 1101 to 1111. Specifically, in step 1101, the client on the terminal displays the user's game process based on the game page; in step 1102, during the game process, the user's game score is updated in real time; in step 1103, the network status is detected in real time, and when the network is not in a network restricted scenario, the game page is switched to the video playback page; when the network is still in a network restricted scenario, the game continues to be played based on the game page; in step 1104, after switching from the game page to the video playback page, the user's game data, that is, the game score, is sent to the game server; in step 1105, the game server generates the corresponding bullet screen based on the user's game score according to the specified rules. Permission (permission for the target operation) and return it to the client; step 1106, the client determines the specific barrage permission; step 1107, after receiving the specific barrage permission, the client sends a request for obtaining the barrage style carrying the permission level to the barrage server; step 1108, the barrage server sends the target barrage style to the client based on the request for obtaining the barrage style carrying the permission level; step 1109, the client receives the target barrage style sent by the barrage server; step 1110, the client responds to the display instruction for the barrage publishing page and displays the barrage publishing page; step 1111, the client sends the barrage in response to the barrage sending operation for the barrage publishing page.
[0172] It should be noted that if it is detected that the user does not have the barrage permission, a barrage prompt message will be displayed, which is used to prompt the user to send a barrage of the target style.
[0173] In this way, this application improves the user experience by allowing users to continue to immerse themselves in the current plot when there is no network or weak network. In addition, the achievements during the game will be exchanged for barrage rights, and user stickiness will be increased by encouraging users to play mini games.
[0174] By applying the above-mentioned embodiment of the present application, during the playback of a video, when the playback of the video is in a network-restricted scenario, based on the game page of the game associated with the acquired video, the playback page of the video is switched to the game page, so that a game match is performed on the game page, and when the playback of the video is not in a network-restricted scenario, the game page is switched back to the playback page of the video, so that when the authority to perform the target operation is determined based on the achievements obtained in the game, the target operation for the video is performed. In this way, when the playback of the video is in a network-restricted scenario, by switching the playback page of the video to the game page of the game associated with the video, a game match is performed based on the game page, and through the association between the playback page and the game page, it is ensured that even when the playback of the video 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, when the playback of the video is not in a network-restricted scenario, the game page is switched back to the playback page of the video, and when it is determined that the authority to perform the target operation exists based on the achievements obtained in the game, the target operation for the video is performed, enriching the interactive operations during the video playback process and improving the resource utilization rate during video playback.
[0175] 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:
[0176] The first acquisition module 4551 is used to acquire a game page of a game associated with the video, and switch the play page of the video to the game page;
[0177] A switching module 4552 is used to respond to a page switching instruction for the game page, and when the playback of the video is not in a network restricted scenario, switch the game page back to the playback page of the video;
[0178] A second acquisition module 4553 is used to acquire the achievements obtained in the game in response to an operation instruction for a target operation on the video during the process of playing the video based on the play page;
[0179] The execution module 4554 is used to execute the target operation on the video when it is determined that there is permission to execute the target operation based on the achievement.
[0180] In some embodiments, the target operation is a barrage sending operation for the video, and the barrage sending operation indicates sending a barrage of a target style; the second acquisition module 4553 is also used to obtain the achievements obtained in the game in response to the operation instructions of the barrage sending operation for the video during the process of playing the video based on the playback page; the execution module 4554 is also used to send the target style of barrage when it is determined that there is permission to execute the barrage sending operation for the video based on the achievement.
[0181] In some embodiments, the device also includes a first display module, which is used to display the edited barrage content and display multiple candidate styles of the barrage for selection in response to the barrage editing operation on the video; in response to the selection operation of the target candidate style among the multiple candidate styles, the target candidate style is determined as the target style of the barrage corresponding to the barrage content.
[0182] In some embodiments, the achievement is the game score obtained in the game match of the game; the barrage style of the barrage sent for the video includes multiple candidate styles, and different candidate styles correspond to different game score ranges; the device also includes a third acquisition module, and the third acquisition module is used to obtain the target game score range corresponding to the target style; when the game score belongs to the target game score range, it is determined that there is permission to execute the barrage sending operation for the video.
[0183] In some embodiments, the target operation is a style switching operation for the barrage sent for the video, and the style switching operation is used to indicate that the style of the barrage in the playback page of the video is switched from the current first style to the second style; the second acquisition module 4553 is also used to obtain the achievements obtained in the game in response to the operation instructions for the style switching operation of the barrage in the playback page during the process of playing the video based on the playback page; the execution module 4554 is also used to switch the style of the barrage in the playback page from the current first style to the second style when it is determined that there is permission to execute the style switching operation for the video based on the achievement.
[0184] In some embodiments, the device also includes a second display module, which is used to display at least one barrage in the playback page during the process of playing the video based on the playback page; wherein the at least one barrage corresponds to at least one barrage style; in response to a selection operation of a target barrage in the at least one barrage, the barrage style of the target barrage is determined to be the second style.
[0185] In some embodiments, the device also includes a fourth acquisition module, which is used to obtain the game end duration, and the game end duration is used to indicate the duration between the moment when the game page is switched back to the playback page and the current moment; the second acquisition module 4553 is also used to obtain the achievements obtained in the game in response to the operation instructions for the target operation of the video when the game end duration is less than the target duration.
[0186] In some embodiments, the target operation is a clarity switching operation for the playback clarity of the video; the second acquisition module 4553 is also used to switch the playback clarity of the video from the current clarity to the target clarity when it is determined based on the achievement that there is authority to perform the clarity switching operation, and the target clarity is higher than the current clarity.
[0187] In some embodiments, the video includes a live video, and the playback page includes at least a first live page and a second live page, and the live content of the first live page is different from the live content of the second live page; the first acquisition module 4551 is also used to, during the process of playing the video based on the first live page, when the live video is in a network restricted scenario, obtain the game page of the game associated with the live video and switch the first live page to the game page; the switching module 4552 is also used to respond to a page switching instruction for the game page, and when the live video is not in a network restricted scenario, switch the game page back to the second live page of the live video.
[0188] In some embodiments, the device also includes a third display module, which is used to display a page switching control in the game page; in response to a trigger operation on the page switching control, a page switching instruction for the game page is received, and the page switching instruction is used to instruct to switch the game page to the playback page of the video.
[0189] In some embodiments, the device also includes a fourth 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 return to play the video; the switching module 4552 is also used to switch the game page back to the playback page of the video in response to a page switching instruction triggered by the prompt message.
[0190] In some embodiments, the first acquisition module 4551 is also used to acquire 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 include 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.
[0191] 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 first acquisition module 4551 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.
[0192] 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 first acquisition module 4551 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.
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] 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.
[0198] 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).
[0199] 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.
[0200] In summary, the embodiments of the present application have the following beneficial effects:
[0201] (1) When the video playback is in a network-restricted scenario, the video playback page is switched to the game page of the game associated with the video, so that a game can be 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, when the video playback is not in a network-restricted scenario, the game page is switched back to the video playback page, and when it is determined that there is permission to perform the target operation based on the achievements obtained in the game, the target operation for the video is performed, thereby enriching the interactive operations during the video playback process and improving the resource utilization during video playback.
[0202] (2) The user experience is enhanced by allowing users to continue to immerse themselves in the current plot when there is no network or a weak network. In addition, the achievements during the game will be exchanged for barrage rights, which increases user stickiness by encouraging users to play mini-games.
[0203] 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.
[0204] 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 a video, when the playback of the video is in a network-restricted scenario, obtaining a game page of a game associated with the video, and switching the playback page of the video to the game page; In response to a page switching instruction for the game page, when the playback of the video is not in a network restricted scenario, switching the game page back to the playback page of the video; In the process of playing the video based on the play page, in response to an operation instruction for a target operation of the video, obtaining an achievement obtained in the game; When it is determined that there is a right to perform a target operation based on the achievement, the target operation for the video is performed.
2. The method according to claim 1, characterized in that The target operation is a barrage sending operation for the video, and the barrage sending operation indicates sending a barrage of a target style; The step of obtaining the achievement obtained in the game in response to an operation instruction for a target operation on the video during the process of playing the video based on the play page includes: In the process of playing the video based on the play page, in response to an operation instruction of a bullet screen sending operation for the video, obtaining an achievement obtained in the game; When it is determined based on the achievement that there is permission to perform the target operation, performing the target operation on the video includes: When it is determined that there is permission to perform a barrage sending operation for the video based on the achievement, the barrage of the target style is sent.
3. The method according to claim 2, characterized in that In the process of playing the video based on the play page, in response to an operation instruction of a bullet screen sending operation for the video, before obtaining the achievement obtained in the game, the method further includes: In response to a bullet comment editing operation on the video, displaying the edited bullet comment content and displaying a plurality of candidate styles of the bullet comment for selection; In response to a selection operation on a target candidate style among the multiple candidate styles, the target candidate style is determined as a target style of the barrage corresponding to the barrage content.
4. The method according to claim 2, characterized in that The achievement is the game score obtained in the game match of the game; the barrage style sent for the video includes multiple candidate styles, and different candidate styles correspond to different game score ranges; When it is determined that there is permission to perform a bullet screen sending operation for the video based on the achievement, before sending the bullet screen of the target style, the method further includes: Obtain a target game score range corresponding to the target style; When the game score belongs to the target game score range, it is determined that there is permission to perform a bullet screen sending operation for the video.
5. The method according to claim 1, characterized in that The target operation is a style switching operation for the barrage sent by the video, and the style switching operation is used to instruct to switch the style of the barrage in the playback page of the video from the current first style to the second style; The step of obtaining the achievement obtained in the game in response to an operation instruction for a target operation on the video during the process of playing the video based on the play page includes: In the process of playing the video based on the play page, in response to an operation instruction for a style switching operation of the bullet screen in the play page, obtaining an achievement obtained in the game; When it is determined based on the achievement that there is permission to perform the target operation, performing the target operation on the video includes: When it is determined that there is permission to perform the style switching operation on the video based on the achievement, the style of the barrage in the playback page is switched from the current first style to the second style.
6. The method according to claim 5, characterized in that In the process of playing the video based on the play page, in response to an operation instruction for switching the style of the bullet screen in the play page, before obtaining the achievement obtained in the game, the method further includes: In the process of playing the video based on the play page, at least one bullet comment is displayed in the play page; wherein the at least one bullet comment corresponds to at least one bullet comment style; In response to a selection operation on a target barrage in the at least one barrage, the barrage style of the target barrage is determined to be the second style.
7. The method according to claim 1, characterized in that After switching the game page back to the video playback page, the method further includes: Get the game end time, where the game end time is used to indicate the time from the moment when the game page is switched back to the play page to the current moment; The step of obtaining the achievement obtained in the game in response to the operation instruction for the target operation of the video includes: When the game end time is less than the target time, in response to an operation instruction for a target operation on the video, an achievement obtained in the game is obtained.
8. The method according to claim 1, characterized in that The target operation is a definition switching operation for the playback definition of the video; When it is determined based on the achievement that there is permission to perform the target operation, performing the target operation on the video includes: When it is determined based on the achievement that there is permission to perform the definition switching operation, the playback definition of the video is switched from the current definition to the target definition, and the target definition is higher than the current definition.
9. The method according to claim 1, characterized in that The video includes a live video, the playback page includes at least a first live page and a second live page, and the live content of the first live page is different from the live content of the second live page; During the video playback process, when the video playback is in a network restricted scenario, obtaining a game page of a game associated with the video, and switching the video playback page to the game page, includes: In the process of playing the video based on the first live page, when the live video is in a network restricted scenario, obtaining a game page of a game associated with the live video, and switching the first live page to the game page; In response to the page switching instruction for the game page, when the playback of the video is not in a network restricted scenario, switching the game page back to the playback page of the video includes: In response to a page switching instruction for the game page, when the live video is not in a network restricted scenario, the game page is switched back to a second live page of the live video.
10. The method according to claim 1, characterized in that After switching the video playback page to the game page, the method further includes: In the game page, display a page switching control; In response to a trigger operation on the page switching control, a page switching instruction for the game page is received, wherein the page switching instruction is used to instruct to switch the game page to the playback page of the video.
11. The method according to claim 1, characterized in that After switching the video playback page to the game page, the method further includes: In the process of playing the game 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, a prompt message is displayed, wherein the prompt message is used to prompt whether to return to play the video; In response to a page switching instruction for the game page, switching the game page back to the playback page of the video includes: In response to a page switching instruction triggered by the prompt information, the game page is switched back to the playback page of the video.
12. The method according to claim 1, characterized in that The step of obtaining a game page of a game associated with the video includes: When the video is played 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 materials, a game page corresponding to the game scene is constructed.
13. The method according to claim 12, characterized in that 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.
14. The method according to claim 13, 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.
15. The method according to claim 1, wherein: When the video is played in a network-restricted scenario, before obtaining a game page of a game associated with the video, the method further 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, it is determined that the playback of the video is in a network-restricted scenario.
16. A video processing device, characterized in that: The device comprises: A first acquisition module, used to acquire a game page of a game associated with the video, and switch the play page of the video to the game page; A switching module, for responding to a page switching instruction for the game page, and switching the game page back to the playback page of the video when the playback of the video is not in a network restricted scenario; A second acquisition module is used to acquire the achievements obtained in the game in response to an operation instruction for a target operation on the video during the process of playing the video based on the play page; An execution module is used to execute the target operation on the video when it is determined that there is permission to execute the target operation based on the achievement.
17. 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 15 when executing the computer executable instructions stored in the memory.
18. 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 15.
19. 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 15 is implemented.