A video playback control method, device, electronic device, and storage medium

By cutting the video scene into small scenes and controlling the movement of the target object in the order of connection, the problem of lag in HTML5 Canvas animation playback is solved, achieving efficient video playback effects and easy-to-maintain animation playback.

CN115225954BActive Publication Date: 2025-07-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110418223.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-19
Publication Date
2025-07-22
Estimated Expiration
2041-04-19

AI Technical Summary

Technical Problem

When drawing animations using HTML5 Canvas, the expansion of the time interval between animation frames leads to stuttering playback.

Method used

Switch the video scene into several small scenes, configure the corresponding video configuration information, load the subscene in segments according to the connection order between multiple subscenes, control the target object to move according to the target path in multiple subscenes and perform custom behavior.

Benefits of technology

It effectively alleviates the problem of memory resource occupation, avoids video lag, improves video playback effect, and achieves efficient, expandable and easy-to-maintain animation playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115225954B_ABST
    Figure CN115225954B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technologies, and particularly to a video playback control method, apparatus, electronic device, and storage medium for reducing video playback jitter and improving video playback effects. The method includes: obtaining a video configuration sequence corresponding to a target video to be played, the video configuration sequence including a plurality of video configuration information; determining a plurality of sub-scenes corresponding to the video configuration sequence, the plurality of sub-scenes being obtained by cutting the main scene of the target video, and each sub-scene corresponding to one piece of video configuration information; determining respective target paths associated with a target object according to the plurality of video configuration information; and controlling the target object to sequentially move in the plurality of sub-scenes according to the corresponding target paths and perform corresponding custom behaviors in accordance with the connection sequence between the plurality of sub-scenes. The present application loads sub-scenes in segments and controls the target object to sequentially move in the plurality of sub-scenes in segments, which can effectively alleviate the problem of memory resource occupation and effectively avoid video jitter.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Currently, when using HTML5 (HyperText Markup Language 5) Canvas (canvas) to draw animations, the animation frame drawing technique is used to concatenate each frame in a certain order for playback. As long as the frame playback speed is appropriate, a smooth animation can be created. In many scenarios, there are different requirements for the frame playback speed, and it is necessary to be able to dynamically and reasonably adjust the playback speed of the animation frames in order to produce a qualified animation effect. However, as the time interval between two animation frames increases, the animation playback is prone to jamming. Therefore, how to effectively reduce the jamming phenomenon that occurs during animation playback is an urgent problem to be solved. Summary of the Invention

[0003] Embodiments of the present application provide a video playback control method, apparatus, electronic device, and storage medium to reduce video playback jamming and improve video playback effects.

[0004] A video playback control method provided by an embodiment of the present application includes:

[0005] Obtain a video configuration sequence corresponding to a target video to be played, where the video configuration sequence includes multiple video configuration information, and each video configuration information represents: a custom behavior to be completed by a target object in the target video in a corresponding target path;

[0006] Determine multiple sub-scenes corresponding to the video configuration sequence, where the multiple sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to one video configuration information;

[0007] According to the multiple video configuration information, determine each target path associated with the target object;

[0008] According to the connection order between the multiple sub-scenes, control the target object to move in the multiple sub-scenes in turn along the corresponding target paths and execute the corresponding custom behaviors.

[0009] A video playback control apparatus provided by an embodiment of the present application includes:

[0010] An information acquisition unit for obtaining a video configuration sequence corresponding to a target video to be played, where the video configuration sequence includes multiple video configuration information, and each video configuration information represents: a custom behavior to be completed by a target object in the target video in a corresponding target path;

[0011] A first determination unit, configured to determine a plurality of sub-scenes corresponding to the video configuration sequence, where the plurality of sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to a video configuration information;

[0012] A second determination unit, configured to determine each target path associated with the target object according to the plurality of video configuration information;

[0013] A control unit, configured to control the target object to move sequentially in the plurality of sub-scenes according to the connection sequence between the plurality of sub-scenes, respectively according to the corresponding target paths, and execute corresponding custom behaviors.

[0014] Optionally, the video configuration information includes path configuration information, and the control unit is specifically configured to:

[0015] Sequentially determine the corresponding target paths of the target object according to each path configuration information in the plurality of video configuration information; and

[0016] According to the connection sequence between the plurality of sub-scenes, sequentially execute the processing logic related to the corresponding target paths in each path configuration information, so as to control the target object to move sequentially in the plurality of sub-scenes, respectively according to the corresponding target paths, where when reaching a target path, control the target object to execute a custom behavior associated with the target path during the movement on the target path.

[0017] Optionally, the path configuration information includes path-related parameters, an initialization event function, and an end event function, and the control unit is specifically configured to:

[0018] For each obtained path configuration information, execute the processing logic of the initialization event function in the path configuration information;

[0019] Read the path-related parameters of the target path in the path configuration information, so that the target object moves on the target path according to the path-related parameters, and when reaching the end point of the target path, execute the processing logic of the end event function.

[0020] An electronic device provided in an embodiment of the present application includes a processor and a memory, where the memory stores program code, and when the program code is executed by the processor, the processor is caused to execute the steps of the above-mentioned video playback control method.

[0021] An embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of any one of the above video playback control methods.

[0022] An embodiment of the present application provides a computer-readable storage medium, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps of one of the above video playback control methods.

[0023] The beneficial effects of the present application are as follows:

[0024] An embodiment of the present application provides a video playback control method, device, electronic device, and storage medium. Since in the embodiment of the present application, the scene of the video is switched into several small scenes, corresponding video configuration information is configured for each sub-scene to form a video configuration sequence, and during the video playback process, the sub-scenes are loaded segment by segment according to the connection order between the multiple sub-scenes, and the target object is controlled segment by segment to move in the multiple sub-scenes respectively along the corresponding target paths and execute corresponding custom behaviors, which can effectively alleviate the problem of memory resource occupation, effectively avoid video stuttering, and improve the video playback effect.

[0025] Other features and advantages of the present application will be described in the following specification, and some of them will become obvious from the specification, or be understood by implementing the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings

[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0027] Figure 1 It is an optional schematic diagram of an application scenario in an embodiment of the present application;

[0028] Figure 2 It is a flowchart of a video playback control method in an embodiment of the present application;

