Video playback methods, devices and equipment

By adaptively selecting playback units and mode combinations, the problem of unreasonable resource utilization on domestic terminals has been solved, achieving a more efficient video playback effect.

CN119545109BActive Publication Date: 2026-03-10HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

On domestically produced terminals, existing video playback solutions make unreasonable use of resources and fail to fully utilize hardware capabilities, resulting in resource waste and unstable playback.

Method used

By acquiring playback strategy information, the system adaptively selects combinations of playback units and playback modes, including decoding and rendering modes, and optimizes resource allocation to meet video playback requirements.

Benefits of technology

This improved the rationality of resource utilization and the full utilization of terminal hardware capabilities, thereby enhancing the stability and efficiency of video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545109B_ABST
    Figure CN119545109B_ABST
Patent Text Reader

Abstract

This application relates to the field of computer technology and discloses a video playback method, apparatus, and device. The method includes: responding to a received video playback command, acquiring playback strategy information, the playback strategy information indicating a strategy for selecting a playback unit and playback mode from at least one playback unit within the current terminal and at least one preset playback mode for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode; determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information; and playing the target video according to the target playback mode through the target playback unit. This method can improve the rationality of resource utilization and fully utilize the capabilities of domestically produced terminal hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rise of domestically produced terminals in the market, various manufacturers have launched a wide variety of terminal models with diverse hardware and software combinations. When playing videos on these terminals, in order to ensure smooth and efficient playback, it is necessary to adapt and connect them according to different hardware and software interfaces.

[0003] The related multi-window video playback solutions use separate full hardware decoding or full software decoding methods for the multiple videos being played. The use of a single decoding method results in a situation where one terminal resource reaches its limit while other resources are wasted. This leads to unreasonable resource utilization and an inability to fully utilize the capabilities of domestic terminal hardware. Summary of the Invention

[0004] The main purpose of this application is to provide a video playback method, apparatus, and device that can improve the rationality of resource utilization and make full use of the capabilities of domestically produced terminal hardware.

[0005] To achieve the above objectives, this application provides a video playback method, the video playback method comprising:

[0006] In response to a received video playback command, playback strategy information is obtained. The playback strategy information indicates a strategy for selecting a playback unit and a playback mode from at least one playback unit in the current terminal and at least one preset playback mode for each playback unit. Each playback mode includes a combination of a decoding mode and a rendering mode.

[0007] Based on the playback strategy information, the target playback unit and target playback mode of the target video to be played are determined;

[0008] The target video is played through the target playback unit according to the target playback mode.

[0009] Optionally, the playback strategy information includes at least one of the following constraints: playback quantity threshold of playback unit, playback quantity threshold of playback mode, priority of playback unit, priority of playback mode, and resource utilization threshold of playback unit.

[0010] The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes:

[0011] Select a target playback unit from the at least one playback unit that satisfies the constraints in the playback strategy information, and select a target playback mode from at least one playback mode of the target playback unit that satisfies the constraints in the playback strategy information.

[0012] Optionally, the playback strategy information includes the priority order of the at least one playback unit and the priority order of at least one playback mode of each playback unit;

[0013] The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes:

[0014] Based on the priority order of the at least one playback unit, determine the playback unit that currently meets the candidate conditions, and determine the playback unit that first meets the candidate conditions as the target playback unit;

[0015] Based on the priority order of at least one playback mode of the target playback unit, the playback mode that currently meets the candidate conditions is determined, and the playback mode that first meets the candidate conditions is determined as the target playback mode.

[0016] Optionally, determining the playback unit that currently meets the candidate conditions based on the priority order of the at least one playback unit, and determining the playback unit that first meets the candidate conditions as the target playback unit, includes:

[0017] Based on the priority order of the at least one playback unit, the playback unit whose current video playback count has not reached the playback count threshold is identified first as the target playback unit.

[0018] The step of determining the playback mode that currently meets the candidate conditions based on the priority order of at least one playback mode of the target playback unit, and determining the playback mode that first meets the candidate conditions as the target playback mode, includes:

[0019] Based on the priority order of at least one playback mode of the target playback unit, the playback mode that is first determined to have not yet reached the playback number threshold is determined as the target playback mode.

[0020] Optionally, the playback strategy information includes a playback quantity threshold for each playback mode of the at least one playback unit for different video bitstream types, wherein the bitstream of the target video belongs to the target bitstream type;

[0021] The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes:

[0022] Determine the number of videos of the target bitstream type currently being played in each playback mode of the at least one playback unit;

[0023] The playback mode in which the number of videos of the target bitstream type currently being played is less than the corresponding playback number threshold is determined as the target playback mode;

[0024] The playback unit corresponding to the target playback mode is determined as the target playback unit.

[0025] Optionally, the method for determining the playback quantity threshold for each playback mode of the at least one playback unit for different video stream types includes:

[0026] Determine the maximum number of videos that can be played by any playback unit in any playback mode and any video bitrate type, provided that the playback conditions are met. The playback conditions include that the resource utilization rate of the playback unit does not exceed the resource utilization rate threshold and that the video playback quality meets the video quality conditions.

[0027] The maximum number of video playbacks is determined as the playback quantity threshold for the playback mode of the playback unit for the video stream type.

[0028] Optionally, the playback strategy information further includes the priority order of the at least one playback unit and the priority order of at least one playback mode of each playback unit; in the at least one playback mode of the last priority playback unit, the playback number threshold for each video bitstream type of the last priority playback mode is infinite.

[0029] Optionally, the playback strategy information may further include a resource utilization threshold for the at least one playback unit;

[0030] The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes:

[0031] Determine the target resource utilization rate of the at least one playback unit, wherein the target resource utilization rate represents the resource utilization rate when the target video is allocated;

[0032] The playback unit whose target resource utilization rate is not greater than the resource utilization rate threshold is determined as the target playback unit;

[0033] Select the target playback mode from at least one playback mode of the target playback unit.

[0034] Furthermore, to achieve the above objectives, this application also proposes a video playback device, which includes:

[0035] The information acquisition module is used to acquire playback strategy information in response to the received video playback command. The playback strategy information indicates the strategy of selecting a playback unit and a playback mode from at least one playback unit in the current terminal and at least one preset playback mode for each playback unit. Each playback mode includes a combination of decoding mode and rendering mode.