[0029] Figure 3 It is a schematic diagram of a sub-scene and related paths in an embodiment of the present application;

[0030] Figure 4Schematic diagram of the composition structure of a playback device corresponding to an H5 animated mini-game in an embodiment of the present application;

[0031] Figure 5 Schematic diagram of a scene layering effect in an embodiment of the present application;

[0032] Figure 6 Schematic diagram of another video playback control method in an embodiment of the present application;

[0033] Figure 7A Schematic diagram of an animation scene in an embodiment of the present application;

[0034] Figure 7B Schematic diagram of another animation scene in an embodiment of the present application;

[0035] Figure 8 Timing diagram of a complete video playback control method in an embodiment of the present application;

[0036] Figure 9 Schematic diagram of the composition structure of a video playback control device in an embodiment of the present application;

[0037] Figure 10 Schematic diagram of the hardware composition structure of an electronic device applying an embodiment of the present application;

[0038] Figure 11 Schematic diagram of the hardware composition structure of another electronic device applying an embodiment of the present application. Detailed implementation manners

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments recorded in this application document without creative efforts shall fall within the scope of protection of the technical solutions of the present application.

[0040] Some concepts involved in the embodiments of the present application are introduced below.

[0041] Hook (hook function): used to pull out the system program and make it the code segment executed by the developer. Before the system calls this function, the hook program captures this message first, and the hook function gets control first. At this time, the hook function can not only process (change) the execution behavior of this function, but also force the end of the message transmission.

[0042] HTML5: Abbreviation for H5, is a language description method for constructing Web (World Wide Web) content. HTML5 is the next-generation standard of the Internet and a language method for constructing and presenting Internet content, and is considered to be one of the core technologies of the Internet.

[0043] Canvas: Provides a means through JavaScript (script) and HTML <canvas>The way to draw graphics using elements. It can be used in animation, game graphics, data visualization, image editing, real-time video processing, etc.

[0044] Video configuration sequence: In the embodiments of this application, the video configuration sequence includes multiple video configuration information, and each video configuration information characterizes the custom behavior to be completed by the target object in the corresponding target path in the target video. Specifically, the video configuration information includes: scene configuration information, which is used to represent the configuration related to each element in the sub-scene; path configuration information, which is used to represent the configuration related to the target path associated with the target object; and object configuration information, which is used to represent the configuration related to the basic state of the target object.

[0045] Widget: A type of video material. Usually, the video widget related to the target object is displayed at a fixed position on the video interface at the beginning of the video until the end of the video. For example, an avatar widget, an expression widget, a decoration widget, etc.

[0046] The following briefly introduces the design concept of the embodiments of this application:

[0047] In the related art, a method and device for adjusting the animation playback speed based on Canvas are proposed. The method includes: respectively obtaining all pixel point data on the Canvas of the first animation frame and all pixel point data on the Canvas of the second animation frame; calculating the target number of frames; respectively calculating multiple target change differences, where the multiple target change differences are respectively the ratios of multiple pixel point differences to the target number of frames, and the multiple pixel point differences are respectively the differences between the pixel point data of multiple pixels on the first animation frame and the pixel point data on the second animation frame; respectively drawing multiple target animation frames according to the multiple target change differences; and sequentially playing the first animation frame, the multiple target animation frames, and the second animation frame. Through the above method, the problem that the animation is prone to jitter when the time interval between two animation frames is enlarged in the related art is solved. However, this method has a large cost for manual position calculation and a lot of repetitive work. The written animation has poor scalability and is not easy to modify.

[0048] In view of this, embodiments of the present application provide a video playback control method, apparatus, electronic device, and storage medium. Since in the embodiments of the present application, the video scene is switched into several small scenes, corresponding video configuration information is configured for each sub-scene to form a video configuration sequence, and during the video playback process, the sub-scenes are loaded segment by segment according to the connection order between the multiple sub-scenes, and the target object is controlled segment by segment to move in the multiple sub-scenes respectively along the corresponding target paths and execute corresponding custom behaviors, which can effectively alleviate the problem of memory resource occupation, effectively avoid video stuttering, improve the video playback effect, and the method in the embodiments of the present application is efficiently scalable and easy to maintain.

[0049] The following describes the preferred embodiments of the present application with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present application, and are not used to limit the present application. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0050] As Figure 1 shown, it is a schematic diagram of the application scenario of the embodiments of the present application. It is a schematic diagram of the application scenario of the embodiments of the present application. This application scenario diagram includes two terminal devices 110 and a server 120. The terminal devices 110 and the server 120 can communicate through a communication network.

[0051] In an alternative embodiment, the communication network is a wired network or a wireless network. The terminal devices 110 and the server 120 can be directly or indirectly connected through wired or wireless communication methods, and the present application does not make any restrictions here.

[0052] In the embodiments of the present application, the terminal device 110 is an electronic device used by a user. This electronic device can be a personal computer, mobile phone, tablet computer, notebook, e-reader, etc., which are computer devices with certain computing capabilities and running instant messaging software and websites or social software and websites. Each terminal device 110 is connected to the server 120 through a wireless network. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, notebook computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the present application does not make any restrictions here.

[0053] In an embodiment of the present application, an application related to an H5 mini-game is installed on the terminal device 110. The application involved in the embodiment of the present application may be software, or a client such as a web page or a mini-program. The server 120 is a backend server corresponding to the software, web page, mini-program, etc., and the specific type of the client is not limited.

[0054] It should be noted that the execution subject of the video playback control method in the embodiment of the present application may be executed independently by the server or the terminal device, or jointly executed by the server and the terminal device.

[0055] For example, when jointly executed by the server and the terminal device, the server may obtain the video configuration sequence corresponding to the target video to be played and send it to the terminal device. Then, the terminal device determines multiple sub-scenes corresponding to the video configuration sequence; according to multiple video configuration information, determines each target path associated with the target object; and controls the target object to move in multiple sub-scenes in sequence according to the connection order between the multiple sub-scenes, respectively along the corresponding target paths, and execute corresponding custom behaviors.

[0056] Alternatively, the terminal device obtains the video configuration sequence corresponding to the target video to be played and sends it to the terminal device. Then, the server determines multiple sub-scenes corresponding to the video configuration sequence; according to multiple video configuration information, determines each target path associated with the target object; and controls the target object to move in multiple sub-scenes in sequence according to the connection order between the multiple sub-scenes, respectively along the corresponding target paths, and execute corresponding custom behaviors, etc. Specific limitations are not made here.

[0057] In addition, as the video playback control method or device disclosed in the present application, multiple servers can form a blockchain, and the server is a node on the blockchain.

[0058] Next, in combination with the above-described application scenario, the video playback control method provided by the exemplary embodiment of the present application will be described with reference to the accompanying drawings. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard.

[0059] Refer to Figure 2 As shown, it is a flowchart of the implementation of a video playback control method provided by an embodiment of the present application. Here, it is described by taking the execution by the server as an example. The specific implementation process of the method is as follows:

[0060] S21: Obtain the video configuration sequence corresponding to the target video to be played. The video configuration sequence includes multiple video configuration information, and each video configuration information represents: the custom behavior to be completed by the target object in the target video in the corresponding target path;

[0061] Among them, the video can be a short video, an animation, a small game, etc. In the following, a H5 animated small game is mainly taken as an example for illustration. Suppose a scenario where a developer needs to develop a H5 animated small game to display the walking trajectory of a character and interact with the elements encountered along the way. Among them, the character is the target object.

[0062] S22: Determine multiple sub-scenes corresponding to the video configuration sequence. The multiple sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to a video configuration information;

[0063] In the embodiments of the present application, the video configuration information includes, but is not limited to, some or all of the following:

[0064] (1) Scene configuration information, used to represent the configuration related to each element within the sub-scene;

[0065] For example, the scene configuration information includes coordinates, size, transparency, stacking relationship, animation sequence, etc.

[0066] (2) Path configuration information, used to represent the configuration related to the target path associated with the target object;

[0067] For example, the path configuration information includes path-related parameters, initial event function, end event function.

[0068] Among them, the path-related parameters can be path duration, path trajectory, etc., and the functions can be hook functions, that is, initialization event hooks, end event hooks.

[0069] (3) Object configuration information, used to represent the configuration related to the basic state of the target object.

[0070] Among them, the target object mainly refers to the main character in the animation, that is, the protagonist. The corresponding object configuration information is the protagonist configuration information, including the appearance state of the protagonist, the coordinates of the protagonist, the stacking relationship of the protagonist, etc. The stacking relationship of the protagonist among them determines whether the protagonist is hidden behind the background or covers the background.

[0071] S23: Determine each target path associated with the target object according to multiple video configuration information;

[0072] S24: According to the connection sequence between multiple sub-scenes, control the target object to move in multiple sub-scenes in turn along the corresponding target paths respectively, and execute the corresponding custom behaviors.

[0073] In the embodiments of the present application, the process of the target object moving is an irregular movement trajectory. In order to write efficient, maintainable, and easily expandable trajectory movement logic, the animation process can be cut into a series of sequences, and the trajectory animation can be abstracted into a series of video configuration information. It should be noted that each video configuration information corresponds to a sub-scene, and thus corresponds to a target path, as well as custom behaviors defined in the completed path. That is, each video configuration information represents: the target object in the target video and the custom behaviors to be completed in the corresponding target path.

[0074] Therefore, when generating an animation sequence based on the video configuration sequence, it is specifically implemented according to the connection order between multiple sub-scenes. One sub-scene corresponds to one video configuration information, and thus corresponds to a target path. According to this connection order, the target object can be controlled to move in multiple sub-scenes in sequence along the corresponding target paths and execute the corresponding custom behaviors.

[0075] For example Figure 3 As shown, it is a schematic diagram of a sub-scene and related paths in the embodiments of the present application. Figure 3 A total of 3 sub-scenes and 3 target paths are shown. Among them, the target object can execute custom behavior 1 at point a on target path 1 in sub-scene A, execute custom behavior 2 at point b on target path 2 in sub-scene B, execute custom behavior 3 at point c, execute custom behavior 4 at point d on target path 3 in sub-scene C, execute custom behavior 5 at point e on target path 4 in sub-scene D, and so on.

[0076] In the above implementation, by switching the scene of the video into several small scenes, corresponding to each sub-scene, configuring the corresponding video configuration information, forming a video configuration sequence, and during the process of the video, loading the sub-scenes segment by segment according to the connection order between multiple sub-scenes, and controlling the target object to move in multiple sub-scenes in sequence along the corresponding target paths respectively and execute the corresponding custom behaviors, the problem of memory resource occupation can be effectively alleviated, the video stuttering can be effectively avoided, and the video playback effect can be improved.

[0077] In addition, it should be noted that when there are multiple target objects in the video, each target object corresponds to its own video configuration sequence, and the multiple target objects do not affect each other and can be processed in parallel or serially.

[0078] Refer to Figure 4 As shown, it is a schematic diagram of the composition structure of a playback device corresponding to an H5 animation game in the embodiments of the present application. It includes an animation executor, a resource loading module, an animation debugging module, and a process control module.

[0079] Among them, the resource loading module is used to load animation resources. In the embodiments of the present application, resources such as pictures and sequence frames on which the animation display depends are loaded through the network, and the resources are sent to the animation for use. Since the animation resources are large, loading them all at once will result in a long loading time, a long waiting time for users, and an increased churn rate. Therefore, the embodiments of the present application adopt a scheme of loading resources in batches. Only the core necessary resources are loaded initially, and the subsequent animation resources are loaded in batches during the progress of the animation, effectively reducing the resource loading time and improving the user experience.

[0080] It should be noted that the resources in the embodiments of the present application become the background after being loaded. As the protagonist moves, resources are loaded at the scene critical points (also called key sequence nodes) to generate a new background.

[0081] In addition, new scenes will be continuously seen during the movement of the character, while the old scenes will disappear off the screen. Since the overall scene is too large, the total scene needs to be cut into multiple small scenes, and new scenes are loaded and old scenes are destroyed during the movement of the character to keep the page memory stable.

[0082] In an alternative embodiment, during the movement of the target object, the critical points reached by the target object can be obtained; the critical points are used to cut the main scene to obtain corresponding sub-scenes;