[0036] The mode determination module is used to determine the target playback unit and target playback mode of the target video to be played based on the playback strategy information.

[0037] The video playback module is used to play the target video according to the target playback mode through the target playback unit.

[0038] Optionally, the playback strategy information includes at least one of the following constraints: playback quantity threshold of playback unit, playback quantity threshold of playback mode, priority of playback unit, priority of playback mode, and resource utilization threshold of playback unit.

[0039] The mode determination module is used to select a target playback unit from the at least one playback unit that satisfies the constraints in the playback strategy information, and to select a target playback mode from at least one playback mode of the target playback unit that satisfies the constraints in the playback strategy information.

[0040] Optionally, the playback strategy information includes the priority order of the at least one playback unit and the priority order of at least one playback mode of each playback unit;

[0041] The pattern determination module includes:

[0042] The first determining unit is configured to determine the playback unit that currently meets the candidate conditions based on the priority order of the at least one playback unit, and determine the playback unit that first meets the candidate conditions as the target playback unit.

[0043] The second determining unit is configured to determine the playback mode that currently satisfies the candidate conditions based on the priority order of at least one playback mode of the target playback unit, and determine the playback mode that first satisfies the candidate conditions as the target playback mode.

[0044] Optionally, the first determining unit is configured to determine the playback unit whose current video playback count has not reached the playback count threshold as the target playback unit based on the priority order of the at least one playback unit;

[0045] The second determining unit is used to determine the playback mode whose current video playback count has not reached the playback count threshold as the target playback mode based on the priority order of at least one playback mode of the target playback unit.

[0046] Optionally, the playback strategy information includes a playback quantity threshold for each playback mode of the at least one playback unit for different video bitstream types, wherein the bitstream of the target video belongs to the target bitstream type;

[0047] The mode determination module is used to determine the number of videos of the target bitstream type currently being played in each playback mode of the at least one playback unit; to determine the playback mode in which the number of videos of the target bitstream type currently being played is less than the corresponding playback number threshold as the target playback mode; and to determine the playback unit corresponding to the target playback mode as the target playback unit.

[0048] Optionally, the device further includes:

[0049] A threshold determination module is used to determine the maximum number of video playbacks that can be achieved by any playback unit playing any video stream type in any playback mode, under the condition that the playback conditions are met. The playback conditions include that the resource utilization rate of the playback unit does not exceed the resource utilization rate threshold and the video playback quality meets the video quality conditions. The maximum number of video playbacks is determined as the playback number threshold of the playback mode of the playback unit for the video stream type.

[0050] Optionally, the playback strategy information further includes the priority order of the at least one playback unit and the priority order of at least one playback mode of each playback unit; in the at least one playback mode of the last priority playback unit, the playback number threshold for each video bitstream type of the last priority playback mode is infinite.

[0051] Optionally, the playback strategy information may further include a resource utilization threshold for the at least one playback unit;

[0052] The mode determination module is used to determine the target resource utilization rate of the at least one playback unit, the target resource utilization rate representing the resource utilization rate when the target video is allocated; determine the playback unit whose target resource utilization rate is not greater than the resource utilization rate threshold as the target playback unit; and select the target playback mode from at least one playback mode of the target playback unit.

[0053] In addition, to achieve the above objectives, this application also proposes a video playback device, which includes a memory, a processor, and a video playback program stored in the memory and executable on the processor, the video playback program being configured to implement the video playback method described above.

[0054] In addition, to achieve the above objectives, this application also proposes a storage medium storing a video playback program, which, when executed by a processor, implements the video playback method described above.

[0055] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a video playback program that, when executed by a processor, implements the video playback method described above.

[0056] One or more technical solutions proposed in this application have at least the following technical effects:

[0057] The video playback solution provided in this application offers multiple playback modes for various combinations of playback units on a terminal, based on the combination of decoding and rendering modes of the playback units. In response to a received video playback command, playback strategy information is obtained. Since the playback strategy information indicates the strategy for selecting a playback unit and playback mode from at least one playback unit within the current terminal and at least one preset playback mode for each playback unit, the target playback unit and target playback mode for the target video to be played are determined based on the playback strategy information, achieving adaptive allocation of playback units and playback modes. Playing the target video using adaptively allocated target playback units and target playback modes improves the rationality of resource utilization, thereby fully utilizing the capabilities of domestically produced terminal hardware. Attached Figure Description

[0058] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0059] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0060] Figure 1 This is a schematic diagram illustrating the implementation environment of the video playback method of this application;

[0061] Figure 2 This is a flowchart illustrating the first embodiment of the video playback method of this application;

[0062] Figure 3 This is a schematic diagram illustrating the correspondence between playback mode and playback quantity threshold in one embodiment of the video playback method of this application;

[0063] Figure 4 This is a schematic diagram of the video allocation process in one embodiment of the video playback method of this application;

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

[0065] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the video playback method in the embodiments of this application.

[0066] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0067] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0068] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0069] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application. See also... Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and server 102 are connected via a wireless or wired network. For example, the terminal 101 may be a computer, mobile phone, tablet computer, or other terminal. For example, the server 102 may be a backend server for an application or a cloud server providing services such as cloud computing and cloud storage.

[0070] For example, a video application is installed on terminal 101. This video application may be a video application within the operating system of terminal 101 or a video application provided by a third party. Terminal 101 can use this video application to perform functions such as data transmission and message interaction, thereby enabling video playback.

[0071] In this embodiment, server 102 is used to send a video playback command to terminal 101. Terminal 101 is used to receive the video playback command, and in response to the video playback command, obtain playback strategy information. The playback strategy information indicates a strategy for selecting a playback unit and playback mode from at least one playback unit within the current terminal and at least one preset playback mode for each playback unit, wherein each playback mode includes a combination of decoding mode and rendering mode. Then, based on the playback strategy information, terminal 101 determines the target playback unit and target playback mode of the target video to be played; and plays the target video according to the target playback mode through the target playback unit.

[0072] The video playback method provided in this application can be applied to any video playback scenario. For example, it can be used to play multiple surveillance video feeds, or to play multiple video feeds during a multi-party video call, or to play multiple different movie clips while watching a movie. This application does not impose any limitations on these applications.