[0083] Among them, for each obtained critical point, the first sub-scene and the second sub-scene obtained by cutting based on one critical point are determined, and M sub-scenes after the second sub-scene are loaded, and N sub-scenes before the first sub-scene are destroyed, where M and N are positive integers. It should be noted that in the present application, the first sub-scene refers to the previous sub-scene among the two sub-scenes obtained by cutting based on one critical point, and the second sub-scene refers to the latter sub-scene among the two cut sub-scenes.

[0084] Specifically, M and N can be the same or different. In the embodiments of the present application, mainly M = N = 1 is taken as an example for illustration.

[0085] In the embodiments of the present application, the background layer contains all the cut scenes and moves as a whole. During the movement, the cut sub-scenes are dynamically added or destroyed.

[0086] For example, the main scene of the target video 1 to be played is cut into several scenes such as A, B, C, D, E... Scenes A and B are loaded during initialization. When the character moves to the critical point between scenes A and B, scene C is loaded; when the character moves to the critical point between scenes B and C, scene D is loaded and scene A is destroyed; when the character moves to the critical point between scenes C and D, scene E is loaded and scene B is destroyed, and so on.

[0087] Of course, it is also possible to load Scene C and destroy Scene A when the character moves to the critical point between Scenes A and B; load Scene D and destroy Scene B when the character moves to the critical point between Scenes B and C; load Scene E and destroy Scene C when the character moves to the critical point between Scenes C and D, and so on.

[0088] Based on the above embodiments, subsequent scene resources will be loaded and the original scene resources will be destroyed every time a key sequence node is reached, enabling efficient use of memory and effective recycling of resources.

[0089] In the embodiments of the present application, in order to achieve easy modification and extensibility of the configuration, the embodiments of the present application implement animation configuration. As Figure 4 shown, the animation executor therein is responsible for reading resources from the resource loading module, reading the animation configuration sequence, and executing them in sequence. The animation debugging module provides debugger functions, which can quickly locate the animation with a specified serial number and perform debugging. The process control module is responsible for controlling animation processes such as playing, pausing, fast-forwarding, slow-playing, and rewinding of the animation.

[0090] Among them, animation playing refers to the normal execution of the animation sequence; animation pausing refers to blocking the next execution of the animation in the animation end event hook, waiting for asynchronous behaviors such as user interaction or network requests; animation fast-forwarding and slow-playing refer to controlling the movement speed of the character to be twice the speed, 0.5 times the speed, etc.; animation rewinding refers to panning the camera forward to create the visual effect of the character moving backward.

[0091] In the embodiments of the present application, during the movement of the character, it is necessary to effectively control the movement of the scene and the camera. Laying out the scene in layers is beneficial for controlling the scene display.

[0092] Therefore, in an alternative embodiment, the target video may also be layered before obtaining the video configuration sequence corresponding to the target video to be played. The specific process is as follows:

[0093] First, perform a first layering process on the target video to obtain a widget layer for accessing fixed video widgets and a main scene layer for carrying the main scene. Among them, during the playback of the target video, the coordinate position of the widget layer in the playback interface for playing the target video remains fixed;

[0094] Furthermore, perform a second layering process on the main scene layer to obtain an object layer for carrying the target object and a background layer for carrying all sub-scenes. Among them, the coordinate position of the object layer is located at a set position in the main scene layer and remains fixed, and the coordinate position of the background layer changes with the playback progress of the target video, so that during the playback of the target video, the coordinate position of the target object remains at the set position and moves relative to the sub-scenes.

[0095] Refer to Figure 5 As shown, it is a schematic diagram of a scene layering effect in an embodiment of the present application. In the embodiment of the present application, the first layering process is performed on the target video, which mainly refers to dividing the main stage scene of the target video into a pendant layer and a main scene layer. Among them, the pendant layer is always fixed at a relatively fixed position on the screen, and is used to visit fixed pendants.

[0096] Furthermore, layering the main scene layer means dividing the main scene layer into a character layer and a background layer, wherein the character layer is fixed at the center of the main scene layer, and the background layer moves as the animation proceeds, thereby producing a visual effect that the character moves forward while always remaining at the center of the screen.

[0097] like Figure 5 As shown, there are multiple background layers, including: background layer 1, background layer 2, background layer 3..., wherein each background layer corresponds to a sub-scene.

[0098] In an optional implementation, the principle of relative motion can be used as a further application of the animation configuration sequence. Specifically, the coordinate position of the target object can be controlled to remain at the set position and move relative to the sub-scene in the following manner:

[0099] During the playback of the target video, the coordinate position of the target object is kept unchanged, and based on the playback progress of the target video, the coordinate position of each sub-scene in the background layer is decreased.

[0100] That is to say, the process of the character moving forward in the embodiment of the present application can also be understood as the process of the scene moving backward, so the implementation can be changed to the character keeping the current position and dragging the scene backward, creating a visual effect of the character moving forward. The continuous increase of the character coordinates is converted into the continuous decrease of the scene coordinates.

[0101] In an optional implementation, the video configuration information includes path configuration information. Therefore, an optional implementation is that the video configuration information can be configured as follows: Figure 6 The flowchart shown implements S24, comprising the following steps:

[0102] S61: determining target paths corresponding to target objects respectively according to the path configuration information in the plurality of video configuration information;

[0103] S62: According to the connection sequence between the multiple sub-scenes, the processing logic related to the corresponding target path in each path configuration information is executed in turn to control the target object to move in the multiple sub-scenes in turn according to the corresponding target path, wherein each time a target path is reached, the target object is controlled to execute a custom behavior associated with a target path during the movement of the target path.

[0104] For example, an animation is correspondingly segmented into 4 sub-scenes, and the connection order between these 4 sub-scenes is: sub-scene A, sub-scene B, sub-scene C, and sub-scene D. Each sub-scene corresponds to 1 video configuration information, and each video configuration information also includes path configuration information. Therefore, when implementing step S24, the target path can be determined in sequence, and then the target object can be controlled to move and perform associated custom behaviors. For example, control the target object to move along the corresponding target path 1 in sub-scene A, and at point a on target path 1, custom behavior 1 can be executed; then, move along the corresponding target path 2 in sub-scene B, and execute custom behavior 2 at point b and custom behavior 3 at point c on target path 2; then, move along the corresponding target path 3 in sub-scene C, and execute custom behavior 4 at point d on target path 3; finally, move along the corresponding target path 4 in sub-scene D, and execute custom behavior 5 at point e on target path 4, as Figure 3 shown.