[0073] Figure 2 This is a flowchart illustrating the first embodiment of the video playback method of this application. (Refer to...) Figure 2 Taking the terminal as the executing entity as an example, the video playback method provided in this application embodiment includes:

[0074] Step S10: In response to the received video playback command, obtain playback strategy information. The playback strategy information indicates the strategy of selecting a playback unit and a playback mode from at least one playback unit in the current terminal and at least one preset playback mode of each playback unit. Each playback mode includes a combination of decoding mode and rendering mode.

[0075] The video playback command is a command issued by the user or server, instructing the terminal to play specified video content. For example, the terminal generates the video playback command based on user interface clicks, voice commands, or other forms of input. Alternatively, the terminal receives a video playback command from a server. Optionally, the video playback command carries the target video to be played. Optionally, the video playback command also carries other information related to the target video, such as the video bitrate type and file size.

[0076] The current terminal is configured with at least one playback unit, and each playback unit has at least one preset playback mode. Playback strategy information defines the configuration method of playback units and playback modes in the terminal, as well as information on how to select playback units and playback modes. For example, playback strategy information includes various selection logics and conditions to determine which playback unit and playback mode to use in a specific situation. Optionally, playback strategy information is stored in the terminal or in the terminal's video application. Accordingly, the terminal can obtain playback strategy information from its local storage or the video application.

[0077] A playback unit is a module or component within a terminal responsible for video playback. Exemplary examples include a CPU (Central Processing Unit), a graphics card, and a GPU (Graphics Processing Unit), but this application does not limit the specific components. A playback mode is a specific configuration adopted by the playback unit when performing video playback tasks. Each playback mode includes a combination of decoding and rendering modes to adapt to different playback environments and requirements.

[0078] Decoding is the process of restoring compressed video data into original image frames. Decoding mode refers to the method of video decoding. Decoding modes include hardware decoding and software decoding. Hardware decoding utilizes dedicated hardware, such as a GPU, for decoding, offering higher decoding speeds and lower power consumption. Software decoding uses the CPU for decoding and is suitable for devices without dedicated hardware decoders.

[0079] Rendering is the process of outputting decoded image frames to the screen. Rendering mode refers to how image frames are displayed on the screen. Rendering modes include hardware rendering and software rendering. Hardware rendering refers to using dedicated hardware, such as the GPU, to process images. Software rendering refers to using the CPU to process images. Software rendering does not rely on dedicated hardware and is implemented entirely by software algorithms.

[0080] The playback mode includes a combination of decoding and rendering modes, meaning that multiple playback modes are achieved by combining decoding and rendering modes. Optionally, the combination of decoding and rendering modes in this application includes at least two of the following: hardware decoding and hardware rendering; hardware decoding and software rendering; software decoding and hardware rendering; and software decoding and software rendering. By combining decoding and rendering modes to achieve these different playback modes, it is possible to adapt to different device performance and playback requirements.

[0081] Optionally, the playback strategy information includes at least one playback unit corresponding to various terminal models and at least one playback mode corresponding to each playback unit. Accordingly, based on the playback strategy information, the terminal determines the target playback unit and target playback mode for the target video to be played, including: the terminal queries the playback strategy information for at least one playback unit corresponding to the current terminal model and at least one playback mode corresponding to each playback unit; and determines the target playback unit and target playback mode for the target video to be played from the at least one playback unit corresponding to the current terminal model and at least one playback mode corresponding to each playback unit. This scheme, by selecting a suitable playback unit and playback mode based on the current terminal model, ensures that the selected playback mode matches the terminal's hardware and software environment, thereby improving the compatibility and stability of video playback. Furthermore, it maximizes the utilization of the terminal's hardware resources, improving video playback performance.

[0082] Step S20: Based on the playback strategy information, determine the target playback unit and target playback mode of the target video to be played.

[0083] For example, the terminal determines the target playback unit and target playback mode of the target video to be played based on playback strategy information, including: the terminal randomly selects a target playback unit from at least one playback unit and randomly selects a target playback mode from at least one playback mode of the target playback unit. This method can achieve adaptive allocation of playback units and playback modes simply and efficiently.

[0084] For example, the playback strategy information includes at least one playback unit matching different video stream types, and at least one playback mode matching different video stream types. Accordingly, based on the stream type of the target video to be played, the terminal selects a playback unit matching the stream type of the target video from at least one playback unit within the current terminal as the target playback unit, and selects a playback mode matching the stream type of the target video from at least one playback mode of the target playback unit as the target playback mode. This approach ensures the compatibility of the determined target playback unit and target playback mode with the target video to be played, improving the video playback effect.

[0085] Optionally, the playback strategy information includes at least one of the following constraints: a playback unit's playback count threshold, a playback mode's playback count threshold, a playback unit's priority, a playback mode's priority, and a playback unit's resource utilization threshold. The playback unit's playback count threshold is the maximum number of videos that the playback unit can play. The playback mode's playback count threshold refers to the maximum number of videos that can be played under that playback mode. The playback unit's priority determines which playback unit is prioritized when multiple playback units exist. The playback mode's priority determines which playback mode is prioritized when multiple playback modes exist. The playback unit's resource utilization threshold refers to the maximum preset resource utilization rate of the playback unit.

[0086] Accordingly, based on the playback strategy information, the terminal determines the target playback unit and target playback mode of the target video to be played, including: selecting a target playback unit that meets the constraints in the playback strategy information from at least one playback unit, and selecting a target playback mode that meets the constraints in the playback strategy information from at least one playback mode of the target playback unit.

[0087] For example, the playback strategy information includes the priority of the playback unit and the priority of the playback mode. Accordingly, the terminal selects the playback unit with the highest priority from at least one playback unit as the target playback unit. It then selects the playback mode with the highest priority from at least one playback mode of the target playback unit as the target playback mode.

[0088] For example, the playback strategy information includes a playback count threshold for the playback unit and a playback count threshold for the playback mode. Accordingly, the terminal selects a playback unit from at least one playback unit whose current video playback count is less than the corresponding playback count threshold as the target playback unit. It then selects a playback mode from at least one playback mode of the target playback unit whose current video playback count is less than the corresponding playback count threshold as the target playback mode.

[0089] For example, the playback strategy information includes a playback count threshold, a resource utilization threshold, and a playback mode priority for each playback unit. Accordingly, the terminal selects a playback unit from at least one playback unit whose current video playback count is less than the corresponding playback count threshold and whose target resource utilization is less than the resource utilization threshold as the target playback unit. From at least one playback mode of the target playback unit, the playback mode with the highest priority is selected as the target playback mode.

[0090] The playback strategy information in this embodiment includes at least one constraint condition for filtering target playback units and target playback modes that meet the conditions. By selecting target playback units that meet the constraints in the playback strategy information from at least one playback unit, and selecting target playback modes that meet the constraints in the playback strategy information from at least one playback mode of the target playback unit, it is possible to quickly filter out playback units and playback modes that meet the conditions, reducing unnecessary search time. Furthermore, through flexible condition settings, the video playback method can adapt to various terminal hardware and software environments, greatly enhancing the adaptability of the video playback method on various domestic terminals.

[0091] Step S30: Play the target video according to the target playback mode through the target playback unit.

[0092] Optionally, this step can be implemented as follows: the terminal decodes the target video according to the decoding mode in the target playback mode through the target playback unit, renders the target video according to the rendering mode in the target playback mode, and then plays the target video on the display.

[0093] The video playback solution provided in this application offers multiple playback modes for various combinations of playback units on a terminal, based on the combination of decoding and rendering modes of the playback units. In response to a received video playback command, playback strategy information is obtained. Since the playback strategy information indicates the strategy for selecting a playback unit and playback mode from at least one playback unit within the current terminal and at least one preset playback mode for each playback unit, the target playback unit and target playback mode for the target video to be played are determined based on the playback strategy information, achieving adaptive allocation of playback units and playback modes. Playing the target video using adaptively allocated target playback units and target playback modes improves the rationality of resource utilization, thereby fully utilizing the capabilities of domestically produced terminal hardware.

[0094] In some embodiments, the playback strategy information includes the priority order of at least one playback unit and the priority order of at least one playback mode of each playback unit. Accordingly, the terminal determines the target playback unit and target playback mode of the target video to be played based on the playback strategy information, including: the terminal determines the playback unit that currently meets the candidate conditions based on the priority order of at least one playback unit, and determines the playback unit that first meets the candidate conditions as the target playback unit; the terminal determines the playback mode that currently meets the candidate conditions based on the priority order of at least one playback mode of the target playback unit, and determines the playback mode that first meets the candidate conditions as the target playback mode.

[0095] Optionally, the video playback parameters of higher-priority playback units are superior to those of lower-priority playback units. These video playback parameters measure the video playback quality and / or resource usage of a playback unit. Better video playback parameters result in better video playback quality and / or lower resource usage for that playback unit. For example, video playback parameters indicate at least one of the following: decoding speed, rendering speed, rendering effect, playback smoothness, playback stuttering, and resource usage of the playback unit. Optionally, the video playback parameters of higher-priority playback modes are superior to those of lower-priority playback modes. These video playback parameters measure the video playback quality and resource usage corresponding to a playback mode. Better video playback parameters result in better video playback quality and / or lower resource usage for that playback mode.

[0096] The selection criteria are the standards or conditions that determine whether a playback unit or playback mode can be selected. This application evaluates each playback unit sequentially according to priority to determine if it meets the selection criteria. Once a playback unit that meets the selection criteria is identified, it is designated as the target playback unit, and playback units with lower priority are no longer evaluated. After determining the target playback unit, for at least one playback mode of that target playback unit, each playback mode is evaluated sequentially according to priority to determine if it meets the selection criteria. Once a playback mode that meets the selection criteria is identified, it is designated as the target playback mode, and playback modes with lower priority are no longer evaluated.

[0097] In this embodiment, a priority order is set for playback units and playback modes. Target playback units and modes that meet the candidate conditions are determined according to this priority order. This allows for the automatic adjustment of the playback units and modes assigned to the video to be played based on priority and candidate conditions, thereby maximizing the utilization of limited terminal resources and improving playback efficiency. Furthermore, since higher-priority playback units and modes have better video playback parameters, they are selected first according to the priority order, ensuring the video playback effect when playing the target video based on the selected target playback units and modes.

[0098] Optionally, the alternative condition includes the current video playback count not reaching a playback count threshold. This playback count threshold is also included in the playback strategy information. Accordingly, based on the priority order of at least one playback unit, the terminal determines the playback unit whose current video playback count has not reached the playback count threshold first as the target playback unit. Based on the priority order of at least one playback mode of the target playback unit, the terminal determines the playback mode whose current video playback count has not reached the playback count threshold first as the target playback mode. This scheme can balance resource allocation; that is, when the video playback count of a high-priority playback unit reaches the threshold, the terminal will automatically select other low-priority playback units, and when the video playback count of a high-priority playback mode reaches the threshold, the terminal will automatically select other low-priority playback modes. This can avoid assigning too many tasks to a certain playback unit or playback mode, thereby reducing the occurrence of video playback failures.

[0099] Optionally, the alternative condition includes the target resource utilization rate not reaching a resource utilization rate threshold. This resource utilization rate threshold is also included in the playback strategy information. The target resource utilization rate represents the resource utilization rate when the target video is allocated. Accordingly, based on the priority order of at least one playback unit, the terminal determines the playback unit whose target resource utilization rate has not reached the resource utilization rate threshold first as the target playback unit. Based on the priority order of at least one playback mode of the target playback unit, the terminal selects the highest priority playback mode from at least one playback mode of the target playback unit as the target playback mode. This scheme can balance resource allocation; that is, when the target resource utilization rate of a high-priority playback unit reaches the threshold, the terminal will automatically select other low-priority playback units, thus avoiding the allocation of too many tasks to a certain playback unit and reducing the occurrence of video playback failures. This mechanism helps to allocate playback resources more rationally and improve the utilization rate of the terminal's hardware resources.

[0100] Optionally, the alternative conditions include that the current video playback count has not reached a playback count threshold, and the target resource utilization rate has not reached a resource utilization rate threshold. Accordingly, based on the priority order of at least one playback unit, the terminal determines the playback unit whose current video playback count has not reached the playback count threshold and whose target resource utilization rate has not reached the resource utilization rate threshold as the target playback unit. Then, based on the priority order of at least one playback mode of the target playback unit, the terminal determines the playback mode whose current video playback count has not reached the playback count threshold as the target playback mode. This scheme, based on the priority of playback units and playback modes, combined with playback count thresholds and resource utilization rate thresholds to determine the target playback unit and target playback mode, can further prevent overload of a certain playback unit or playback mode, and helps maintain the stability and reliability of terminal video playback.