[0105] In an alternative implementation, the path configuration information further includes at least path-related parameters, an initialization event function, and an end event function. Therefore, step S62 can also be implemented according to the Figure 6 flowchart shown:

[0106] S621: For each obtained path configuration information, execute the processing logic of the initialization event function in one path configuration information;

[0107] S622: Read the path-related parameters of the target path in one path configuration information, so that the target object moves on the target path according to the path-related parameters, and when reaching the end point of the target path, execute the processing logic of the end event function.

[0108] Among them, the path-related parameters mainly refer to the path duration and the path trajectory. The specific initialization event function is an initialization event hook, and the end event function is an end event hook.

[0109] For example, when obtaining the path configuration information corresponding to target path 1, execute the processing logic of the initialization event function therein, and then read the path-related parameters therein, so that the target object moves on target path 1 according to the path-related parameters, and when reaching the end point of the target path, execute the processing logic of the end event function. Then, obtain the next path configuration information and repeat the above process.

[0110] In an alternative implementation, the video configuration information further includes scene configuration information and object configuration information, and the method further includes:

[0111] For each determined target path associated with the target object, according to the scene configuration information in the corresponding video configuration information, initialize the positions and video display effects of various elements in the corresponding sub-scene; and, according to the object configuration information in a video configuration information, initialize the basic state of the target object.

[0112] Among them, the scene configuration information mainly refers to the configuration related to various elements in the sub-scene. For example, in sub-scene 1, the coordinates, sizes, transparencies, stacking relationships of animation elements, and corresponding animation sequences. Among them, the stacking relationship in the scene configuration information refers to the stacking order of elements. The object configuration information mainly refers to the appearance state of the protagonist, the coordinates of the protagonist, the corresponding stacking relationship of the protagonist, etc. Among them, the stacking relationship in the object configuration information refers to whether the protagonist is hidden behind the background or covers the background.

[0113] For example, when obtaining the target path 1 associated with the target object, execute the scene configuration information in the corresponding video configuration information of this path to initialize the positions and video display effects of various elements in sub-scene A, and according to the corresponding object configuration information, initialize the basic state of the target object, and then continuously repeat the above process.

[0114] In the embodiment of the present application, taking an H5 animated mini-game as an example, after the game starts, the animation executor reads the input animation configuration (i.e., the video configuration sequence), initializes the positions of various elements in the scene according to the animation configuration, the animation display effect, etc. Initialize the basic state of the protagonist according to the protagonist character configuration. Then read the path configuration, the executor pointer points to the first sequence, first execute the initialization event hook in the configuration to perform some element operations and special logic for resource loading, then read the path trajectory, and the protagonist character will move according to the path, reach the end of the path, and execute the logic of the end event hook. So far, one path has been completed, and then start the next path and execute similar logic.

[0115] It should be noted that in addition to the H5 animated mini-game scenario listed in the above embodiments, it can also be other animation scenarios, such as Figure 7A and Figure 7B as shown.

[0116] Refer to Figure 7A as shown, which is a schematic diagram of an animation scenario in the embodiment of the present application. In Figure 7A the target object is the Figure 7A character in. The elements in the current scene include a house, clouds, trees, road signs, a road, etc. There are also obstacles set on the road, such as Figure 7A The book shown, the little pig. First, after the animation starts, the animation executor reads the input animation configuration and initializes the positions of various elements in the scene, the animation display effects, etc. According to the protagonist character configuration, the basic state of the protagonist is initialized so that the character is located at Figure 7A the position shown in Figure 7A , that is, the center of one end of the road. Then, the path configuration is read, and the executor pointer points to the first sequence. First, the initialization event hook in the configuration is executed to perform some element operations and the special logic of resource loading. Then, the path trajectory is read, and the protagonist character is controlled to move according to the path, reach the path end point, and execute the logic of the end event hook. Thus, one path is completed. Then, the next path starts and similar logic is executed.

[0117] For example, the next path and the corresponding scene are as shown in Figure 7B Figure 7B , which is another schematic diagram of the animation scene in the embodiment of the present application. The elements in the current scene include grass, street lights, trees, roads, etc. First, according to the animation configuration corresponding to this scene, the positions of various elements in the scene, the animation display effects, etc. are initialized. Furthermore, according to the protagonist character configuration, the basic state of the protagonist is initialized so that the character is located at Figure 7B the position shown in Figure 7B , that is, the left side of one end of the road. Then, the path configuration is read, and the executor pointer points to the second sequence. First, the initialization event hook in the configuration is executed to perform some element operations and the special logic of resource loading. Then, the path trajectory is read, and the protagonist character is controlled to move according to the path, reach the path end point, and execute the logic of the end event hook. Thus, one path is completed. Then, the next path starts and similar logic is executed. The repetitive parts will not be elaborated here.

[0118] In addition, in different target videos, the target object can also be non-human. For example, in a racing game, the target object can also be the car in the racing game, etc. This will not be listed one by one here.

[0119] In the above implementation, by performing scene segmentation, it can effectively ensure that when the scene is too large, the scene loading does not cause lags, and when the scene disappears, the scene can be effectively recycled to keep the page memory stable.

[0120] Refer to Figure 8 Figure 8 , which is a timing diagram of a complete method for video playback control in the embodiment of the present application. The specific implementation process of this method is as follows:

[0121] Step S801: Perform a first layering process on the target video to obtain a widget layer for accessing fixed video widgets and a main scene layer for carrying the main scene;

[0122] Step S802: Perform a second layering process on the main scene layer to obtain an object layer for carrying the target object and a background layer for carrying all sub-scenes;

[0123] Step S803: Obtain the video configuration sequence corresponding to the target video to be played;

[0124] Step S804: Sequentially determine the corresponding target paths of the target object according to each path configuration information in the multiple video configuration information in the video configuration sequence;

[0125] Step S805: For each determined target path associated with the target object, initialize the positions and video display effects of each element in the corresponding sub-scene according to the scene configuration information in the corresponding video configuration information;

[0126] Step S806: Initialize the basic state of the target object according to the object configuration information in the video configuration information;