[0101] Optionally, the alternative conditions include the current video playback quality meeting video quality conditions. These video quality conditions are also included in the playback strategy information. For example, video quality conditions include at least one of the following: video decoding speed standards, rendering speed standards, playback smoothness standards, and image clarity standards. Accordingly, based on the priority order of at least one playback unit, the terminal determines the playback unit whose current video playback quality meets the video quality conditions first as the target playback unit. Based on the priority order of at least one playback mode of the target playback unit, the terminal determines the playback mode whose current video playback quality meets the video quality conditions first as the target playback mode. This application prioritizes playback units and playback modes with higher priority and whose video playback quality meets the quality conditions. When the current video playback quality of a higher priority playback unit or playback mode does not meet the quality conditions, it can automatically select and adjust the playback unit and playback mode to ensure that the user can always watch high-quality video content, which helps improve the user's viewing experience.

[0102] In some embodiments, the playback strategy information includes playback quantity thresholds for each playback mode of at least one playback unit for different video stream types. The target video stream belongs to a target stream type. Accordingly, based on the playback strategy information, the terminal determines the target playback unit and target playback mode of the target video to be played, including: the terminal determining the number of videos of the target stream type currently played in each playback mode of at least one playback unit; determining playback modes where the number of videos of the target stream type currently played is less than the corresponding playback quantity threshold as target playback modes; and determining the playback unit corresponding to the target playback mode as the target playback unit.

[0103] For example, the video bitstream information is carried in the video playback instructions. This bitstream information includes video resolution, video bitrate, video frame rate, video encoding format, and other information. The video bitstream information determines the type of video bitstream. Different types of bitstreams require different playback environments and resources; therefore, different playback units or playback modes have different playback capabilities for different bitstream types. Therefore, this application sets at least one playback unit's playback strategy information with a playback quantity threshold for each playback mode for different video bitstream types. For videos of different bitstream types, the corresponding playback quantity threshold is used to limit the video playback volume of each playback mode. This allows for more precise control and adjustment of the load on each playback mode, helping to allocate playback resources more rationally and improve the utilization rate of the terminal's hardware resources.

[0104] For example, if there are multiple playback modes where the number of videos of the target bitstream type being played is less than the corresponding playback count threshold, the playback mode with the highest priority is selected as the target playback mode. Alternatively, a playback mode can be randomly selected as the target playback mode. Or, the target resource utilization rate of the playback units corresponding to each of these multiple playback modes is determined, and the playback mode corresponding to the playback unit with a target resource utilization rate less than the resource utilization rate threshold is determined as the target playback mode. Alternatively, the priority of the playback units corresponding to each of these multiple playback modes is determined, and the playback mode corresponding to the playback unit with the highest priority is determined as the target playback mode.

[0105] Optionally, the playback strategy information also includes the priority order of at least one playback unit and the priority order of at least one playback mode within each playback unit; in the at least one playback mode of the last priority playback unit, the playback count threshold for each video bitstream type is infinite. Thus, when the playback count of the target bitstream type in the highest priority playback mode of a higher priority playback unit reaches the playback count threshold, subsequently added videos of the target bitstream type can be played using the lowest priority playback mode in the last priority playback unit.

[0106] Figure 3 This diagram illustrates the correspondence between playback modes and playback quantity thresholds in the terminal. (Reference) Figure 3 In this diagram, Terminal A is the terminal model, Video Stream Type A is the video stream type of the video to be played, and Playback Unit A and Playback Unit B are playback units within Terminal A. Playback Unit A has one playback mode, namely Playback Mode A. The maximum number of videos of Video Stream Type A that Playback Unit A can play in Playback Mode A is defined as the playback count threshold A. Playback Unit B has two playback modes, namely Playback Mode B and Playback Mode C. The maximum number of videos of Video Stream Type A that Playback Unit B can play in Playback Mode B is defined as the playback count threshold B, and the maximum number of videos of Video Stream Type A that Playback Unit B can play in Playback Mode C is also defined as the playback count threshold C. Furthermore, in this correspondence, Playback Unit A is located above Playback Unit B, indicating that Playback Unit A has a higher priority for playing videos than Playback Unit B. Playback Mode B is located above Playback Mode C, indicating that Playback Mode B has a higher priority for playing videos than Playback Mode C.

[0107] Optionally, the method for determining the playback quantity threshold for each playback mode of at least one playback unit for different video stream types includes: the terminal determining the maximum number of video playbacks that can be achieved when any playback unit plays a video of any video stream type in any playback mode, under certain playback conditions; and determining the maximum number of video playbacks as the playback quantity threshold for that playback mode of the playback unit for that video stream type. Playback conditions include that the resource utilization rate of the playback unit does not exceed a resource utilization rate threshold, and that the video playback quality meets video quality conditions. For example, video quality conditions include at least one of the following: video decoding speed standards, rendering speed standards, playback smoothness standards, and image clarity standards.

[0108] In the playback conditions, ensuring the video playback quality of a playback unit meets the specified conditions guarantees the playback quality of all videos within that unit. Furthermore, ensuring the resource utilization rate of the playback unit does not exceed a certain threshold not only prevents overloading of the unit and maintains the playback quality of all videos within that unit, but also prevents the unit from consuming excessive hardware resources and negatively impacting the playback quality of other playback units. Therefore, the terminal determines the maximum number of videos that can be played by any playback unit under any playback mode and any video stream type, provided the playback conditions are met. This maximum number of videos played is defined as the playback quantity threshold for that playback unit's playback mode for that video stream type. Based on this threshold, adaptive allocation of various playback modes is implemented, balancing resource allocation and maximizing the utilization of terminal hardware resources.

[0109] In some embodiments, the playback strategy information further includes a resource utilization threshold for at least one playback unit. Accordingly, based on the playback strategy information, the terminal determines the target playback unit and target playback mode of the target video to be played, including: the terminal determining a target resource utilization rate for at least one playback unit, where the target resource utilization rate represents the resource utilization rate when the target video is allocated; determining playback units with a target resource utilization rate not greater than the resource utilization threshold as target playback units; and selecting a target playback mode from at least one playback mode of the target playback unit. This scheme can precisely control the resource utilization rate of playback units, avoiding excessive resource consumption, and ensuring that playback units can maintain video playback quality without affecting the video playback quality of other playback units, thus guaranteeing the overall multi-video playback effect of the terminal.

[0110] Resource utilization rate refers to the utilization rate of hardware resources in the terminal by the playback unit. This includes, for example, the utilization rate of CPU, graphics card, memory, and network resources. The resource utilization rate threshold is the maximum resource utilization rate set for a playback unit. Different resource utilization rate thresholds can be set for different resources. Furthermore, the setting of the resource utilization rate threshold is combined with the video playback effect of the playback unit. For example, the resource utilization rate threshold set for each playback unit can ensure that the video playback quality of that playback unit meets the video quality requirements as long as its resource utilization rate does not exceed the threshold, without affecting the video playback quality of other playback units.

[0111] The target resource utilization rate refers to the resource utilization rate of the target playback unit when the target video to be played is allocated to the target playback unit. Since the target video to be played has not yet been allocated to the target playback unit for processing, this target resource utilization rate is actually an estimated resource utilization rate.

[0112] Optionally, the terminal determines the target resource utilization rate of at least one playback unit, including: the terminal acquiring a first resource utilization rate and a second resource utilization rate of each playback unit, and determining the sum of the first resource utilization rate and the second resource utilization rate as the target resource utilization rate. Wherein, the first resource utilization rate is the current resource utilization rate of the playback unit, and the second resource utilization rate is the resource utilization rate required for the playback unit to play the target video.

[0113] For example, the resource utilization rate required to play the target video is determined based on the video stream type of the target video, i.e., the second resource utilization rate. For instance, the resource utilization rate required for the playback unit to play any video of the target stream type is determined as the resource utilization rate required for the playback unit to play the target video, where the target video's stream belongs to the target stream type. The resource utilization rate required for the playback unit to play a video of the target stream type can be stored in the terminal for later retrieval.

[0114] In this embodiment, since the first resource utilization rate is the current resource utilization rate of the playback unit, and the second resource utilization rate is the resource utilization rate required by the playback unit to play the target video to be played, the sum of the first and second resource utilization rates can accurately represent the resource utilization rate of the playback unit when the video to be played is allocated to the playback unit. This ensures the video playback effect of the target playback unit determined subsequently based on this resource utilization rate.

[0115] It should be noted that, in other embodiments, the first resource utilization rate and the second resource utilization rate can also be weighted and summed to obtain the target resource utilization rate. The weights of the first resource utilization rate and the second resource utilization rate can be set as needed.

[0116] Optionally, the terminal obtains a second resource utilization rate for the playback unit, including: the terminal obtains a resource utilization rate threshold and a playback quantity threshold for the playback unit; and determines the ratio of the resource utilization rate threshold to the playback quantity threshold as the second resource utilization rate. Since the resource utilization rate threshold is the maximum resource utilization rate set for the playback unit, and the playback quantity threshold is the maximum number of videos that the playback unit can play, the ratio of the resource utilization rate threshold to the playback quantity threshold can accurately represent the resource utilization rate allocated to each video. Determining this resource utilization rate as the second resource utilization rate to represent the resource utilization rate required for the playback unit to play the target video is highly accurate and can ensure the video playback effect of the target playback unit determined based on this second resource utilization rate.

[0117] Optionally, the resources required for the playback unit to play videos can be of various types, such as CPU resources, graphics card resources, memory resources, and network resources. Considering that the playback unit uses various types of resources to play videos, and that the resource utilization rate of each type can affect the video playback effect, the terminal obtains the target resource utilization rate for each type of resource. Playback units whose target resource utilization rate for each type is no greater than the corresponding resource utilization rate threshold are identified as target playback units. This better ensures the video playback effect of the target playback units.

[0118] It should be noted that, in addition to the resource utilization threshold, the terminal can also determine the target playback unit by combining it with the video playback count threshold, or by combining it with the playback unit's priority. Furthermore, the terminal combines the playback unit's priority, playback count threshold, and resource utilization threshold to determine the target playback unit. Additionally, when selecting a target playback mode from at least one playback mode of the target playback unit, the target playback mode can be determined by combining the playback count threshold and the playback mode's priority. For specific combinations, please refer to the above embodiments; they will not be repeated here.

[0119] Figure 4 This is a schematic diagram of a video allocation process. (Reference) Figure 4After receiving a video playback command, the terminal reads the video stream type and then sequentially judges the playback units according to their priority to determine the target playback unit. First, it determines the number of video playbacks in the current playback unit, then determines the relationship between the current playback number and a playback number threshold. When the number of video playbacks reaches the playback number threshold (i.e., the number of video playbacks is greater than or equal to the threshold), it determines the next playback unit. When the number of video playbacks is less than the playback number threshold, it determines the relationship between the target resource utilization rate of the current playback unit and a resource utilization rate threshold. If the target resource utilization rate is greater than the resource utilization rate threshold, it determines the next playback unit. If the target resource utilization rate is not greater than the resource utilization rate threshold, the video is played through the current playback unit.

[0120] It's important to note that the market offers a wide variety of terminal models from different manufacturers, with diverse hardware and software combinations. Video playback requires adaptation and connection based on different hardware and software interfaces. Current technical solutions often employ separate hardware or software decoding methods for multiple windows, resulting in a single decoding method. This leads to situations where one resource reaches its limit while others are wasted, failing to maximize the utilization of the terminal hardware's capabilities. Furthermore, due to an immature hardware ecosystem, resource utilization statistics are inaccurate, causing decoding resources to be allocated excessive playback tasks, resulting in video playback stuttering or black screens, poor video playback quality, and failure to meet user needs.