[0127] Step S807: According to the processing logic related to the corresponding target path in the path configuration information in the video configuration information, control the target object to move along the corresponding target path in the corresponding sub-scene;

[0128] Step S808: Determine whether there is still unprocessed video configuration information. If so, return to Step S804; otherwise, end this process.

[0129] In the embodiments of the present application, an effective solution for scene loading of an H5 mini-game is provided, which can effectively ensure the rapid loading of resources, thereby improving the opening speed of the H5 mini-game. Through the configured animation, the expandability and maintainability of the animation are effectively improved. Through effective scene control, realistic scene movement characteristics are presented, and effective scene resource recycling is carried out.

[0130] Based on the same inventive concept, the embodiments of the present application provide a video playback control device. As Figure 9 shown, it is a schematic structural diagram of the video playback control device 900, which may include:

[0131] An information acquisition unit 901, configured to obtain the video configuration sequence corresponding to the target video to be played, where the video configuration sequence includes multiple video configuration information, and each video configuration information represents: the custom behavior to be completed by the target object in the target video in the corresponding target path;

[0132] A first determination unit 902, configured to determine multiple sub-scenes corresponding to the video configuration sequence, where the multiple sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to one video configuration information;

[0133] A second determination unit 903, configured to determine each target path associated with the target object according to the multiple video configuration information;

[0134] A control unit 904, configured to control a target object to move along corresponding target paths in multiple sub-scenes in sequence according to the connection sequence between the multiple sub-scenes, and perform corresponding custom behaviors.

[0135] In the above embodiment, by switching the scene of the video into several small scenes, corresponding video configuration information is configured for each sub-scene to form a video configuration sequence. During the video playback process, the sub-scenes are loaded segment by segment according to the connection sequence between the multiple sub-scenes, and the target object is controlled segment by segment to move along the corresponding target paths in the multiple sub-scenes respectively, and perform corresponding custom behaviors, which can effectively alleviate the problem of memory resource occupation, effectively avoid video stuttering, and improve the video playback effect.

[0136] Optionally, the apparatus further includes:

[0137] A resource loading unit 905, configured to obtain each critical point reached by the target object during the movement of the target object; the critical points are used to cut the main scene to obtain corresponding sub-scenes;

[0138] Wherein, for each obtained critical point, a first sub-scene and a second sub-scene obtained by cutting based on one critical point are determined, and M sub-scenes after the second sub-scene are loaded, and N sub-scenes before the first sub-scene are destroyed, where M and N are positive integers.

[0139] Optionally, the apparatus further includes:

[0140] A scene segmentation unit 906, configured to perform a first layering process on the target video before the information acquisition unit 901 acquires the video configuration sequence corresponding to the target video to be played, to obtain a widget layer for accessing fixed video widgets and a main scene layer for carrying the main scene. During the playback of the target video, the coordinate position of the widget layer in the playback interface for playing the target video remains fixed;

[0141] Perform a second layering process on the main scene layer to obtain an object layer for carrying the target object and a background layer for carrying all sub-scenes. The coordinate position of the object layer is located at a set position of the main scene layer and remains fixed, and the coordinate position of the background layer changes with the playback progress of the target video, so that during the playback of the target video, the coordinate position of the target object remains at the set position and moves relative to the sub-scenes.

[0142] Optionally, the control unit 904 is further configured to control the coordinate position of the target object to remain at the set position and move relative to the sub-scenes in the following manner:

[0143] During the playback of the target video, keep the coordinate position of the target object unchanged, and based on the playback progress of the target video, perform a decreasing process on the coordinate positions of each sub-scene in the background layer.

[0144] Optionally, the video configuration information includes path configuration information. The control unit 904 is specifically configured to:

[0145] Determine the corresponding target path of the target object respectively according to each path configuration information in multiple video configuration information in sequence; and

[0146] Execute the processing logic related to the corresponding target path in each path configuration information in sequence according to the connection order between multiple sub-scenes, so as to control the target object to move in multiple sub-scenes respectively according to the corresponding target path. Among them, every time a target path is reached, control the target object to execute a custom behavior associated with a target path during the movement on a target path.

[0147] Optionally, the video configuration information further includes scene configuration information and object configuration information. The device further includes:

[0148] A configuration unit 907, configured to, every time a target path associated with the target object is determined, perform an initialization process on the positions of each element and the video display effect in the corresponding sub-scene according to the scene configuration information in the corresponding video configuration information; and,

[0149] Perform an initialization process on the basic state of the target object according to the object configuration information in a video configuration information.

[0150] Optionally, the path configuration information includes path-related parameters, an initialization event function, and an end event function. Then the control unit 904 is specifically configured to:

[0151] Every time a path configuration information is obtained, execute the processing logic of the initialization event function in a path configuration information;

[0152] Read the path-related parameters of the target path in a path configuration information, so that the target object moves on the target path according to the path-related parameters, and when reaching the end point of the target path, execute the processing logic of the end event function.

[0153] For the convenience of description, the above parts are divided into each module (or unit) according to functions and described separately. Of course, when implementing the present application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0154] After introducing the video playback control method and device of the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0155] Those skilled in the art to which the present application pertains will understand that various aspects of the present application can be implemented as a system, method, or program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to herein as "circuitry", "module", or "system".

[0156] Based on the same inventive concept as the above method embodiments, an electronic device is also provided in the embodiments of the present application. In one embodiment, the electronic device can be a server, such as Figure 1 the server 120 shown. In this embodiment, the structure of the electronic device can be as Figure 10 shown, including a memory 1001, a communication module 1003, and one or more processors 1002.

[0157] The memory 1001 is used to store the computer program executed by the processor 1002. The memory 1001 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and programs required to run the instant messaging function, etc.; the data storage area can store various instant messaging information and operation instruction sets, etc.

[0158] The memory 1001 can be a volatile memory, such as RAM (random-access memory); the memory 1001 can also be a non-volatile memory, such as a read-only memory, a flash memory, an HDD (hard disk drive), or an SSD (solid-state drive); or the memory 1001 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1001 can be a combination of the above memories.

[0159] The processor 1002 can include one or more CPUs (central processing units) or be a digital processing unit, etc. The processor 1002 is used to implement the above video playback control method when calling the computer program stored in the memory 1001.