[0121] The video playback method proposed in this application effectively improves resource utilization and playback quality on the terminal when playing multi-window videos, thereby meeting customer needs. Firstly, the video playback method in this application can adapt to various combinations of playback units on the terminal, and adaptively allocates multiple playback modes based on the decoding and rendering modes of the playback units. By scheduling decoding and rendering methods, determining priorities, and dynamically adjusting resources for each video window, the optimal decoding and rendering methods for each video window on a specific device model are achieved, greatly enhancing the adaptability of video applications on various terminals. Furthermore, by combining playback quantity thresholds with dynamic resource utilization, the playback unit and playback mode of newly added video windows are comprehensively determined, effectively avoiding playback problems such as decoding stuttering and image distortion caused by excessive resource allocation. Under the same terminal hardware resources, the video playback method in this application provides smoother decoding and does not affect other applications on the terminal, fundamentally reducing terminal configuration costs.

[0122] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the video playback method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0123] This application also provides a video playback device, please refer to... Figure 5 The video playback device includes:

[0124] Information acquisition module 10 is used to acquire playback strategy information in response to the received video playback command. The playback strategy information indicates the strategy of selecting a playback unit and a playback mode from at least one playback unit in the current terminal and at least one preset playback mode for each playback unit. Each playback mode includes a combination of decoding mode and rendering mode.

[0125] The mode determination module 20 is used to determine the target playback unit and target playback mode of the target video to be played based on the playback strategy information.

[0126] The video playback module 30 is used to play the target video according to the target playback mode through the target playback unit.

[0127] Optionally, the playback strategy information includes at least one of the following restrictions: playback quantity threshold of playback unit, playback quantity threshold of playback mode, priority of playback unit, priority of playback mode, and resource utilization threshold of playback unit.

[0128] The mode determination module 20 is used to select a target playback unit that meets the constraints in the playback strategy information from at least one playback unit, and to select a target playback mode that meets the constraints in the playback strategy information from at least one playback mode of the target playback unit.

[0129] Optionally, the playback strategy information includes the priority order of at least one playback unit and the priority order of at least one playback mode for each playback unit;

[0130] Pattern determination module 20 includes:

[0131] The first determining unit is used to determine the playback unit that currently meets the candidate conditions based on the priority order of at least one playback unit, and to determine the playback unit that first meets the candidate conditions as the target playback unit.

[0132] The second determining unit is used to determine the playback mode that currently meets the candidate conditions based on the priority order of at least one playback mode of the target playback unit, and to determine the playback mode that first meets the candidate conditions as the target playback mode.

[0133] Optionally, the first determining unit is used to determine the playback unit whose current video playback count has not reached the playback count threshold as the target playback unit based on the priority order of at least one playback unit;

[0134] The second determining unit is used to determine the playback mode that has not yet reached the playback number threshold as the target playback mode based on the priority order of at least one playback mode of the target playback unit.

[0135] Optionally, the playback strategy information includes a playback quantity threshold for each playback mode of at least one playback unit for different video bitstream types, and the bitstream of the target video belongs to the target bitstream type.

[0136] The mode determination module 20 is used to determine the number of videos of the target bitstream type currently being played in each playback mode of at least one playback unit; to determine the playback mode in which the number of videos of the target bitstream type currently being played is less than the corresponding playback number threshold as the target playback mode; and to determine the playback unit corresponding to the target playback mode as the target playback unit.

[0137] Optionally, the device further includes:

[0138] The threshold determination module is used to determine the maximum number of video playbacks that any playback unit can achieve when playing any video stream type in any playback mode, under the condition that the playback conditions are met. The playback conditions include that the resource utilization rate of the playback unit does not exceed the resource utilization rate threshold and the video playback quality meets the video quality conditions. The maximum number of video playbacks is determined as the playback number threshold of the playback mode of the playback unit for the video stream type.

[0139] Optionally, the playback strategy information also includes the priority order of at least one playback unit and the priority order of at least one playback mode for each playback unit; in the at least one playback mode of the last priority playback unit, the playback number threshold for the last priority playback mode for each video bitstream type is infinite.

[0140] Optionally, the playback strategy information also includes a resource utilization threshold for at least one playback unit;

[0141] The mode determination module 20 is used to determine the target resource utilization rate of at least one playback unit, where the target resource utilization rate represents the resource utilization rate when the target video is allocated; determine the playback unit whose target resource utilization rate is not greater than the resource utilization rate threshold as the target playback unit; and select the target playback mode from at least one playback mode of the target playback unit.

[0142] The video playback device provided in this application, employing the video playback method described in the above embodiments, can solve the technical problem of unreasonable resource utilization and inability to fully utilize the capabilities of domestically produced terminal hardware in related multi-window video playback schemes. Compared with related technologies, the beneficial effects of the video playback device provided in this application are the same as those of the video playback method provided in the above embodiments, and other technical features in the video playback device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0143] This application provides a video playback device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the video playback method in Embodiment 1 above.

[0144] The following is for reference. Figure 6 The diagram illustrates a structural schematic of a video playback device suitable for implementing embodiments of this application. The video playback device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The video playback device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0145] like Figure 6As shown, the video playback device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the video playback device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the video playback device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows video playback devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.

[0146] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0147] The video playback device provided in this application, employing the video playback method described in the above embodiments, can solve the technical problem of unreasonable resource utilization and inability to fully utilize the capabilities of domestically produced terminal hardware in related multi-window video playback schemes. Compared with related technologies, the beneficial effects of the video playback device provided in this application are the same as those of the video playback method provided in the above embodiments, and other technical features of this video playback device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0148] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0150] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the video playback method described in the above embodiments.

[0151] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0152] The aforementioned computer-readable storage medium may be included in a video playback device; or it may exist independently and not be assembled into a video playback device.

[0153] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a video playback device, cause the video playback device to: respond to a received video playback instruction, acquire playback strategy information, the playback strategy information indicating a strategy for selecting a playback unit and a playback mode from at least one playback unit within the current terminal and at least one preset playback mode for each playback unit, wherein each playback mode includes a combination of a decoding mode and a rendering mode; determine the target playback unit and the target playback mode of the target video to be played based on the playback strategy information; and play the target video according to the target playback mode through the target playback unit.

[0154] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0156] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0157] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described video playback method. This solves the technical problem of unreasonable resource utilization and the inability to fully utilize the capabilities of domestically produced terminal hardware in related multi-window video playback schemes. Compared with related technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the video playback method provided in the above embodiments, and will not be elaborated upon here.

[0158] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the video playback method described above.