[0160] The communication module 1003 is used to communicate with terminal devices and other servers.

[0161] In the embodiments of the present application, the specific connection medium between the above-mentioned memory 1001, communication module 1003 and processor 1002 is not limited. In the embodiments of the present application Figure 10 it is shown that the memory 1001 and the processor 1002 are connected through a bus 1004. The bus 1004 is represented by a thick line in Figure 10 The connection manners between other components are only for illustrative purposes and are not limiting. The bus 1004 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 10 it is shown by only one thick line in, but it does not mean that there is only one bus or one type of bus.

[0162] The memory 1001 stores a computer storage medium, and the computer storage medium stores computer-executable instructions for implementing the video playback control method of the embodiments of the present application. The processor 1002 is used to execute the above-mentioned video playback control method, such as Figure 2 the steps of the method shown.

[0163] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 the terminal device 110 shown. In this embodiment, the structure of the electronic device may be as shown in Figure 11 and includes components such as a communication component 1110, a memory 1120, a display unit 1130, a camera 1140, a sensor 1150, an audio circuit 1160, a Bluetooth module 1170, and a processor 1180.

[0164] The communication component 1110 is used to communicate with the server. In some embodiments, it may include a circuit WiFi (Wireless Fidelity) module. The WiFi module belongs to short-range wireless transmission technology, and the electronic device can help users send and receive information through the WiFi module.

[0165] The memory 1120 can be used to store software programs and data. The processor 1180 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 1120. The memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. The memory 1120 stores an operating system that enables the terminal device 110 to operate. In the present application, the memory 1120 can store the operating system and various application programs, and can also store the code for executing the video playback control method of the embodiments of the present application.

[0166] The display unit 1130 can also be used to display the information input by the user or the information provided to the user, as well as the GUI (Graphical User Interface) of various menus of the terminal device 110. Specifically, the display unit 1130 may include a display screen 1132 disposed on the front of the terminal device 110. Among them, the display screen 1132 can be configured in the form of a liquid crystal display, a light-emitting diode, etc. The display unit 1130 can be used to display the interface related to the multimedia video playback control in the embodiments of the present application, etc.

[0167] The display unit 1130 can also be used to receive the input digital or character information, and generate a signal input related to the user settings and function control of the terminal device 110. Specifically, the display unit 1130 may include a touch screen 1131 disposed on the front of the terminal device 110, which can collect the touch operations of the user on or near it, such as clicking a button, dragging a scroll box, etc.

[0168] Among them, the touch screen 1131 can cover the display screen 1132, or the touch screen 1131 and the display screen 1132 can be integrated to implement the input and output functions of the terminal device 110. After integration, it can be simply referred to as a touch display screen. In the present application, the display unit 1130 can display the application programs and the corresponding operation steps.

[0169] The camera 1140 can be used to capture static images. The user can upload comments on the images captured by the camera 1140 through a video client. The camera 1140 can be one or multiple. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a CCD (Charge Coupled Device) or a CMOS (Complementary Metal-Oxide-Semiconductor) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 1180 to convert it into a digital image signal.

[0170] The terminal device may further include at least one sensor 1150, such as an acceleration sensor 1151, a distance sensor 1152, a fingerprint sensor 1153, a temperature sensor 1154. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0171] The audio circuit 1160, the speaker 1161, and the microphone 1162 can provide an audio interface between the user and the terminal device 110. The audio circuit 1160 can transmit the electrical signal converted from the received audio data to the speaker 1161, and the speaker 1161 converts it into a sound signal for output. The terminal device 110 can also be configured with volume buttons for adjusting the volume of the sound signal. On the other hand, the microphone 1162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1160 and then converted into audio data. The audio data is then output to the communication component 1110 for sending to, for example, another terminal device 110, or the audio data is output to the memory 1120 for further processing.

[0172] The Bluetooth module 1170 is used to interact with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1170 to perform data interaction.

[0173] The processor 1180 is the control center of the terminal device, connecting various parts of the entire terminal using various interfaces and lines. By running or executing software programs stored in the memory 1120 and calling data stored in the memory 1120, it performs various functions of the terminal device and processes data. In some embodiments, the processor 1180 may include one or more processing units; the processor 1180 can also integrate an application processor and a baseband processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the baseband processor mainly processes wireless communication. It can be understood that the above baseband processor may not be integrated into the processor 1180. In this application, the processor 1180 can run the operating system, application programs, user interface display, and touch response, as well as the video playback control method of the embodiments of this application. In addition, the processor 1180 is coupled to the display unit 1130.

[0174] In some possible implementation manners, various aspects of the video playback control method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps in the video playback control method according to various exemplary embodiments of this application described above in this specification. For example, the computer device can execute the steps as Figure 2 shown.

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

[0176] The program product of the embodiments of the present application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0177] The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal may take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0178] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0179] The program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0180] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described units can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0181] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.

[0182] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.

[0183] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.

[0184] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.< / canvas>

Claims

1. A video playback control method, characterized in that, The method includes: Obtaining a video configuration sequence corresponding to a target video to be played, where the video configuration sequence includes multiple video configuration information, and each video configuration information represents: a custom behavior to be completed by a target object in the target video in a corresponding target path; Determining multiple sub-scenes corresponding to the video configuration sequence, where the multiple sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to one video configuration information; the main scene layer of the target video includes: an object layer for carrying the target object and a background layer for carrying the multiple sub-scenes; the coordinate position of the object layer remains fixed, and the coordinate position of the background layer changes with the playing process of the target video, so that the target object moves relative to the sub-scene; Determining each target path associated with the target object according to the multiple video configuration information; Controlling the target object to move relatively in the multiple sub-scenes in sequence according to the corresponding target paths and execute corresponding custom behaviors in accordance with the connection order between the multiple sub-scenes.

2. The method according to claim 1, wherein The method further includes: During the movement of the target object, obtaining each critical point reached by the target object; the critical point is used to cut the main scene to obtain a corresponding sub-scene; Wherein, for each obtained critical point, determining a first sub-scene and a second sub-scene cut based on the one critical point, loading M sub-scenes after the second sub-scene, and destroying N sub-scenes before the first sub-scene, where M and N are positive integers.