[0159] The computer program product provided in this application can solve the technical problem of unreasonable resource utilization and inability to fully utilize the capabilities of domestically produced terminal hardware in related multi-window video playback solutions. Compared with related technologies, the beneficial effects of the computer program product provided in this application are the same as those of the video playback method provided in the above embodiments, and will not be repeated here.

[0160] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A video playing method, characterized in that, The video playback method includes: In response to a received video playback command, playback strategy information is obtained. The playback strategy information indicates a strategy for selecting a playback unit and a playback mode from at least one playback unit in the current terminal and at least one preset playback mode for each playback unit. Each playback mode includes a combination of a decoding mode and a rendering mode. Based on the playback strategy information, the target playback unit and target playback mode of the target video to be played are determined; The target video is played according to the target playback mode through the target playback unit. The playback strategy information includes at least one of the following constraints: playback quantity threshold of playback unit, playback quantity threshold of playback mode, priority of playback unit, priority of playback mode, and resource utilization threshold of playback unit. The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes: selecting a target playback unit that meets the constraints in the playback strategy information from the at least one playback unit, and selecting a target playback mode that meets the constraints in the playback strategy information from at least one playback mode of the target playback unit. Alternatively, the playback strategy information may include the priority order of the at least one playback unit and the priority order of at least one playback mode for each playback unit; The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes: determining the playback unit that currently meets the candidate conditions based on the priority order of the at least one playback unit, and determining the playback unit that first meets the candidate conditions as the target playback unit; determining the playback mode that currently meets the candidate conditions based on the priority order of at least one playback mode of the target playback unit, and determining the playback mode that first meets the candidate conditions as the target playback mode. Alternatively, the playback strategy information may include a playback quantity threshold for each playback mode of the at least one playback unit for different video bitstream types, wherein the bitstream of the target video belongs to the target bitstream type. The step of determining the target playback unit and target playback mode of the target video to be played based on the playback strategy information includes: determining the number of videos of the target bitstream type currently played in each playback mode of the at least one playback unit; determining the playback mode in which the number of videos of the target bitstream type currently played is less than the corresponding playback number threshold as the target playback mode; and determining the playback unit corresponding to the target playback mode as the target playback unit.

2. The video playback method of claim 1, wherein, The step of determining the playback unit that currently meets the candidate conditions based on the priority order of the at least one playback unit, and determining the playback unit that first meets the candidate conditions as the target playback unit, includes: Based on the priority order of the at least one playback unit, the playback unit whose current video playback count has not reached the playback count threshold is identified first as the target playback unit. The priority order of the at least one playing mode of the target playing unit is used to determine a playing mode that currently meets the alternative condition, and the playing mode that first meets the alternative condition is determined as the target playing mode, including: The priority order of the at least one playing mode of the target playing unit is used to determine a playing mode that first determines that the current video playing quantity does not reach the playing quantity threshold, as the target playing mode.

3. The video playback method of claim 1, wherein, The method for determining the playing quantity threshold of each playing mode of the at least one playing unit for different video stream types, includes: Determining the maximum video playing quantity that any playing unit can reach when playing any video stream type video according to any playing mode under the condition that a playing condition is met, the playing condition including that the resource usage rate of the playing unit does not exceed the resource usage rate threshold, and the video playing quality meets the video quality condition; The maximum video playing quantity is determined as the playing quantity threshold of the playing mode of the playing unit for the video stream type.

4. The video playback method of claim 1, wherein, The playing strategy information further includes the priority order of the at least one playing unit and the priority order of at least one playing mode of each playing unit; in at least one playing mode of the last priority playing unit, the playing quantity threshold of the last priority playing mode for each video stream type is infinite.

5. The video playback method according to any one of claims 2 to 4, wherein, The playing strategy information further includes the resource usage rate threshold of the at least one playing unit; The target playing unit and the target playing mode of the target video to be played are determined based on the playing strategy information, including: Determining the target resource usage rate of the at least one playing unit, the target resource usage rate representing the resource usage rate when the target video is allocated; The playing unit with the target resource usage rate not greater than the resource usage rate threshold is determined as the target playing unit; The target playing mode is selected from the at least one playing mode of the target playing unit.

6. A video playback device, comprising: The video playing device includes: An information acquisition module is configured to acquire playing strategy information in response to a received video playing instruction, the playing strategy information indicating a strategy for selecting a playing unit and a playing mode from at least one playing unit in a current terminal and at least one preset playing mode of each playing unit, wherein each playing mode includes a combination of a decoding mode and a rendering mode; A mode determination module is configured to determine a target playing unit and a target playing mode of a target video to be played based on the playing strategy information; A video playing module is configured to play the target video through the target playing unit according to the target playing mode; The playing strategy information includes at least one of the following limiting conditions: a playing quantity threshold of a playing unit, a playing quantity threshold of a playing mode, a priority of a playing unit, a priority of a playing mode, and a resource usage rate threshold of a playing unit. The mode determining module is configured to select a target playback unit from the at least one playback unit that meets the limit condition in the playback strategy information, and select a target playback mode from the at least one playback mode of the target playback unit that meets the limit condition in the playback strategy information; Alternatively, the playback strategy information comprises a priority order of the at least one playback unit and a priority order of at least one playback mode of each playback unit; The mode determining module is configured to determine, based on the priority order of the at least one playback unit, a playback unit that currently meets a candidate condition, and determine, as the target playback unit, a playback unit that first meets the candidate condition; and determine, based on the priority order of the at least one playback mode of the target playback unit, a playback mode that currently meets the candidate condition, and determine, as the target playback mode, a playback mode that first meets the candidate condition; Alternatively, the playback strategy information comprises a playback quantity threshold of each playback mode of the at least one playback unit for different video stream types, and the target video stream belongs to a target stream type; The mode determining module is configured to determine a quantity of videos of the target stream type that are currently played by each playback mode of the at least one playback unit, determine, as the target playback mode, a playback mode whose quantity of videos of the target stream type that are currently played is less than a corresponding playback quantity threshold, and determine, as the target playback unit, a playback unit corresponding to the target playback mode.

7. A video playback device, characterized by comprising: The video playback device comprises a memory, a processor, and a video playback program stored in the memory and executable on the processor, and the video playback program, when executed by the processor, implements the video playback method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video coding method and device, electronic equipment and storage medium

    CN112104879A

  • Video playing method, device, equipment, system and storage medium

    CN113316022A