3. The method according to claim 1, wherein Before obtaining the video configuration sequence corresponding to the target video to be played, it further includes: Performing a first layering process on the target video to obtain a widget layer for accessing fixed video widgets and a main scene layer for carrying the main scene, where, during the playing process of the target video, the coordinate position of the widget layer in the playing interface for playing the target video remains fixed; Performing a second layering process on the main scene layer to obtain the object layer and the background layer, where the coordinate position of the object layer is located at a set position of the main scene layer and remains fixed, and the coordinate position of the background layer changes with the playing process of the target video, so that during the playing process of the target video, the coordinate position of the target object remains at the set position and moves relative to the sub-scene.

4. The method according to claim 3, characterized in that Controlling the coordinate position of the target object to remain at the set position and move relative to the sub-scene in the following manner: During the playing process of the target video, keeping the coordinate position of the target object unchanged, and performing a decreasing process on the coordinate positions of each sub-scene in the background layer based on the playing process of the target video.

5. The method according to any one of claims 1 to 4, characterized in that, If the video configuration information includes path configuration information, then the controlling the target object to move relatively in the multiple sub-scenes in sequence according to the corresponding target paths and execute corresponding custom behaviors in accordance with the connection order between the multiple sub-scenes includes: Determine the corresponding target path of the target object respectively according to each path configuration information in the multiple video configuration information in sequence; and According to the connection sequence between the multiple sub-scenes, execute the processing logics related to the corresponding target paths in each path configuration information in sequence, so as to control the target object to perform relative movement in the multiple sub-scenes respectively according to the corresponding target paths. Wherein, every time a target path is reached, control the target object to execute a custom behavior associated with the target path during the movement on the target path.

6. The method according to claim 5, wherein If the video configuration information further includes scene configuration information and object configuration information, the method further includes:[[]] Every time a target path associated with the target object is determined, perform initialization processing on the positions and video display effects of each element in the corresponding sub-scene according to the scene configuration information in the corresponding video configuration information; and Perform initialization processing on the basic state of the target object according to the object configuration information in the video configuration information.

7. The method according to claim 5, wherein If the path configuration information includes path-related parameters, an initialization event function, and an end event function, then the step of executing the processing logics related to the corresponding target paths in each path configuration information in sequence to control the target object to move in the multiple sub-scenes respectively according to the corresponding target paths includes:[[]] Every time a path configuration information is obtained, execute the processing logic of the initialization event function in the path configuration information; Read the path-related parameters of the target path in the path configuration information, so that the target object moves on the target path according to the path-related parameters, and execute the processing logic of the end event function when reaching the end point of the target path.

8. A video playback control device, characterized in that, including:[[]] An information acquisition unit, configured to acquire a video configuration sequence corresponding to a target video to be played, where the video configuration sequence includes multiple video configuration information, and each video configuration information represents: the custom behavior to be completed by the target object in the target video in the corresponding target path; A first determination unit, configured to determine multiple sub-scenes corresponding to the video configuration sequence, where the multiple sub-scenes are obtained by cutting the main scene of the target video, and each sub-scene corresponds to a video configuration information; The main scene layer of the target video includes: an object layer for carrying the target object and a background layer for carrying the multiple sub-scenes; the coordinate position of the object layer remains fixed, and the coordinate position of the background layer changes with the playback process of the target video, so that the target object moves relative to the sub-scene; A second determination unit, configured to determine each target path associated with the target object according to the multiple video configuration information; A control unit, configured to control the target object to perform relative movement in the multiple sub-scenes respectively according to the corresponding target paths in sequence according to the connection sequence between the multiple sub-scenes, and execute the corresponding custom behavior.

9. The device according to claim 8, characterized in that, The device further includes:[[]] A resource loading unit, configured to obtain each critical point reached by the target object during the movement of the target object; the critical point is used to cut the main scene to obtain corresponding sub-scenes; Wherein, for each obtained critical point, a first sub-scene and a second sub-scene cut based on the one critical point are determined, M sub-scenes after the second sub-scene are loaded, and N sub-scenes before the first sub-scene are destroyed, where M and N are positive integers.

10. The device according to claim 8, characterized in that, The device further includes: A scene segmentation unit, configured to perform a first layering process on the target video before the information acquisition unit acquires a video configuration sequence corresponding to the target video to be played, to obtain a widget layer for accessing fixed video widgets and a main scene layer for carrying the main scene. During the playback of the target video, the coordinate position of the widget layer in the playback interface for playing the target video remains fixed; Perform a second layering process on the main scene layer to obtain an object layer and a background layer. The coordinate position of the object layer is located at a set position of the main scene layer and remains fixed, and the coordinate position of the background layer changes with the playback progress of the target video, so that during the playback of the target video, the coordinate position of the target object remains at the set position and moves relative to the sub-scene.

11. The device according to claim 10, characterized in that, The control unit is further configured to control the coordinate position of the target object to remain at the set position and move relative to the sub-scene in the following manner: During the playback of the target video, keep the coordinate position of the target object unchanged, and based on the playback progress of the target video, perform a decreasing process on the coordinate positions of the sub-scenes in the background layer.

12. The device according to any one of claims 8 to 11, characterized in that, The video configuration information includes path configuration information, and the control unit is specifically configured to: Successively determine the corresponding target paths of the target object according to each path configuration information in the multiple video configuration information; and In accordance with the connection sequence between the multiple sub-scenes, successively execute the processing logics related to the corresponding target paths in each path configuration information to control the target object to move relatively in the multiple sub-scenes respectively according to the corresponding target paths. Wherein, upon reaching each target path, control the target object to execute a custom behavior associated with the one target path during the movement on the one target path.

13. The device according to claim 12, characterized in that, The video configuration information further includes scene configuration information and object configuration information, and the device further includes: A configuration unit, configured to, for each determined target path associated with the target object, perform an initialization process on the positions and video display effects of the elements in the corresponding sub-scene according to the scene configuration information in the corresponding one video configuration information; and, Perform an initialization process on the basic state of the target object according to the object configuration information in the one video configuration information.

14. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps of any one of claims 1 to 7.

15. A computer-readable storage medium, characterized in that, It includes program codes, and when the program product runs on an electronic device, the program codes are used to cause the electronic device to execute the steps of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and player for translating static cartoon picture into two dimensional animation

    CN104123742A